Build precise queries to find exactly what you need
Press ESC to close
here is the first problem:
########################### $status = 0; $desc = “”;
test-activesyncconnectivity | ForEach-Object { [snippet] elseif ($status -eq “0”) { Write-Host “OK: ActiveSync Connectivity OK” ###########################
if you have an error on “test-activesyncconnectivity” the status will be “OK” at the end.
i would do the following as a fast fix:
############### $status = 2; # 2 = critical $desc = “”;
test-activesyncconnectivity | ForEach-Object { if($_.Result -like “Success”) { $status = 0; ###############
So you would get a “critical” output at the end if you have a problem at “test-activesyncconnectivity”.
fast hint for other languages:
###################### elseif($_.Result -like “Failure”) { ######################
in german it would be:
###################### elseif($_.Result -like “Erfolgreich”) { ######################
greetz
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!