-
I have been doing tests to monitor a UPS but I get an error when trying to connect snmp mib scraping from the UPS trough snmp-exporter to prometheus... In the error message shown by prometheus the URL is swapped to the one of the smnp-exporter This is the url shown in connection refused error message in prometheus: I tried several relabeling settings in the prometheus.yml configuration file, but I couldn't solve this problem. Any idea what the problem is? Thanks in advance for your suggestions. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Order in URL parameters doesn't have any effect. |
Beta Was this translation helpful? Give feedback.
-
The problem was... that i didn't define correctly the job_name in prometheus.yml. I only change replacement: snmp-exporter:9116 instead of replacement: localhost:9116 and worked as I spected
|
Beta Was this translation helpful? Give feedback.
-
Hello Guys, i have a simmular problem with this. in the prometheus config file i have declated my targets:
the other switches are running and everything is fine. but the firewall one is a little bit bitchy. on the webinterface from the snmp_exporter the firewall(called devices) gives back his information instant. http://myserver.domain.com:9116/snmp?target=192.168.130.1&module=if_mib fine.. i got my ifOutOctets on the prometheus webinterface on targets.. i got the error 500 and if i click on the link i get i look in the URL and its this one: http://myserver.domain.com:9116/snmp?module=if_mib&target=192.166.130.1 so just the structure of the URL is changed.. and then error 500 on prometheus and timeout???? can you guys say me something about this. why the URL stucture changes and why it workes with just this constellation.. br Ludwig btw: i use this version
|
Beta Was this translation helpful? Give feedback.
The problem was... that i didn't define correctly the job_name in prometheus.yml.
Prometheus was unable to connect to the SNMP exporter on localhost port 9116. This is likely because Docker Compose is assigning the SNMP exporter a host name. I should have used the name of the service, defined in the docker-compose.yml
I only change replacement: snmp-exporter:9116 instead of replacement: localhost:9116 and worked as I spected