Monitor Network I/O Disk I/O and Latency for ESX

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post by pratikmehta003 »

Need one more final help..

For NET, how do i need to set the threhold... Below image for reference:
NET.PNG
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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.
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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...
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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;;
pratikmehta003
Posts: 105
Joined: Thu Apr 09, 2020 7:35 am

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitor Network I/O Disk I/O and Latency for ESX

Post by ssax »

Correct.
Locked