1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

Merge pull request #1492 from cweiske/dnsperftest-limit

[dns/dnsperftest] add warning and critical configuration
This commit is contained in:
Kenyon Ralph 2025-04-18 11:46:48 -07:00 committed by GitHub
commit ee92c4e999
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,8 @@ Example configuration:
[dnsperftest]
env.resolvconf /etc/resolv.conf.cweiske
env.domains fsf.org fsfe.org munin-monitoring.org
env.warning 0.2
env.critical 0.9
=head1 AUTHORS
@ -83,6 +85,13 @@ if [ "$1" == "config" ]; then
for nameserverIp in $NAMESERVERS; do
fieldname=$(echo "$nameserverIp" | sed 's/[.:]/_/g')
echo "ns$fieldname.label $nameserverIp"
if [ ! -z "$warning" ]; then
echo "ns$fieldname.warning $warning"
fi
if [ ! -z "$critical" ]; then
echo "ns$fieldname.critical $critical"
fi
done
exit 0
fi