Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

gqma0

Reviews(1)
bygqma0, November 29, 2016
check_vmfs.sh - Check vmfs datastores through VMware VCLI
check_vmfs doesn't reflect the results and I'm not sure where the problem lies


[root@monitoring1 admin]# grep -E -i ';check_esxi_vmfs_prod-vspp-PvDC1' /usr/local/nagios/var/nagios.log | perl -pe 's/CRITICAL/\e[1;31;43m$&\e[0m/g; s/(\d+)/localtime($1)/e'
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi01;check_esxi_vmfs_prod-vspp-PvDC1;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7456.31 Gb (91%)- free: 735.43 Gb (9%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi02;check_esxi_vmfs_prod-vspp-PvDC1;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7456.31 Gb (91%)- free: 735.43 Gb (9%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi03;check_esxi_vmfs_prod-vspp-PvDC1;CRITICAL;HARD;3;CRITICAL - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7822.53 Gb (95%)- free: 369.21 Gb (5%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi04;check_esxi_vmfs_prod-vspp-PvDC1;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7456.31 Gb (91%)- free: 735.43 Gb (9%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi05;check_esxi_vmfs_prod-vspp-PvDC1;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7456.31 Gb (91%)- free: 735.43 Gb (9%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi06;check_esxi_vmfs_prod-vspp-PvDC1;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC1 - total: 8191.75 Gb - used: 7191.70 Gb (87%)- free: 1000.04 Gb (13%)

[root@monitoring1 admin]# grep -E -i ';check_esxi_vmfs_prod-vspp-PvDC2' /usr/local/nagios/var/nagios.log | perl -pe 's/CRITICAL/\e[1;31;43m$&\e[0m/g; s/(\d+)/localtime($1)/e'
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi01;check_esxi_vmfs_prod-vspp-PvDC2;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7567.78 Gb (92%)- free: 623.96 Gb (8%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi02;check_esxi_vmfs_prod-vspp-PvDC2;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7736.15 Gb (94%)- free: 455.59 Gb (6%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi03;check_esxi_vmfs_prod-vspp-PvDC2;CRITICAL;HARD;3;CRITICAL - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7859.84 Gb (95%)- free: 331.90 Gb (5%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi04;check_esxi_vmfs_prod-vspp-PvDC2;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7736.22 Gb (94%)- free: 455.52 Gb (6%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi05;check_esxi_vmfs_prod-vspp-PvDC2;WARNING;HARD;3;WARNING - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7567.81 Gb (92%)- free: 623.93 Gb (8%)
[Tue Nov 29 00:00:00 2016] CURRENT SERVICE STATE: prod-vspp-ESXi06;check_esxi_vmfs_prod-vspp-PvDC2;CRITICAL;HARD;3;CRITICAL - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7859.84 Gb (95%)- free: 331.90 Gb (5%)

[root@monitoring1 admin]# ssh root@prod-vspp-esxi01 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2
[root@monitoring1 admin]# ssh root@prod-vspp-esxi02 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2
[root@monitoring1 admin]# ssh root@prod-vspp-esxi03 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2
[root@monitoring1 admin]# ssh root@prod-vspp-esxi04 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2
[root@monitoring1 admin]# ssh root@prod-vspp-esxi05 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2
[root@monitoring1 admin]# ssh root@prod-vspp-esxi06 'df -h|grep -E "PvDC1|PvDC2"'
Password:
VMFS-5 8.0T 7.3T 735.4G 91% /vmfs/volumes/prod-vspp-PvDC1
VMFS-5 8.0T 7.4T 623.9G 92% /vmfs/volumes/prod-vspp-PvDC2

Also checked with v1.5

[root@monitoring1 admin]# check_vmfs_1.5/check_vmfs.sh -C /usr/local/nagios/libexec/vmware_esxi_conf.txt -S 172.17.166.13 -V /vmfs/volumes/prod-vspp-PvDC2 -w 85 -c 95 -u Gb
CRITICAL - /vmfs/volumes/prod-vspp-PvDC2 - total: 8191.75 Gb - used: 7859.84 Gb (95%)- free: 331.90 Gb (5%) | /vmfs/volumes/prod-vspp-PvDC2=7859.84Gb;6962.98;7782.16;;8191.75