aboutsummaryrefslogtreecommitdiffstats
path: root/sitesummary-nodes
diff options
context:
space:
mode:
Diffstat (limited to 'sitesummary-nodes')
-rwxr-xr-xsitesummary-nodes9
1 files changed, 8 insertions, 1 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes
index 1c3b0df..8fd3478 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -25,7 +25,7 @@ if ($opts{'m'}) {
sub handle_host {
my $hostid = shift;
my $hostname = get_hostname($hostid);
- $hostnames{$hostname} = 1;
+ $hostnames{$hostname} = $hostid;
}
sub print_list {
@@ -34,8 +34,15 @@ sub print_list {
}
}
+sub is_munin_client {
+ my $hostid = shift;
+ # Should check debian/dpkg-l for 'ii *munin-node '
+ 1; # Assume all nodes are munin nodes for now
+}
+
sub print_munin_list {
for my $hostname (sort keys %hostnames) {
+ return unless (is_munin_client($hostnames{$hostname}));
# Using hostname as address, to avoid hardcoding IP addresses in
# the file. Might be an idea to fetch the IP address from