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