check_dns: remove perfdata from time out message
This commit is contained in:
parent
3fd160c31b
commit
e709683320
|
@ -43,7 +43,7 @@ perfdata="response_time=${response_time}ms;${warning_time};${critical_time};0;"
|
||||||
|
|
||||||
# Check response time against warning and critical levels
|
# Check response time against warning and critical levels
|
||||||
if [ -z "$result" ] || echo "$result" | grep -Eq "(no servers could be reached|communications error)"; then
|
if [ -z "$result" ] || echo "$result" | grep -Eq "(no servers could be reached|communications error)"; then
|
||||||
echo "CRITICAL - DNS resolution failed for $query_domain on $dns_server | $perfdata"
|
echo "CRITICAL - DNS resolution failed for $query_domain on $dns_server"
|
||||||
exit 2
|
exit 2
|
||||||
elif [ "$critical_time" -gt 0 ] && [ "$response_time" -gt "$critical_time" ]; then
|
elif [ "$critical_time" -gt 0 ] && [ "$response_time" -gt "$critical_time" ]; then
|
||||||
echo "CRITICAL - DNS resolution took ${response_time}ms for $query_domain on $dns_server | $perfdata"
|
echo "CRITICAL - DNS resolution took ${response_time}ms for $query_domain on $dns_server | $perfdata"
|
||||||
|
|
Loading…
Reference in New Issue