check_bind.sh (Visit this link)
from 0 votessh compliant script to check whether BIND is running and to get the performance data via rndc stats (PNP Template included)
= Description =
check_bind.sh is a Nagios plugin to check the bind daemon whether it's running via its pid file and then gets the statistics via rndc stats. The user that run the script needs the ability to 'sudo rndc stats'! The timeframe in which the rndc stats output is updated is controlled by the check interval. The output shows amount of requests of various types occured during the last check interval. The script itself is written sh-compliant and free software under the terms of the GPLv2 (or later).
BIND9 versions 9.3 and 9.5 or greater are now supported as well. I didn't have the time yet to do more testing. It works for me under Gentoo with BIND 9.4 and 9.6 and under Debian Lenny with BIND 9.5 as well. If something doesn't work, please contact me via mike@matejunkie.com or via a blog comment at [http://www.matejunkie.com/]. Thanks in advance.
I finally solved the mawk/gawk problem with a little help from a user of this plugin. It should run now with either gawk or mawk without any problems.
= Version =
Version 1.3, 2009, Mike Adolphs (http://www.matejunkie.com/)
= -h/--help Output =
check_bind.sh -p/--path_pid /var/run/named -n/--name_pid named.pid -r/--path-rndc /usr/sbin -s/--path-stats /var/bind -V/--bind-version 9.3/9.4/9.5 -N
Options:
-p/--path-pid)
Path where the pid file for bind is stored. You might need to
alter this to your distribution's way of dealing with pid files.
Default is: /var/run/named
-n/--name_pid)
Name of the pid file. Default is: named.pid
-r/--path-rndc)
Path where the rndc binary is located. Default is: /usr/sbin
-s/--path-stats)
Path where the named.stats file is stored. Default is:
/var/bind
-t/--path-tmp)
Path where the temporary named.stats excerpt is being stored.
Default is: /tmp
-V/--bind-version)
Specifies the bind version you're running. Currently there's
BIND 9.3, 9.4 and 9.5 supported. Default is: 9.4
-N/--no-pid-check)
If you don't want that the script checks for the pid file,
use this option. Default is: off
= Output example =
user@host ~ $ ./check_bind.sh
Bind9 is running. 640 successfull requests, 0 referrals, 3 nxdomains since last check. | 'success'=640 'referral'=0 'nxrrset'=236 'nxdomain'=3 'recursion'=1 'failure'=0 'duplicate'=0 'dropped'=0
= Changelog =
* 2009-05-20
* Bugfix for more awk compliance
* 2009-05-14
* Small bugfix for two exit codes
* 2009-05-03
* The plugin now supports BIND versions 9.3 and 9.5+.
* The named.stats file is now initially parsed via awk and the excerpts are being copied to a temp directory for further use instead of frequently tail'ing the named.stats
* The temporary directory is configurable via -t/--path-tmp as well
* The path to the rndc binary is now configurable via -r/--path-rndc
* You're now able to deactivate the pid check via -N/--no-pid-check
* 2009-04-06
* Did some slight debugging on the option parsing. The -s/--path-stats option was missing. Should be working now just fine.
check_bind.sh is a Nagios plugin to check the bind daemon whether it's running via its pid file and then gets the statistics via rndc stats. The user that run the script needs the ability to 'sudo rndc stats'! The timeframe in which the rndc stats output is updated is controlled by the check interval. The output shows amount of requests of various types occured during the last check interval. The script itself is written sh-compliant and free software under the terms of the GPLv2 (or later).
BIND9 versions 9.3 and 9.5 or greater are now supported as well. I didn't have the time yet to do more testing. It works for me under Gentoo with BIND 9.4 and 9.6 and under Debian Lenny with BIND 9.5 as well. If something doesn't work, please contact me via mike@matejunkie.com or via a blog comment at [http://www.matejunkie.com/]. Thanks in advance.
I finally solved the mawk/gawk problem with a little help from a user of this plugin. It should run now with either gawk or mawk without any problems.
= Version =
Version 1.3, 2009, Mike Adolphs (http://www.matejunkie.com/)
= -h/--help Output =
check_bind.sh -p/--path_pid /var/run/named -n/--name_pid named.pid -r/--path-rndc /usr/sbin -s/--path-stats /var/bind -V/--bind-version 9.3/9.4/9.5 -N
Options:
-p/--path-pid)
Path where the pid file for bind is stored. You might need to
alter this to your distribution's way of dealing with pid files.
Default is: /var/run/named
-n/--name_pid)
Name of the pid file. Default is: named.pid
-r/--path-rndc)
Path where the rndc binary is located. Default is: /usr/sbin
-s/--path-stats)
Path where the named.stats file is stored. Default is:
/var/bind
-t/--path-tmp)
Path where the temporary named.stats excerpt is being stored.
Default is: /tmp
-V/--bind-version)
Specifies the bind version you're running. Currently there's
BIND 9.3, 9.4 and 9.5 supported. Default is: 9.4
-N/--no-pid-check)
If you don't want that the script checks for the pid file,
use this option. Default is: off
= Output example =
user@host ~ $ ./check_bind.sh
Bind9 is running. 640 successfull requests, 0 referrals, 3 nxdomains since last check. | 'success'=640 'referral'=0 'nxrrset'=236 'nxdomain'=3 'recursion'=1 'failure'=0 'duplicate'=0 'dropped'=0
= Changelog =
* 2009-05-20
* Bugfix for more awk compliance
* 2009-05-14
* Small bugfix for two exit codes
* 2009-05-03
* The plugin now supports BIND versions 9.3 and 9.5+.
* The named.stats file is now initially parsed via awk and the excerpts are being copied to a temp directory for further use instead of frequently tail'ing the named.stats
* The temporary directory is configurable via -t/--path-tmp as well
* The path to the rndc binary is now configurable via -r/--path-rndc
* You're now able to deactivate the pid check via -N/--no-pid-check
* 2009-04-06
* Did some slight debugging on the option parsing. The -s/--path-stats option was missing. Should be working now just fine.
Submitted by: Mike Adolphs
Hits: 1097
Overall downloads: 417
Added: 2009-03-19 00:00:00
Last Modified: 2009-12-16 15:23:20
| Filename | Preview | Size | Description | DL |
|---|---|---|---|---|
| check_bind.sh | ![]() |
11 kb | The script (Version 1.3) | 536 |
| LICENSE | 53 kb | The appropriate license | 143 | |
| check_bind.php | 3 kb | The PNP Template | 307 |
Comments
Be the first to comment this project.
Leave a reply
If you just want to rate the project leave the other field empty.
Even though it would be nice if you would drop a line.
-
Check SNMP Citrix
from 0 votesCheck Citrix Server Connection Information via SNMP. Extra OID's available through snmp4ctx package (http://www.wtcs.org/snmp4tpc/snmp4ctx.htm) -
check_squid
from 0 votescheck_squid is a plugin to nagios for monitoring Squid by using squidclient -
Check an IIS Application pool state
from 0 votesThis plugin checks for the state of an IIS application pool. -
Siebel CRM monitoring for all platforms
from 0 votesMonitoring of Siebel CRM Application (check of components, tasks, gateway, application server, logfiles and autorestart for components). So far the only Nagios plugin available for Siebel. -
EMC Documentum monitor
from 0 votesA collection of nagios check plugins for EMC Documentum
-
check_gms_directory_entries
from 0 votesThe GMS (Global Management System) from Polycom provides a global addressbook service for conferencing endpoints. This script checks for a given number of entries in the global addressbook. -
check_jmxproxy
from 0 votesA Nagios plugin (script) that queries mbean information through tomcats JMXProxyServlet. -
Sun Grid Engine with qping
from 0 votesCheck Sun Grid Engine Daemons using qping(1). -
FlexLM
4 from 1 votesCheck flexlm license server and return total license and license in use (Also use Performance data). -
check_virsh
from 0 votesScript to check KVM's hosts




