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

Freddy

Reviews(2)
byFreddy, May 25, 2020
Hello. great plugin!
I slightly modified it so I can have perfdata output.

if [ $exit_red -eq 0 ]; then
echo "OK - $NUMBEROFCPU CPU AVG. LOAD Normal - Current Load: $ESX_CPU % | Load=$ESX_CPU%;$3;$4"
exitstatus=$STATE_OK

elif [ $exit_red -eq "1" ]; then
echo "WARNING - $NUMBEROFCPU CPU AVG. LOAD more then $3% - Current Load: $ESX_CPU % | Load=$ESX_CPU%;$3;$4"
exitstatus=$STATE_WARNING

elif [ $exit_red -eq "2" ]; then
echo "CRITICAL - $NUMBEROFCPU CPU AVG. LOAD more then $4% - Current Load: $ESX_CPU % | Load=$ESX_CPU%;$3;$4"
exitstatus=$STATE_CRITICAL
byFreddy, December 2, 2010
Hi! great script!

a couple of things:

1) the line (near the end):

Wscript.Echo "NTP " & status & ": Offset " & result & " secs|'offset'=" & result & "s;" & warn & ";" & crit & ";"

should be changed in:

Wscript.Echo "NTP " & status & ": Offset " & result & " secs|offset=" & result & "s;" & warn & ";" & crit & ";"

so the performance data can processed by pnp4nagios addon.



2) I think there's a problem with warning and critical thresholds... arguments must contain + and - signs...

for example, this works:
cscript.exe //T:30 //NoLogo scripts\check_time.vbs 10.65.0.100 +5 +10
NTP CRITICAL: Offset +62.0905029 secs|offset=+62.0905029s;+5;+10;

this doesn't:
cscript.exe //T:30 //NoLogo scripts\check_time.vbs 10.65.0.100 5 10
NTP OK: Offset +62.0866201 secs|offset=+62.0866201s;5;10;


best regards, Federico