|
Note: statistics are actually collected slightly after 0:00 UTC, so if you do go with the "more than a day has passed since the listed update date" method I suggested in IRC, I'd suggest you use something like 24.5-25 hours. If you're just going with a "statistics should have been collected during today-in-UTC", don't check until at least 20 after. For reference, today's stats were available at about 15 minutes after the hour. Just figured I should mention to prevent some false positives. Attached is the statistics-collected script. It requires Perl DBI and DBD::Pg modules, but otherwise just needs Perl. I don't know where this check will actually be ran, so I have not depended on musicbrainz-server or anything else. If it can actually be ran by astro or something, then I'd prefer to get this checked in to the musicbrainz-server project and simplify it to use DBDefs. Thoughts? Running it on astro seems like a good idea (assuming you're only talking for now about monitoring production). I suggest you add it to musicbrainz-server, presumably it can make use of settings etc so it knows how to connect to totoro - ideally you can just run something like /path/to/codebase/bin/nagios/check-statistics-collected (with no arguments, i.e. it Just Works) then check that the same thing works when run as nagios, i.e. sudo -u nagios /path/to/codebase/bin/nagios/check-statistics-collected then once we've got that far we'll look into integrating it into Nagios. Other questions to ponder:
In code review at http://codereview.musicbrainz.org/r/2080/ Re-opening: the nagios script is now in master, but I need to talk to Dave about what to do next (ie, actually getting it ran). Ok, this works fine if I do: sudo -u nagios /home/musicbrainz/musicbrainz-server/admin/nagios/statistics-collected I would like this to be checked:
djce@dudley gateway$ git commit -a Also djce@dudley nagios$ git commit -a I don't have access to that URL, so I'm going to take your word. I think having nagios configuration outside the server is not a problem, so this all looks good now. |
|||||||||||||||||||||||||||||||||||||
Nagios plugin guide attached.
Feel free to ping/grab me etc for more!