diff options
| -rw-r--r-- | README | 17 | ||||
| -rwxr-xr-x | sitesummary-nodes | 6 | 
2 files changed, 20 insertions, 3 deletions
@@ -94,6 +94,23 @@ to use instead of the value in system/hostname.  For this to work, the new-name entry must map to a IP address, either  in DNS via an entry in /etc/hosts. +Ignoring specific Nagios checks for some hosts +---------------------------------------------- + +Some times a machine have a package installed that cause some Nagios +test to be enabled, but the service provided by the package is +disabled and the check always fail.  In this case, the Nagios test can +be disabled using the /etc/sitesummary/nagiosignore file. + +For example, to disable the DHCP check for a given host, add the +hostname and the Nagios check description to +/etc/sitesummary/nagiosignore like this: + +  some.nagios.host.com process - dhcpd3 + +The nagios description can be found in +/var/lib/sitesummary/nagios-generated.cfg. +  Design draft  ------------  system to collect key info about all the machines on a site, to help diff --git a/sitesummary-nodes b/sitesummary-nodes index 3c439a9..ab2ecf1 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -51,8 +51,8 @@ if ($opts{'h'}) {      if (open(my $fh, $nagiosignorefile)) {          while (<$fh>) {              chomp; -            my ($hostname, $nagioscheck) = split(/:/); -            $nagios_ignore{"$hostname:$nagioscheck"} = 1; +            my ($hostname, $nagioscheck) = split(/ /, $_, 2); +            $nagios_ignore{"$hostname $nagioscheck"} = 1;          }          close $fh;      } @@ -185,7 +185,7 @@ sub print_nagios_service_check {      my ($remote, $hostname, $description, $check, $check_args) = @_;      my $template = "server-service"; -    return if exists $nagios_ignore{"$hostname:$check"}; +    return if exists $nagios_ignore{"$hostname $description"};      my $cmd;      if ($remote) {          $cmd = "check_nrpe!$check";  | 
