diff options
-rwxr-xr-x | sitesummary-nodes | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes index 52a41e7..28f8d94 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -83,6 +83,12 @@ sub is_nagios_client { is_pkg_installed($hostid, "nagios3"); } +sub is_laptop { + my $hostid = shift; + my $path = get_filepath_current($hostid, "/system/laptop"); + return -e $path; +} + sub print_munin_list { for my $hostname (sort keys %hostnames) { next unless (is_munin_client($hostnames{$hostname})); @@ -160,6 +166,9 @@ sub generate_nagios_config { my $redirect = ""; my $remote = is_remote_nagios_client($hostid); + # Only check laptops that have the nagios tools installed + next if is_laptop($hostid) && ! $remote; + print <<EOF; ##################### $hostname ####################### EOF |