nagios/glue_records: small corr.
This commit is contained in:
parent
8e37cb2478
commit
554bebfe59
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue