From 3c0d3b0b90b7b0e04998bac4e4ccf07378180848 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 16 Jul 2013 14:49:34 +0200 Subject: [PATCH] Add a check for broken /etc/hosts --- config/nagios-master.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/nagios-master.cfg b/config/nagios-master.cfg index f2f43fa..415ffb3 100644 --- a/config/nagios-master.cfg +++ b/config/nagios-master.cfg @@ -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" -- 2.20.1