Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unms_exporter not working #139

Open
SaymonDzen opened this issue Aug 13, 2021 · 2 comments
Open

unms_exporter not working #139

SaymonDzen opened this issue Aug 13, 2021 · 2 comments

Comments

@SaymonDzen
Copy link

Please Help!
For some reason, the script cannot connect to my UNMS host
/opt/unms_exporter# UNMS_HOST=10.77.1.231 UNMS_KEY=ca2c9f48-2466-4a6c-b312-2d1d0abe2bb3 python3 unms_exporter.py
10.77.0.220 - - [12/Aug/2021 15:51:15] code 400, message Bad Request
10.77.0.220 - - [12/Aug/2021 15:51:15] "GET /metrics?target=10.77.1.231 HTTP/1.1" 400 -
image
no firewall, exporter and unms ping each other

@darkdrgn2k
Copy link
Contributor

darkdrgn2k commented Aug 22, 2021

Usually i see this error when it could not match the IP address (10.77.1.231) in UNMS.

If you hit http://127.0.0.1:8000/metrics?target=10.77.1.231 via curl or a browser you should see an error Provided target name/IP does not exist.

Usually we see this because the script can only match the IP address that is UNMS sees when the device reports back. (which i agree is annoying) and we used the wrong ip of a router.

In your case it may be an API issue.

curl -H "x-auth-token:ca2c9f48-2466-4a6c-b312-2d1d0abe2bb3" "https://10.77.1.231/nms/api/v2.1/devices"
see if

  • you get a json output
  • your last used increases

If you get a json, prase the output and take a look at "ipAddress"

PS: ou can try to use targetName instead of target which will match on identification/name

@darkdrgn2k
Copy link
Contributor

Just realized that your UNMS_HOST and your target= are the same

UNMS_HOST=10.77.1.231 That should be where your UNMS server is. Probably a hostname due to HTTPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants