While D6 won't be supported for that much longer, backporting the drush nagios-updates command seems pretty trivial.

I had a look at the system_modules form in D6 but that is structured very differently to the D7 version, so getting the 'ignore from nagios' checkboxes to appear would be quite involved. For a stop-gap solution, modules/themes to ignore could just be specified in settings.php.

Here's the list of available updates on my D6 test install:

$ drush nagios-up all
ctools pathauto

$ drush nagios-up security
ctools

Ignore the pathauto update:

$ php -r "print json_encode(array('pathauto' => TRUE));" | drush vset --format=json nagios_ignored_modules -
nagios_ignored_modules was set to
array (
  'pathauto' => true,
).

$ drush nagios-up all
ctools

$ drush nagios-up security
ctools

Ignore the ctools security update:

$ php -r "print json_encode(array('ctools' => TRUE));" | drush vset --format=json nagios_ignored_modules -
nagios_ignored_modules was set to
array (
  'ctools' => true,
).

$ drush nagios-up all
pathauto

$ drush nagios-up security

Comments

galooph created an issue. See original summary.

galooph’s picture

StatusFileSize
new5.89 KB

Here's the patch, now that I know the nid for this issue :-)

galooph’s picture

Assigned: Unassigned » galooph

I'll carry on and work on getting nagios_status_page() to output the correct module update status.

galooph’s picture

Status: Active » Needs review
StatusFileSize
new21.34 KB

I've now got the nagios callback working properly with the ignored modules/themes, as far as I can tell.

With no modules ignored, visiting /nagios, I get:

nagios=CRITICAL, ADMIN:CRITICAL=Module and theme update status (ctools:NOT SECURE pathauto:NOT CURRENT), WATCHDOG:OK, CRON:OK | SAN=0;SAU=1;NOD=0;USR=1;MOD=20;THM=1

If I ignore ctools, I get:

nagios=WARNING, ADMIN:WARNING=Module and theme update status (pathauto:NOT CURRENT), WATCHDOG:OK, CRON:OK | SAN=0;SAU=1;NOD=0;USR=1;MOD=20;THM=1

and if I ignore pathauto, I get:

nagios=CRITICAL, ADMIN:CRITICAL=Module and theme update status (ctools:NOT SECURE), WATCHDOG:OK, CRON:OK | SAN=0;SAU=1;NOD=0;USR=1;MOD=20;THM=1

If I ignore both, I get:

nagios=OK, ADMIN:OK=No known issues at this time., WATCHDOG:OK, CRON:OK | SAN=0;SAU=1;NOD=0;USR=1;MOD=20;THM=1

galooph’s picture

Assigned: galooph » Unassigned
greg.harvey’s picture

I'm going to go ahead and commit this, because it's a shame if it doesn't make it in, and people using the D6 dev snapshot might benefit from this functionality. :-)

  • greg.harvey committed 124056e on 6.x-1.x authored by galooph
    Issue #2631892 by galooph: Backport of drush nagios-updates command to...
greg.harvey’s picture

Status: Needs review » Fixed

Done! I haven't tested this, but I know galooph has (we work together) and it'll only go into the dev snapshot for now, so any issues can be ironed out there, if there are any, and if anyone still cares about D6! :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.