Hi I noticed I was not receiving critical emails for service checks but recovery emails were ok
.
So I cheched my mail script and logs where I found the “$service.output$” was empty
I spent time checking the my python check script to find a discrepency in the output when critical but everything looked ok.
using
OK = 0
WARNING = 1
CRITICAL = 2
UNKNOWN = 3
I tested with a failing condition (same code I just change the return value)
If I change the exit value to OK perfdata is processed and “$service.output$” is populated.
If I change the exit value to WARNING perfdata is processed and “$service.output$” is populated.
but
If I change the exit value to CRITICAL perfdata is not processed and “$service.output$” is not populated.
I have checked the logs and tried debug logging but cant find any errors
How is the perdata treated differently when CRITICAL exit code ??
How can I find out what is going wrong? where should I look next?
Hi
I continued to test and even with no perfdata its not working so perfdata is not the issue.
I noticed that on the same setup nrpe critical checks are treated correctly, so its something else going on with these critical errors that is stopping the plugin output being processed.
I’m not sure what else I can try!
Peter
LOL …that was just a copy paste error from a test. It is definatly failing with the
sys.exit(CRITICAL) and exit(CRITICAL)
Hey but thanks for taking the time to read.
Bumping this since its quite a problem
when exit code from python script is 2 the service output data is not populated.
If i change the exit code to 1 the data is processed.
This is impacting my critical alerts.
Any ideas ?
Hi I took the scrip apart and rebuilt it bit at a time. I found the error which was an exception that was catching the critical exits !
It was a basic part of the script that I had used for all my scripts and had not caused a problem untill recently (which was strange)
so I hold my hands up and say … my fault!
Thanks for taking the time to look into this.
Peter