1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Chl 169bd2913d nagios/glue_records: example in etc/ 2020-01-05 21:48:41 +01:00
Chl 554bebfe59 nagios/glue_records: small corr. 2020-01-05 21:29:44 +01:00
2 changed files with 5 additions and 3 deletions

View File

@ -102,8 +102,7 @@ while [ "$#" -gt 0 ]; do
fi
for IPADDR in $LIST_IP_NS_SERVERS; do
# Query our server
OUTPUT=$( dig @"$IPADDR" $DOMAIN SOA +short 2>&1 )
if [ "$?" -eq 0 ]; then
if OUTPUT=$( dig @"$IPADDR" $DOMAIN SOA +short 2>&1 ); then
# The server responded, store the SOA for later analyze
LIST_SOA="$( printf "%s\n%s" "$LIST_SOA" "$OUTPUT" | grep -v "^$" )"
else
@ -112,7 +111,7 @@ while [ "$#" -gt 0 ]; do
OUTPUT_DETAIL_CRITICAL="Problematic server behind IP"
OUTPUT_EXIT_STATUS=$STATE_CRITICAL
fi
OUTPUT_DETAIL_CRITICAL="$OUTPUT_DETAIL_CRITICAL $IPADDRESS"
OUTPUT_DETAIL_CRITICAL="$OUTPUT_DETAIL_CRITICAL $IPADDR"
fi
done

View File

@ -5,5 +5,8 @@ command[check_dns_zone_rrsig_examplenet]=/usr/local/share/scripts-admin/nagios/c
# + validité des noms de domaines
command[check_whois]=/usr/local/share/scripts-admin/nagios/check_whois -w 30d -c 10d example.net example.com example.org
# + accessibilité des serveurs pointés par les glue records
command[check_glue_records]=/usr/local/share/scripts-admin/nagios/check_glue_records.sh example.net
# Stats sur BIND9
command[check_bind9]=/usr/local/share/scripts-admin/nagios/check_bind9.pl --pid-path /var/run/named/named.pid --stats-path /var/cache/bind/named.stats --rndc-path /usr/sbin/rndc