I have created a check using postgres.pl custom_query. The check runs and inserts a string into the result column. The result is either "GOOD" or "BAD". The critical level has been set to use a string and the string is "BAD". The check works and returns either of the strings I mentioned but is in a critical state no matter what the result is. When it is bad it is critical and sending out alerts and when it is good it is critical and sending out alerts.
Please help me figure this out. Thanks!
postgres.pl custom_query
Re: postgres.pl custom_query
Need more information, are you able to provide the parts where your script exits? Have you set the appropriate exit codes in your script?
exit 0 = OK
exit 1 = WARNING
exit 2 = CRITICAL
exit 3 = UNKNOWN
Does it exit correctly on the command line?
exit 0 = OK
exit 1 = WARNING
exit 2 = CRITICAL
exit 3 = UNKNOWN
Does it exit correctly on the command line?
-
- Posts: 2
- Joined: Sun Mar 25, 2012 12:59 pm
Re: postgres.pl custom_query
It was the exit codes! I had copied my script over from another we had in use and did not think to re-evaluate the exit codes. Thanks for helping me out!
Re: postgres.pl custom_query
You're welcome