Closed xenuser closed 10 years ago
Hi, There was a bug in the retry code. This has been fixed in master. The problem in your case is that the script was unable to connect to the API, either because of dns issues or something like firewall/user credentials etc.
Please update the script and if the connection problem still exists it will throw a proper exception and show you what url it tries to connect to which should help you troubleshoot the issue.
regards,
Brenn
Hi Brenn,
thank you for your efforts! When I call check_nexenta.py now, it gives me: CRITICAL: Unable to connect to API at http://secret_ip:2000/rest/nms/ http://secret_ip:2000/rest/nms/
Unfortunately the Nexenta storage is only available over https, not http.
My bad - I didn't use "api_ssl = ON". Sorry!
Thanks for the feedback! Case closed :)
I just downloaded check_nexenta.py here from this GitHub repo, installed my SNMP agent and configured the Nagios check.
When I try to use check_nexenta.py Python throws me an error: ./check_nexenta.py -H topsecretstoragehost
Traceback (most recent call last): File "./check_nexenta.py", line 660, in
print main(sys.argv[1:])
File "./check_nexenta.py", line 555, in main
result = check_spaceusage(nexenta)
File "./check_nexenta.py", line 283, in check_spaceusage
volumes = api.get_data(obj='folder', meth='get_names', par=[''])
File "./check_nexenta.py", line 165, in get_data
if response['error'] and "Cannot introspect object com.nexenta.nms" in response['error']['message']:
UnboundLocalError: local variable 'response' referenced before assignment
Any hints on this one? I am using Python 2.7.3.