Skip to content

Commit

Permalink
fix for panic with snmp exporter from the recent version upgrade (#6921)
Browse files Browse the repository at this point in the history
* fix for panic with snmp exporter from the recent version upgrade

Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com>

---------

Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com>
  • Loading branch information
erikbaranowski committed May 21, 2024
1 parent ecfb3ed commit eb01156
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions static/integrations/snmp_exporter/snmp_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
),
}
}

Expand Down

0 comments on commit eb01156

Please sign in to comment.