check_bind.sh (Visit this link)

rating from 0 votes
sh 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.

Submitted by: Mike Adolphs
Hits: 557
Overall downloads: 134
Added: 2009-03-19 00:00:00
Last Modified: 2009-12-16 15:23:20

Filename Preview Size Description DL
check_bind.sh Preview 11 kb The script (Version 1.3) 389
LICENSE 53 kb The appropriate license 101
check_bind.php 3 kb The PNP Template 213

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.

Allowed tags: blockquote, strong, a, b, i, u, code

Captcha Reload Image


  • Check SNMP Citrix

    rating from 0 votes
    Check Citrix Server Connection Information via SNMP. Extra OID's available through snmp4ctx package (http://www.wtcs.org/snmp4tpc/snmp4ctx.htm)
  • check_squid

    rating from 0 votes
    check_squid is a plugin to nagios for monitoring Squid by using squidclient
  • Siebel CRM

    rating from 0 votes
    Monitoring of Siebel CRM Application.
  • Check an IIS Application pool state

    rating from 0 votes
    This plugin checks for the state of an IIS application pool.
  • check_conntrack.sh

    rating from 0 votes
    A plugin to check the conntrack table.
  • CA ARCserve Backup r12 Number of Job Error Check

    rating from 0 votes
    CA ARCserve Backup r12 number of job error check using the ca_qmgr.exe cli tool.
  • check_otrs_user.pl

    rating from 0 votes
    Even if you wanne know how many users are still logged in on your OTRS installation you can just take a look at the session management through OTRS. Specially you want to know through which times the most users are online you may look into the weblogs of your webserver. Just in case you need to know how many agents and customers are logged in through 24h / 7days a week you need this plugin.
  • check_hadoop-dfs.sh

    rating from 0 votes
    sh-compliant script to check the amount of available datanodes of a Hadoop cluster and its total and used size as well.
  • check_jmxproxy

    rating from 0 votes
    A Nagios plugin (script) that queries mbean information through tomcats JMXProxyServlet.
  • Red Hat Cluster Suite Check

    rating from 0 votes
    A python script to check the status of a RH cluster and a named service.
Catalot 1.3.0 (appkit/v0.9.0-dev, Agavi/1.0.0) | www.netways.de | Legal
© 2009 NETWAYS GmbH. The Program is provided AS IS, without warranty. Licensed under GPLv3.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.