Page 2 of 2
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Fri Jan 15, 2021 2:31 am
by pratikmehta003
Need one more final help..
For NET, how do i need to set the threhold... Below image for reference:
NET.PNG
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Fri Jan 15, 2021 4:57 pm
by ssax
You can pass in -w or -c (or both) to do that. You can check the help output of most plugins with the -h command:
Code: Select all
-w, --warning=THRESHOLD
Warning threshold. See
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT
for the threshold format. By default, no threshold is set.
-c, --critical=THRESHOLD
Critical threshold. See
http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT
for the threshold format. By default, no threshold is set.
See the links in the output for the threshold format.
The default NET check/thresholds refers to these values in the NET output:
Code: Select all
net receive=6.00 KBps, send=36.00 KBps
You could also use the
-s if you wanted to specify which specific thing you're trying to check for NET:
Code: Select all
* net - shows net info
+ usage - overall network usage in KBps(Kilobytes per Second)
+ receive - receive in KBps(Kilobytes per Second)
+ send - send in KBps(Kilobytes per Second)
+ nic - makes sure all active NICs are plugged in
^ all net info(except usage and no thresholds)
Code: Select all
-l "NET" -s nic
CHECK_VMWARE_API.PL OK - All 1 NICs are connected | OK_NICs=1;; Bad_NICs=0;;
-l "NET" -s receive
CHECK_VMWARE_API.PL OK - net receive=3.00 KBps | net_receive=3.00;;
-l "NET" -s usage
CHECK_VMWARE_API.PL OK - net usage=2.00 KBps | net_usage=2.00;;
etc, then those -w and -c thresholds would match against the specific thing you're trying to monitor.
When you use all (the default) the thresholds only apply to the send/receive.
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Sun Jan 24, 2021 3:23 am
by pratikmehta003
Thanks for the details... and when i specify the -w and -c the values will taken as % right?
if i give -w 80 -c 90 then it will take 80% and 90% if m reading it right...
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Mon Jan 25, 2021 5:34 pm
by ssax
Only the CPU and MEM "usage" ones support percent:
Code: Select all
[root@xid libexec]# ./check_vmware_api.pl -h | grep percent
+ usage - CPU usage in percentage
+ usage - mem usage in percentage
But yes, you are correct, it will automatically convert them so no need to pass %.
[root@xid libexec]# /usr/local/nagios/libexec/check_vmware_api.pl -H "192.168.X.X" -uuser -p'pass' -l "MEM" -s 'usage'
-w 10 -c 50
CHECK_VMWARE_API.PL
WARNING - mem usage=14.83 % | mem_usage=14.83%;
10;50
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Wed Jan 27, 2021 2:08 am
by pratikmehta003
i was referring to other parameters, like net receive net send, IO read IO write.. so will % not be applicable here?
If it doesnt take the % for these then how does alerting work?
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Wed Jan 27, 2021 7:22 pm
by ssax
You just don't use percent, the thresholds are for what the check outputs, take these for example:
Code: Select all
-l "NET" -s nic
CHECK_VMWARE_API.PL OK - All 1 NICs are connected | OK_NICs=1;; Bad_NICs=0;;
-l "NET" -s receive
CHECK_VMWARE_API.PL OK - net receive=3.00 KBps | net_receive=3.00;;
-l "NET" -s usage
CHECK_VMWARE_API.PL OK - net usage=2.00 KBps | net_usage=2.00;;
The warning/critical thresholds will compare against whatever metrics it is checking:
Code: Select all
Bad_NICs=0;;
net_receive=3.00;;
net_usage=2.00;;
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Wed Feb 10, 2021 9:06 pm
by pratikmehta003
okay.. so basically i will have to put the number for the threshold so that will trigger warning/critical based on that, right?
Re: Monitor Network I/O Disk I/O and Latency for ESX
Posted: Thu Feb 11, 2021 6:18 pm
by ssax
Correct.