File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
package collector
2
2
3
3
import (
4
+ "context"
4
5
"fmt"
5
6
"log/slog"
6
7
"strconv"
7
8
"sync"
8
9
9
- plusclient "github.com/nginxinc/nginx-plus-go-client/client"
10
+ plusclient "github.com/nginxinc/nginx-plus-go-client/v2/ client"
10
11
"github.com/prometheus/client_golang/prometheus"
11
12
)
12
13
@@ -622,7 +623,8 @@ func (c *NginxPlusCollector) Collect(ch chan<- prometheus.Metric) {
622
623
c .mutex .Lock () // To protect metrics from concurrent collects
623
624
defer c .mutex .Unlock ()
624
625
625
- stats , err := c .nginxClient .GetStats ()
626
+ // FIXME: https://github.com/nginxinc/nginx-prometheus-exporter/issues/858
627
+ stats , err := c .nginxClient .GetStats (context .TODO ())
626
628
if err != nil {
627
629
c .upMetric .Set (nginxDown )
628
630
ch <- c .upMetric
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
"syscall"
17
17
"time"
18
18
19
- plusclient "github.com/nginxinc/nginx-plus-go-client/client"
19
+ plusclient "github.com/nginxinc/nginx-plus-go-client/v2/ client"
20
20
"github.com/nginxinc/nginx-prometheus-exporter/client"
21
21
"github.com/nginxinc/nginx-prometheus-exporter/collector"
22
22
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.22.6
4
4
5
5
require (
6
6
github.com/alecthomas/kingpin/v2 v2.4.0
7
- github.com/nginxinc/nginx-plus-go-client v1.3.0
7
+ github.com/nginxinc/nginx-plus-go-client/v2 v2.0.1
8
8
github.com/prometheus/client_golang v1.20.4
9
9
github.com/prometheus/common v0.59.1
10
10
github.com/prometheus/exporter-toolkit v0.13.0
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
32
32
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 /go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ =
33
33
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU =
34
34
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f /go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U =
35
- github.com/nginxinc/nginx-plus-go-client v1.3.0 h1:q/aeT4B5k0KLwWlefoBzfLfraBBvIKLuDg+lLFWAo4I =
36
- github.com/nginxinc/nginx-plus-go-client v1.3.0 /go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4 =
35
+ github.com/nginxinc/nginx-plus-go-client/v2 v2.0.1 h1:5VVK38bnELMDWnwfF6dSv57ResXh9AUzeDa72ENj94o =
36
+ github.com/nginxinc/nginx-plus-go-client/v2 v2.0.1 /go.mod h1:He+1izxYxVVO5/C9ZTukwOpvkAx5eS19nRQgKXDhX5I =
37
37
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
38
38
github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
39
39
github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI =
You can’t perform that action at this time.
0 commit comments