2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/pdns/pdns_latency

41 lines
963 B
Plaintext
Raw Normal View History

2007-05-22 09:33:43 +02:00
#!/bin/bash
#
# Script to monitor PowerDNS performance
#
# Parameters understood:
#
# config (required)
# autoconf (optional - used by munin-config)
#%# family=auto
#%# capabilities=autoconf
pdns_control="/usr/bin/pdns_control"
command="$pdns_control show"
2007-05-22 09:33:43 +02:00
if [ "$1" = "autoconf" ]; then
if [ -e "$pdns_control" ]; then
echo yes
exit 0
else
echo "no (missing $pdns_control)"
exit 0
fi
2007-05-22 09:33:43 +02:00
fi
if [ "$1" = "config" ]; then
echo 'graph_title Power DNS latency'
echo 'graph_args -l 0'
echo 'graph_vlabel usec'
echo 'graph_category dns'
2007-05-22 09:33:43 +02:00
echo 'graph_info This graph shows Power DNS latency on the machine.'
echo 'latency.label latency'
echo 'latency.info Average number of microseconds needed to answer a question'
echo 'latency.type GAUGE'
exit 0
fi
echo "latency.value $($command latency)"