1837400 Members
3377 Online
110116 Solutions
New Discussion

Re: monitor dns process

 
lin.chen
Frequent Advisor

monitor dns process

i need a script to monitor dns process.
so i can find whether the dns process is running normally.i need the script can echo the result on customer's consle.
could you give me some solution!
thanks
4 REPLIES 4
inventsekar_1
Respected Contributor

Re: monitor dns process

ps -ef|grep named
root 14361 14303 1 13:58:57 pts/ta 0:00 grep named

with the ps -ef, u can check whether process is running or not.

wait for others msg on "how to echo it to the customer console"
Be Tomorrow, Today.
Ralph Grothe
Honored Contributor

Re: monitor dns process

Run a name lookup against the to be monitored nameserver.
This is the way the Nagios check_dns plug-in is supposed to be executed.


$ ~nagios/libexec/check_dns --help
check_dns (nagios-plugins 1.4) 1.47
Copyright (c) 1999 Ethan Galstad
Copyright (c) 2000-2004 Nagios Plugin Development Team


This plugin uses the nslookup program to obtain the IP address
for the given host/domain query. A optional DNS server to use may
be specified. If no DNS server is specified, the default server(s)
specified in /etc/resolv.conf will be used.

Usage: check_dns -H host [-s server] [-a expected-address] [-A] [-t timeout]

Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-H, --hostname=HOST
The name or address you want to query
-s, --server=HOST
Optional DNS server you want to use for the lookup
-a, --expected-address=IP-ADDRESS
Optional IP address you expect the DNS server to return
-A, --expect-authority
Optionally expect the DNS server to be authoritative for the lookup
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)

Send email to nagios-users@lists.sourceforge.net if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to nagiosplug-devel@lists.sourceforge.net
Madness, thy name is system administration
spex
Honored Contributor

Re: monitor dns process

Hi,

cron the following to execute periodically:

(UNIX95=1 ps -o comm= -C named) || (echo "named not running! Attempting restart." > /dev/console && /sbin/init.d/named start)

PCS
Steven E. Protter
Exalted Contributor

Re: monitor dns process

Shalom lin.chen,

You can bump up logging and get more data to your users console.

http://www.zytrax.com/books/dns/ch7/logging.html

http://www.netadmintools.com/art233.html

I like the second option better than the first.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com