diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-01-26 11:15:25 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-01-26 11:15:25 +0000 |
commit | f6b7ad7f6a33b76c17d2450ff895898d3cd4c540 (patch) | |
tree | 3c1984a8b224034be728dbca91afde31591d9a2e /sitesummary-nodes | |
parent | c83aca7e7b7fd38e45b2a2738fa156df76f8e507 (diff) | |
download | sitesummary-f6b7ad7f6a33b76c17d2450ff895898d3cd4c540.tar.gz sitesummary-f6b7ad7f6a33b76c17d2450ff895898d3cd4c540.tar.bz2 sitesummary-f6b7ad7f6a33b76c17d2450ff895898d3cd4c540.tar.xz |
* New function get_debian_ver() reporting /etc/debian_release conten
in SiteSummary perl module.
* Create Nagios hostclass using the result from get_debian_ver().
Diffstat (limited to 'sitesummary-nodes')
-rwxr-xr-x | sitesummary-nodes | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes index 231cb4c..b4bffdc 100755 --- a/sitesummary-nodes +++ b/sitesummary-nodes @@ -241,12 +241,15 @@ sub generate_nagios_config { my $site = get_site($hostid) || "none"; my $sitegroup = get_sitegroup($hostid); + my $debversion = get_debian_ver($hostid); my $eduprofile = get_debian_edu_profile($hostid); my $eduversion = get_debian_edu_ver($hostid); push(@groups, nagios_hostgroup_namewash("site-$site")); if ($sitegroup) { push(@groups, nagios_hostgroup_namewash("site-$site-$sitegroup")); } + push(@groups, nagios_hostgroup_namewash("debian-version-$debversion")) + if defined $debversion; if ($eduprofile) { $eduprofile =~ s/^"|"$//g; # Remove "" around the values for my $profile (split(/,\s*/, $eduprofile)) { |