Build precise queries to find exactly what you need
Press ESC to close
Good script seems to work!
However another couple of points:
1. The /nowarn option of w32tm.exe looks like it’s not supported in earlier versions of Windows including XP, but is supported in Vista,7, 2008 Server etc. So for these you need to remove this option from the following line, otherwise the script returns an error.
strCommand = “%SystemRoot%System32w32tm.exe /monitor /nowarn /computers:” & serverlist
2. Further to the points made abut the thresholds not working correctly, can I suggest you make the following change:
Change the statement
If result = “” Then Err = 3 Status = “UNKNOWN” ElseIf result > crit Then Err = 2 status = “CRITICAL” ElseIf result > warn Then Err = 1 status = “WARNING” Else Err = 0 status = “OK” End If
to the following:
If result = “” Then Err = 3 Status = “UNKNOWN” ElseIf abs(result) > abs(crit) Then Err = 2 status = “CRITICAL” ElseIf abs(result) > abs(warn) Then Err = 1 status = “WARNING” Else Err = 0 status = “OK” End If
Then it seems to work properly as far as I have tested it and you can supply the thresholds unsigned.
Regards Phil
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!