Closed jforest closed 8 years ago
oh, and the endpoint nginx_exporter should be getting data from:
nginx_exporter@test1:~/nginx_exporter_repo$ curl http://localhost:19114/nginx_status
Active connections: 1
server accepts handled requests
55 55 82
Reading: 0 Writing: 1 Waiting: 0
Ok, so I finally got this (sort of) figured out. I think the updated way of setting the processedConnections in the NewExporter function isn't quite right. I forked the prometheus/client_golang to print out where it was expecting the length of the labelValues array to be equal to the length of the desc.variableLabels array. With the method from the last pull request, it was setting labelValues to an array 3 elements long. ["accepted", "handled", "any"]
But, it was only passing an array 1 element long in desc.variableLabels ["accepted"]
or ["handled"]
or ["any"]
Changing to send 3 values ends up with metrics like:
nginx_connections_processed_total{accepted="accepted",any="acc",handled="accep"} 82
nginx_connections_processed_total{accepted="any",any="blah3",handled="blah2"} 109
nginx_connections_processed_total{accepted="handled",any="blah",handled="blah"} 82
and with my branch that I'll submit a pull request for:
nginx_connections_processed_total{stage="accepted"} 86
nginx_connections_processed_total{stage="any"} 133
nginx_connections_processed_total{stage="handled"} 86
Assuming this can be closed.
Thanks for updating your dockerhub* image so quickly!
@tamsky That should happen automatically :)
My go version:
nginx_exporter@test1:~/nginx_exporter_repo$ go version go version go1.6.2 linux/amd64
My linux version:
nginx_exporter@test1:~/nginx_exporter_repo$ cat /etc/issue Debian GNU/Linux 8 \n \l
My error:
Seems related to the latest merge, but I'm not a go expert :/