Index: usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c =================================================================== --- usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c +++ usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.c @@ -396,6 +396,9 @@ snprintf(buf, sizeof(buf), "%c", isalnum(*name) ? *name : '_'); strlcat(metric, buf, mlen); + if (*name == '_') { + strlcat(metric, buf, mlen); + } ++name; } }