[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.8-5-g082765c

Andreas B. Mundt andi at debian.org
Tue Mar 19 20:21:34 UTC 2013


The following commit has been merged in the master branch:
commit 3e44eea2e1ca9250d1f9ddaec7012e7cfcb060c0
Author: Andreas B. Mundt <andi at debian.org>
Date:   Tue Mar 19 20:42:29 2013 +0100

    Improved monitoring:  Add more checks to icinga.
    
    Add host 'gateway' and check internet connectivity.
    Checks for CUPS, DNS and Squid.

diff --git a/fai/config/files/etc/icinga/objects/commands.cfg/LOG_SERVER b/fai/config/files/etc/icinga/objects/commands.cfg/LOG_SERVER
index 795d749..0ed422c 100644
--- a/fai/config/files/etc/icinga/objects/commands.cfg/LOG_SERVER
+++ b/fai/config/files/etc/icinga/objects/commands.cfg/LOG_SERVER
@@ -9,6 +9,11 @@ define command{
 }
 
 define command{
-        command_name    debian-lan_check-nfs
+        command_name    debian-lan_check_nfs
         command_line    /usr/lib/nagios/plugins/check_rpc -H '$HOSTADDRESS$' -C nfs -c2,3,4
 }
+
+define command{
+        command_name    debian-lan_check_internet
+        command_line    /usr/lib/nagios/plugins/check_ping -H '$ARG1$' -w 50,10% -c 100,100% -p 5
+}
diff --git a/fai/config/files/etc/icinga/objects/hostgroups_icinga.cfg/LOG_SERVER b/fai/config/files/etc/icinga/objects/hostgroups_icinga.cfg/LOG_SERVER
index 356f5f1..d6e1a43 100644
--- a/fai/config/files/etc/icinga/objects/hostgroups_icinga.cfg/LOG_SERVER
+++ b/fai/config/files/etc/icinga/objects/hostgroups_icinga.cfg/LOG_SERVER
@@ -49,6 +49,18 @@ define hostgroup {
        members           mainserver
 }
 
+define hostgroup {
+       hostgroup_name    cups-servers
+       alias             CUPS servers
+       members           mainserver
+}
+
+define hostgroup {
+       hostgroup_name    dns-servers
+       alias             DNS
+       members           mainserver
+}
+
 #### workstations and diskless ####
 define hostgroup {
        hostgroup_name    workstation
diff --git a/fai/config/files/etc/icinga/objects/hosts.cfg/LOG_SERVER b/fai/config/files/etc/icinga/objects/hosts.cfg/LOG_SERVER
index 1495e20..93e70b7 100644
--- a/fai/config/files/etc/icinga/objects/hosts.cfg/LOG_SERVER
+++ b/fai/config/files/etc/icinga/objects/hosts.cfg/LOG_SERVER
@@ -1,5 +1,11 @@
 define host{
         use           generic-host
+        host_name     gateway
+        address       $GATEWAY
+}
+
+define host{
+        use           generic-host
         host_name     mainserver
         address       127.0.0.1
 }
diff --git a/fai/config/files/etc/icinga/objects/services_icinga.cfg/LOG_SERVER b/fai/config/files/etc/icinga/objects/services_icinga.cfg/LOG_SERVER
index 091376c..11262f5 100644
--- a/fai/config/files/etc/icinga/objects/services_icinga.cfg/LOG_SERVER
+++ b/fai/config/files/etc/icinga/objects/services_icinga.cfg/LOG_SERVER
@@ -37,7 +37,28 @@ define service{
 define service{
         hostgroup_name         nfs-servers
         service_description    NFS
-        check_command          debian-lan_check-nfs
+        check_command          debian-lan_check_nfs
+        use                    generic-service
+}
+
+define service{
+        hostgroup_name         cups-servers
+        service_description    CUPS
+        check_command          check_cups
+        use                    generic-service
+}
+
+define service{
+        hostgroup_name         dns-servers
+        service_description    DNS extern
+        check_command          check_dns
+        use                    generic-service
+}
+
+define service{
+        hostgroup_name         dns-servers
+        service_description    DNS intern
+        check_command          check_dig!'domain.intern'
         use                    generic-service
 }
 
@@ -97,6 +118,27 @@ define service{
         use                    generic-service
 }
 
+define service{
+        host                   mainserver
+        service_description    Squid
+        check_command          check_squid!3128!'http://www.intern'
+        use                    generic-service
+}
+
+#### gateway
+define service{
+        host                   gateway
+        service_description    Alive
+        check_command          check-host-alive
+        use                    generic-service
+}
+
+define service{
+        host                   gateway
+        service_description    Internet
+        check_command          debian-lan_check_internet!8.8.8.8
+        use                    generic-service
+}
 
 #### nrpe (remote) machines
 define service{
diff --git a/fai/config/files/var/www/index.html/GOSA b/fai/config/files/var/www/index.html/GOSA
index b5b77eb..32ef835 100644
--- a/fai/config/files/var/www/index.html/GOSA
+++ b/fai/config/files/var/www/index.html/GOSA
@@ -4,11 +4,12 @@
 <p>Available services:</p>
 <ul>
 <li><a href="https://www.intern/gosa">GOsa System Administration</a></li>
-<li><a href="https://syslog.intern/munin">Munin System Monitoring</a></li>
+<li><a href="https://print.intern:631">CUPS Print-Server Administration</a></li>
+<li><a href="http://aptcache.intern:3142/acng-report.html">Apt-Cacher-NG
+    Maintenance</a></li>
 <li><a href="https://syslog.intern/icinga">ICINGA System Monitoring</a></li>
-<li><a href="https://print.intern:631">CUPS Print-Server</a></li>
-<li><a href="http://aptcache.intern:3142/acng-report.html">Apt-Cacher NG</a></li>
+<li><a href="https://syslog.intern/munin">Munin System Monitoring</a></li>
 </ul>
-For more information, take a look at the
+More information is available in the
 <a href="http://wiki.debian.org/DebianLAN">Debian-LAN Wiki</a>.
 </body></html>
diff --git a/fai/config/package_config/LOG_SERVER b/fai/config/package_config/LOG_SERVER
index 170a712..d34937b 100644
--- a/fai/config/package_config/LOG_SERVER
+++ b/fai/config/package_config/LOG_SERVER
@@ -10,5 +10,6 @@ nagios-images
 nagios-plugins-standard
 nagios-nrpe-plugin
 
+dnsutils
 smartmontools
 lm-sensors
diff --git a/fai/config/scripts/LOG_SERVER/10-rsyslog_icinga.conf b/fai/config/scripts/LOG_SERVER/10-rsyslog_icinga.conf
index 41b73b2..27dbe82 100755
--- a/fai/config/scripts/LOG_SERVER/10-rsyslog_icinga.conf
+++ b/fai/config/scripts/LOG_SERVER/10-rsyslog_icinga.conf
@@ -13,5 +13,6 @@ fcopy /etc/icinga/objects/commands.cfg
 if [ "$FAI_ACTION" == "install" ] || [ "$CONVERT" == "true" ] ; then
     ## Machines are added here, so do not overwrite them on softupdate:
     fcopy /etc/icinga/objects/hosts.cfg
+    sed -i "s#\$GATEWAY#$GATEWAY#" $target/etc/icinga/objects/hosts.cfg
     mv $target/etc/icinga/objects/localhost_icinga.cfg $target/etc/icinga/objects/localhost_icinga.cfg_orig || true
 fi

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list