diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | sitesummary-nodes | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 98a7d8b..e82d28d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ sitesummary (0.0.74) UNRELEASED; urgency=low * Add munin include dir to default munin config to match recent munin versions. - * Ignore devtmpfs in Nagios configuration, the same way tmpfs is - ignored. + * Autogenerated Nagios configuration: + - Ignore devtmpfs, the same way tmpfs is ignored. + - Only check Linux software RAID if a RAID is enabled and not only + when /proc/mdstat is present. -- Petter Reinholdtsen <pere@debian.org> Thu, 22 Dec 2011 18:52:10 +0100 diff --git a/sitesummary-nodes b/sitesummary-nodes index fd6be45..e8695ac 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -398,10 +398,15 @@ sub generate_nagios_config { "check_imaps") if is_pkg_installed($hostid, "courier-imap-ssl"); - # check software raid status - if ( -e get_filepath_current($hostid, "/system/mdstat") ) { - print_nagios_service_check($remote, $hostname, "sw-raid", - "check_linux_raid"); + # check software raid status if any is active + if ( -e get_filepath_current($hostid, "/system/mdstat")) { + my $fh; + if (open($fh, get_filepath_current($hostid, "/system/mdstat")) && + grep(/^md\d+ :/, <$fh>)) { + print_nagios_service_check($remote, $hostname, "sw-raid", + "check_linux_raid"); + } + close($fh); } # Check NFS server |