You've already forked nginx_exporter
mirror of
https://github.com/nginxinc/nginx-prometheus-exporter.git
synced 2025-08-08 05:02:04 +03:00
Add variable labels to Upstream Servers and Server Zones metrics
This commit is contained in:
@@ -372,7 +372,8 @@ func main() {
|
||||
if err != nil {
|
||||
log.Fatalf("Could not create Nginx Plus Client: %v", err)
|
||||
}
|
||||
registry.MustRegister(collector.NewNginxPlusCollector(plusClient.(*plusclient.NginxClient), "nginxplus", constLabels.labels))
|
||||
variableLabelNames := collector.NewVariableLabelNames(nil, nil)
|
||||
registry.MustRegister(collector.NewNginxPlusCollector(plusClient.(*plusclient.NginxClient), "nginxplus", variableLabelNames, constLabels.labels))
|
||||
} else {
|
||||
ossClient, err := createClientWithRetries(func() (interface{}, error) {
|
||||
return client.NewNginxClient(httpClient, *scrapeURI)
|
||||
|
Reference in New Issue
Block a user