Closed
Bug 826007
Opened 12 years ago
Closed 9 years ago
Fix cepmon-nagios unknown errors
Categories
(Cloud Services :: Operations: Miscellaneous, task)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: gene, Unassigned)
Details
Update cepmon-nagios ( https://github.com/fetep/cepmon-nagios ) to log the conditions when it's going to return an error code of 3 or more ( http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN76 ).
At the moment intermittently cepmon-nagios returns unknown and I don't know what's causing it. During this time, I don't know if we're in an error state that should be alerting that isn't or a good state that shouldn't be alerting.
Reporter | ||
Comment 1•12 years ago
|
||
Here's how to get it and build it once it's fixed : https://intranet.mozilla.org/Services/Ops/Cepmon#cepmon-nagios
This patch should at least reflect the reason for the unknown in the nagios alert itself.
--- x/check_cepmon 2013-01-02 14:50:34.808919792 -0600
+++ y/check_cepmon 2013-01-02 14:52:01.439539488 -0600
@@ -29,15 +29,15 @@
alerts_json = Net::HTTP.get_response(cepmon_uri)
alerts = JSON.parse(alerts_json.body)
rescue Net::HTTPExceptions
- $stderr.puts "UNKNOWN: error fetching #{cepmon_uri.to_s}: #{$!}"
+ puts "UNKNOWN: error fetching #{cepmon_uri.to_s}: #{$!}"
exit 3
rescue JSON::ParserError
- $stderr.puts "UNKNOWN: error parsing JSON from #{cepmon_uri.to_s}: #{$!}"
+ puts "UNKNOWN: error parsing JSON from #{cepmon_uri.to_s}: #{$!}"
exit 3
end
if !alerts.is_a?(Hash) or !alerts["alerts"].is_a?(Array)
- $stderr.puts "UNKNOWN: error parsing JSON from #{cepmon_uri.to_s}: " +
+ puts "UNKNOWN: error parsing JSON from #{cepmon_uri.to_s}: " +
"missing alerts field"
exit 3
end
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•