bug 854903 - [crontabber] nagios errors all on one line #1157

merged 1 commit into from Mar 28, 2013


None yet

3 participants

peterbe commented Mar 26, 2013
@rhelmer rhelmer was assigned Mar 26, 2013
lonnen commented Mar 27, 2013

If there are both critical and warnings this will only report the critical. For the return code one has to win out, but do you want the warnings to be swallowed?

peterbe commented Mar 27, 2013

I'm fine with that. That the warnings are "ignored" if there are criticals.

@lonnen lonnen commented on the diff Mar 27, 2013
@@ -573,14 +573,12 @@ def nagios(self, stream=sys.stdout):
if criticals:
stream.write('CRITICAL - ')
- for each in criticals:
- stream.write(each)
- stream.write('\n')
+ stream.write('; '.join(criticals))
+ stream.write('\n')
elif warnings:
lonnen Mar 27, 2013 Mozilla member

If you switch just this line to if from elif both criticals and warnings get written. Why do you only want one or the other?

peterbe Mar 27, 2013 collaborator

What you'd get is this output:

CRITICAL - shit; bad; crap
WARNING - hmm; might be bad; not ideal

And what nagios does is that it just takes the first line. This in the same way that


...just became "CRITICAL - shit"

Does that make sense?
Basically, we only get 1 line to send to Nagios. And as it stands now it will only send the critical problems all into one line.

@lonnen lonnen merged commit cae8aaf into mozilla:master Mar 28, 2013

1 check passed

Details default Jenkins build 'socorro-github' #621 has succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment