Closed Bug 1273005 Opened 9 years ago Closed 9 years ago

Nagios alerts says 'Backlog Age is UNKNOWN: min() arg is an empty sequence' when nothing pending

Categories

(Infrastructure & Operations Graveyard :: CIDuty, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nthomas, Assigned: aselagea)

References

Details

Attachments

(1 file, 1 obsolete file)

Looks like it happens at https://hg.mozilla.org/build/braindump/file/default/nagios-related/check_backlog_age.py#l47 BTW, it would be good to check the change made at bug 1248589 comment #4 is also in braindump, to keep the code in sync with the private repo for IT puppet.
Assignee: nobody → aselagea
Attached patch bug_1273005.patch (obsolete) — Splinter Review
Attachment #8753898 - Flags: review?(nthomas)
Comment on attachment 8753898 [details] [diff] [review] bug_1273005.patch >diff -r 2a36e340a0b2 nagios-related/check_backlog_age.py >--- a/nagios-related/check_backlog_age.py Fri May 13 16:15:18 2016 -0400 >+++ b/nagios-related/check_backlog_age.py Wed May 18 18:48:18 2016 +0300 >@@ -1,4 +1,4 @@ >-#!/usr/bin/env python >+#!/usr/bin/python env is generally preferred, was was there some reason for this change ? > response = urllib2.urlopen(pending_url) We could add timeout here while we're modifying this file, eg by passing timeout=30 to urlopen. >+ if len(result['pending']) == 0: >+ submitted_at.append(get_unix_time()) We can end up with a status of 'OK Backlog Age: -1h:59m:59s, Ignored: 0' if it takes more than 0.5 seconds to retrieve builds-pending.js. I suggest using unix_time instead of calling get_unix_time() again. Fix those up in a new patch and I'll put an r+ on it.
Attachment #8753898 - Flags: review?(nthomas) → review-
Updated the patch.
Attachment #8753898 - Attachment is obsolete: true
Attachment #8754853 - Flags: review?(nthomas)
Attachment #8754853 - Flags: review?(nthomas) → review+
Attachment #8754853 - Flags: checked-in+
The check was also updated, marking this as resolved.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: