diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fab777b98ea..7ea545a3531d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,10 @@ Main (unreleased) ### Bugfixes +- Fix panic for `prometheus.exporter.snmp` and snmp_exporter integration + introduced in v0.40.5 with a version upgrade. This was due to an + uninitialized new metric for the exporter. (@erikbaranowski) + - Fix an issue where JSON string array elements were not parsed correctly in `loki.source.cloudflare`. (@thampiotr) - Fix SSRF vulnerability in `faro.receiver` by disabling source map download. (@hainenber) diff --git a/static/integrations/snmp_exporter/snmp_exporter.go b/static/integrations/snmp_exporter/snmp_exporter.go index c71fab3a3d5d..47754801e02a 100644 --- a/static/integrations/snmp_exporter/snmp_exporter.go +++ b/static/integrations/snmp_exporter/snmp_exporter.go @@ -155,6 +155,13 @@ func NewSNMPMetrics(reg prometheus.Registerer) collector.Metrics { Help: "Number of SNMP packet retries.", }, ), + SNMPInflight: promauto.With(reg).NewGauge( + prometheus.GaugeOpts{ + Namespace: namespace, + Name: "request_in_flight", + Help: "Current number of SNMP scrapes being requested.", + }, + ), } }