VMWare

check_esx_datastore_snmp

Description:

This plugin will catch used and free Datastore space via SNMP from an VMWare ESX Server, tested with VMware ESXi, 6.7.0
Model: ProLiant BL460c Gen8 32 Cores.

Current Version

1.0

Last Release Date

2021-01-13

Compatible With

  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x

Owner

License

GPL


Project Files
Project Photos
Project Notes
This plugin will catch used and free Datastore space via SNMP from an VMWare ESX Server, tested with VMware ESXi, 6.7.0 Model: ProLiant BL460c Gen8 32 Cores refers to the datastore position in the list returned by SNMP. For example if you want to check the first datastore of that list then use 1, to check the second use 2 and so on. Make sure that the script is fetiching the right DATA. You can test it with the following command: snmpwalk -m ALL -c public -v 2c myhost.mydomain .1.3.6.1.2.1.25.2.3.1.5.5 snmpwalk -m ALL -c public -v 2c myhost.mydomain .1.3.6.1.2.1.25.2.3.1.6.5 HOST-RESOURCES-MIB::hrStorageType.5 .1.3.6.1.2.1.25.2.3.1.2.5 OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk HOST-RESOURCES-MIB::hrStorageSize.5 .1.3.6.1.2.1.25.2.3.1.5.5 HOST-RESOURCES-MIB::hrStorageUsed.5 .1.3.6.1.2.1.25.2.3.1.6.5 MIB FILE /usr/share/snmp/mibs https://kb.vmware.com/s/article/1013445 SYNTAX: ./check_esx_datastore_snmp " EXAMPLE ./check_esx_datastore_snmp myhost.mydomain public 90 95 Created: 2021-01-13 Author : Cesar San based on Mattia Pezzetta work "check_esx_mem_snmp", based on Thibaut Ploquin work "check_hpux_mem", based on Alain van der Heiden & Remco Hage works "check_snmp_hpux_mem" Changes: 2021-01-13 First Release
Reviews (2) Add a Review
It wasn't working for me, I just needed to do some modifications
by protein, April 30, 2022
Hi,
Plugin wasn't working even with snmpwalk installed correctly. I made some modifications and modified your script for V2 and V3.
Thanks for the base script.
Helpful? Yes  No 
ESXi 6.7 test error
by kemecs, February 28, 2021
ESXi 6.7 test error:

nagios#snmpwalk -m ALL -c detpub -v 2c 192.168.14.100 .1.3.6.1.2.1.25.2.3.1.3
Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU
SUPPORTS (is a reserved word): At line 59 in /usr/share/snmp/mibs/VMWARE-NSX-AGENTCAP-MIB.mib
INCLUDES (is a reserved word): At line 60 in /usr/share/snmp/mibs/VMWARE-NSX-AGENTCAP-MIB.mib
Bad operator (,): At line 61 in /usr/share/snmp/mibs/VMWARE-NSX-AGENTCAP-MIB.mib
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: /vmfs/volumes/ed338779-ce63a34b-4a9a-6333788de99b
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: /vmfs/volumes/fb77b97d-a6419beb-1a5d-9644f1d66a61
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: /vmfs/volumes/5b537a0f-504a0b9e-f354-509a4c8c2a70
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /vmfs/volumes/5b537a15-e9a92760-48cb-509a4c8c2a70
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /vmfs/volumes/5944f1c1-90b76f4e-ff8c-2c27d7149f5f
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /vmfs/volumes/5b537a15-c0d7e082-4c81-509a4c8c2a70
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /vmfs/volumes/5b537d1a-98df1272-d46d-509a4c8c2a70
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /vmfs/volumes/6277b27d-a6bf6dfd-0000-000000000000
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: Real Memory

nagios#./check_esx_mem_snmp 192.168.14.100 detpub 90 95
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
./check_esx_mem_snmp: line 116: [: -ge: unary operator expected
(standard_in) 1: syntax error
./check_esx_mem_snmp: line 134: [: -ge: unary operator expected
(standard_in) 1: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
./check_esx_mem_snmp: line 164: [: 95: unary operator expected
./check_esx_mem_snmp: line 167: [: 90: unary operator expected
OK Mem: scale=0 ; "Real Memory" MB / scale=0 ; "Real Memory" MB (%)|used=B size=B
Helpful? Yes  No 
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
2.5 (2)
Favorites
0
Views
8,106