fix bsd and package name
This commit is contained in:
parent
8975ca2736
commit
2e6a0b9bc1
|
@ -27,7 +27,7 @@ if [[ -z $query_domain && ${query_domain+x} ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Perform DNS resolution check and measure the time
|
# Perform DNS resolution check and measure the time
|
||||||
start_time=$(date +%s%N)
|
start_time=$(date +%s)
|
||||||
|
|
||||||
if [[ -z "$dns_server" ]]; then
|
if [[ -z "$dns_server" ]]; then
|
||||||
# The DNS server was not provided.
|
# The DNS server was not provided.
|
||||||
|
@ -37,8 +37,8 @@ else
|
||||||
result=$(dig @$dns_server "$query_domain" +short)
|
result=$(dig @$dns_server "$query_domain" +short)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
end_time=$(date +%s%N)
|
end_time=$(date +%s)
|
||||||
response_time=$(((end_time - start_time) / 1000000))
|
response_time=$((end_time - start_time))
|
||||||
perfdata="response_time=${response_time}ms;${warning_time};${critical_time};0;"
|
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
|
||||||
|
|
|
@ -6,4 +6,4 @@ smartmontools
|
||||||
curl
|
curl
|
||||||
recode
|
recode
|
||||||
python3-pip
|
python3-pip
|
||||||
dig
|
dnsutils
|
||||||
|
|
Loading…
Reference in New Issue