aboutsummaryrefslogtreecommitdiffstats
path: root/sitesummary-nodes
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2007-07-02 23:04:00 +0000
committerPetter Reinholdtsen <pere@hungry.com>2007-07-02 23:04:00 +0000
commitbd8862b6b69e4e72331ab4ac2f3dac851a288c14 (patch)
treed57ea3af359672f9f377202b25c67687e58ab04f /sitesummary-nodes
parent178079b26776121f68fcef4067648a9c90d264b9 (diff)
downloadsitesummary-bd8862b6b69e4e72331ab4ac2f3dac851a288c14.tar.gz
sitesummary-bd8862b6b69e4e72331ab4ac2f3dac851a288c14.tar.bz2
sitesummary-bd8862b6b69e4e72331ab4ac2f3dac851a288c14.tar.xz
* Add draft function is_munin_client() to sitesummary-nodes. It
should be used to only list the clients with the munin-node package installed in the munin configuration.
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