Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_esx_datastore_snmp
1.0
2021-01-13
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
8319
File | Description |
---|---|
check_esx_datastore_snmp | Plugin |
check_esx_datastore_snmp.png | Example of the datastore monitor |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Model: ProLiant BL460c Gen8 32 Cores.
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
Model: ProLiant BL460c Gen8 32 Cores
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)
byprotein, April 15, 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.
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.
bykemecs, February 8, 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
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
Owner's reply
I see snmpwalk is not working well. You need to have it working fine first, before test the script