mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Use exit status 0 for autoconf, provide reason for 'no' answer.
This commit is contained in:
parent
f9426daca5
commit
a86de7871a
16 changed files with 107 additions and 80 deletions
|
@ -9,15 +9,16 @@
|
||||||
#%# family=auto
|
#%# family=auto
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
command="/usr/bin/pdns_control list"
|
pdns_control="/usr/bin/pdns_control"
|
||||||
|
command="$pdns_control list"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/pdns_control ]; then
|
if [ -e "$pdns_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $pdns_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,16 @@
|
||||||
#%# family=auto
|
#%# family=auto
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
command="/usr/bin/pdns_control show"
|
pdns_control="/usr/bin/pdns_control"
|
||||||
|
command="$pdns_control show"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/pdns_control ]; then
|
if [ -e "$pdns_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $pdns_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,16 @@
|
||||||
#%# family=auto
|
#%# family=auto
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
command="/usr/bin/pdns_control show"
|
pdns_control="/usr/bin/pdns_control"
|
||||||
|
command="$pdns_control show"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/pdns_control ]; then
|
if [ -e "$pdns_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $pdns_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,16 @@
|
||||||
#%# family=auto
|
#%# family=auto
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
|
pdns_control="/usr/bin/pdns_control"
|
||||||
command="/usr/bin/pdns_control list"
|
command="/usr/bin/pdns_control list"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/pdns_control ]; then
|
if [ -e "$pdns_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $pdns_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -65,11 +67,11 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo a.value "$(rec_control get answers0-1)"
|
echo a.value "$($rec_control get answers0-1)"
|
||||||
echo b.value "$(rec_control get answers1-10)"
|
echo b.value "$($rec_control get answers1-10)"
|
||||||
echo c.value "$(rec_control get answers10-100)"
|
echo c.value "$($rec_control get answers10-100)"
|
||||||
echo d.value "$(rec_control get answers100-1000)"
|
echo d.value "$($rec_control get answers100-1000)"
|
||||||
echo e.value "$(rec_control get answers-slow)"
|
echo e.value "$($rec_control get answers-slow)"
|
||||||
echo f.value "$(rec_control get outgoing-timeouts)"
|
echo f.value "$($rec_control get outgoing-timeouts)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,17 +9,19 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RESENDS="$(rec_control get cache-resends)"
|
RESENDS="$($rec_control get cache-resends)"
|
||||||
ISRESENDS=""
|
ISRESENDS=""
|
||||||
[ "$RESENDS" != "UNKNOWN" ] && ISRESENDS="resends"
|
[ "$RESENDS" != "UNKNOWN" ] && ISRESENDS="resends"
|
||||||
|
|
||||||
|
@ -53,8 +55,8 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo hits.value "$(rec_control get cache-hits)"
|
echo hits.value "$($rec_control get cache-hits)"
|
||||||
echo misses.value "$(rec_control get cache-misses)"
|
echo misses.value "$($rec_control get cache-misses)"
|
||||||
[ "$RESENDS" != "UNKNOWN" ] && echo resends.value "$(rec_control get cache-resends)"
|
[ "$RESENDS" != "UNKNOWN" ] && echo resends.value "$($rec_control get cache-resends)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -39,7 +41,7 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo entries.value "$(rec_control get cache-entries)"
|
echo entries.value "$($rec_control get cache-entries)"
|
||||||
echo negative.value "$(rec_control get negcache-entries)"
|
echo negative.value "$($rec_control get negcache-entries)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -34,6 +36,6 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo concurrent.value "$(rec_control get concurrent-queries)"
|
echo concurrent.value "$($rec_control get concurrent-queries)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,10 +61,10 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo spoofs.value "$(rec_control get spoof-prevents)"
|
echo spoofs.value "$($rec_control get spoof-prevents)"
|
||||||
echo resource.value "$(rec_control get resource-limits)"
|
echo resource.value "$($rec_control get resource-limits)"
|
||||||
echo client.value "$(rec_control get client-parse-errors)"
|
echo client.value "$($rec_control get client-parse-errors)"
|
||||||
echo server.value "$(rec_control get server-parse-errors)"
|
echo server.value "$($rec_control get server-parse-errors)"
|
||||||
echo overflow.value "$(rec_control get tcp-client-overflow)"
|
echo overflow.value "$($rec_control get tcp-client-overflow)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +43,7 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo all.value "$(rec_control get all-outqueries)"
|
echo all.value "$($rec_control get all-outqueries)"
|
||||||
echo tcp.value "$(rec_control get tcp-outqueries)"
|
echo tcp.value "$($rec_control get tcp-outqueries)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -245,6 +247,6 @@ END {
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
rec_control get-qtypelist | awk "$awkscript"
|
"$rec_control" get-qtypelist | awk "$awkscript"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -34,6 +36,6 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo latency.value "$(rec_control get qa-latency)"
|
echo latency.value "$($rec_control get qa-latency)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +43,7 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo all.value "$(rec_control get questions)"
|
echo all.value "$($rec_control get questions)"
|
||||||
echo tcp.value "$(rec_control get tcp-questions)"
|
echo tcp.value "$($rec_control get tcp-questions)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -34,6 +36,6 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo throttled.value "$(rec_control get throttled-out)"
|
echo throttled.value "$($rec_control get throttled-out)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,13 +9,15 @@
|
||||||
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
# echo '[pdns_rec_*]' >/etc/munin/plugin-conf.d/pdns_rec
|
||||||
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
# echo 'user root' >>/etc/munin/plugin-conf.d/pdns_rec
|
||||||
|
|
||||||
|
rec_control="/usr/bin/rec_control"
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/rec_control ]; then
|
if [ -e "$rec_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $rec_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -47,8 +49,8 @@ if [ "$1" = "config" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo tcp.value "$(rec_control get unauthorized-tcp)"
|
echo tcp.value "$($rec_control get unauthorized-tcp)"
|
||||||
echo udp.value "$(rec_control get unauthorized-udp)"
|
echo udp.value "$($rec_control get unauthorized-udp)"
|
||||||
echo unexpected.value "$(rec_control get unexpected-packets)"
|
echo unexpected.value "$($rec_control get unexpected-packets)"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -9,16 +9,17 @@
|
||||||
#%# family=auto
|
#%# family=auto
|
||||||
#%# capabilities=autoconf
|
#%# capabilities=autoconf
|
||||||
|
|
||||||
command="/usr/bin/pdns_control show"
|
pdns_control="/usr/bin/pdns_control"
|
||||||
|
command="$pdns_control show"
|
||||||
state_file=$MUNIN_PLUGSTATE/pdns_rel.state
|
state_file=$MUNIN_PLUGSTATE/pdns_rel.state
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
if [ -e /usr/bin/pdns_control ]; then
|
if [ -e "$pdns_control" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo no
|
echo "no (missing $pdns_control)"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue