Open IanRarity opened 7 years ago
Verified, having the same issue in combination with vSphere 6.7 on Debian. EDIT: Turned out, that it is required to manually specify the warning/critical thresholds. Settings from vCenter are not derived - did not find this information in the documentation.
It would be great to have a clear error message about this.
# ./pyvinga.py -s xxx -u icinga2@vsphere.local -p xxx -n datastore -e datastore01 -r space
Caught exception : float() argument must be a string or a number
# ./pyvinga.py -s xxx -u icinga2@vsphere.local -p xxx -n datastore -e datastore01 -r space -w 20 -c 10
CRITICAL - Datastore Used Space is 82.2% (Used 1682.7 GB of 2047.8 GB) | 'Datastore Used Space'=82.2%;20.0;10.0
This can be fixed easily by setting default thresholds (which is really common for monitoring plugins). I wrote a fix for this (https://github.com/stdevel/pyvinga/commit/8af961364be38982482483bb3c099936577c6b45) - see also pull request 11 (https://github.com/lgeeklee/pyvinga/pull/11).
Hello @IanRarity, is the new version working for you?
As described in title. If I try:
./pyvinga.py -s VCENTREHOST -u VCUSER -p VCPASSWD -n datastore -e DATASTORE -r status
I get "OK - Datastore Status is green (Type: VMFS)" - all good.
If I try the other counter, though:
./pyvinga.py -s VCENTREHOST -u VCUSER -p VCPASSWD -n datastore -e DATASTORE -r space
I get "Caught exception : float() argument must be a string or a number"