Add a check for broken /etc/hosts
authorPeter Palfrader <peter@palfrader.org>
Tue, 16 Jul 2013 12:49:34 +0000 (14:49 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 16 Jul 2013 12:49:34 +0000 (14:49 +0200)
config/nagios-master.cfg

index f2f43fa..415ffb3 100644 (file)
@@ -1931,6 +1931,12 @@ services:
     hostgroups: computers
     excludehosts: wagner, vasks
     normal_check_interval: 60
+  -
+    name: setup - local hostname etc-hosts
+    nrpe: 'if getent ahosts `hostname` | grep -q 127.0; then echo "Warning: local hostname resolves to 127/8 address"; exit 1; else echo "OK: Hostname resolves to non-127/8 address."; exit 1; fi'
+    hostgroups: computers
+    excludehosts: wagner, vasks
+    normal_check_interval: 60
   -
     name: setup - ud-ldap freshness
     nrpe: "/usr/lib/nagios/plugins/dsa-check-udldap-freshness"