diff --git a/README.md b/README.md index 3ddc3944..417a5dc8 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ Flags: | `nginxplus_upstream_server_ssl_handshakes` | Counter | Successful SSL handshakes | `server`, `upstream` | | `nginxplus_upstream_server_ssl_handshakes_failed` | Counter | Failed SSL handshakes | `server`, `upstream` | | `nginxplus_upstream_server_ssl_session_reuses` | Counter | Session reuses during SSL handshake | `server`, `upstream` | -| `nginxplus_upstream_keepalives` | Gauge | Idle keepalive connections | `upstream` | +| `nginxplus_upstream_keepalive` | Gauge | Idle keepalive connections | `upstream` | | `nginxplus_upstream_zombies` | Gauge | Servers removed from the group but still processing active client requests | `upstream` | #### [Stream Upstreams](https://nginx.org/en/docs/http/ngx_http_api_module.html#def_nginx_stream_upstream) diff --git a/collector/nginx_plus.go b/collector/nginx_plus.go index 025e9804..70d9e32c 100644 --- a/collector/nginx_plus.go +++ b/collector/nginx_plus.go @@ -372,8 +372,8 @@ func NewNginxPlusCollector(nginxClient *plusclient.NginxClient, namespace string "ssl_session_reuses": newStreamServerZoneMetric(namespace, "ssl_session_reuses", "Session reuses during SSL handshake", variableLabelNames.StreamServerZoneVariableLabelNames, constLabels), }, upstreamMetrics: map[string]*prometheus.Desc{ - "keepalives": newUpstreamMetric(namespace, "keepalives", "Idle keepalive connections", constLabels), - "zombies": newUpstreamMetric(namespace, "zombies", "Servers removed from the group but still processing active client requests", constLabels), + "keepalive": newUpstreamMetric(namespace, "keepalive", "Idle keepalive connections", constLabels), + "zombies": newUpstreamMetric(namespace, "zombies", "Servers removed from the group but still processing active client requests", constLabels), }, streamUpstreamMetrics: map[string]*prometheus.Desc{ "zombies": newStreamUpstreamMetric(namespace, "zombies", "Servers removed from the group but still processing active client connections", constLabels), @@ -980,8 +980,8 @@ func (c *NginxPlusCollector) Collect(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric(c.upstreamServerMetrics["ssl_session_reuses"], prometheus.CounterValue, float64(peer.SSL.SessionReuses), labelValues...) } - ch <- prometheus.MustNewConstMetric(c.upstreamMetrics["keepalives"], - prometheus.GaugeValue, float64(upstream.Keepalives), name) + ch <- prometheus.MustNewConstMetric(c.upstreamMetrics["keepalive"], + prometheus.GaugeValue, float64(upstream.Keepalive), name) ch <- prometheus.MustNewConstMetric(c.upstreamMetrics["zombies"], prometheus.GaugeValue, float64(upstream.Zombies), name) } diff --git a/go.mod b/go.mod index 03e2c0ae..2e36ad16 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.3 require ( github.com/alecthomas/kingpin/v2 v2.4.0 github.com/go-kit/log v0.2.1 - github.com/nginxinc/nginx-plus-go-client v1.2.1 + github.com/nginxinc/nginx-plus-go-client v1.2.2 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common v0.55.0 github.com/prometheus/exporter-toolkit v0.11.0 diff --git a/go.sum b/go.sum index b6cca6aa..7e7b4110 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nginxinc/nginx-plus-go-client v1.2.1 h1:65L9xgPDNbEbd23FTTCcaZ2qF9TX5/Z6vkkEl7RKiVo= -github.com/nginxinc/nginx-plus-go-client v1.2.1/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4= +github.com/nginxinc/nginx-plus-go-client v1.2.2 h1:sl7HqNDDZq2EVu0eQQVoZ6PKYGa4h2dB/Qr5Ib0YKGw= +github.com/nginxinc/nginx-plus-go-client v1.2.2/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=