nagios with DNS and Squid

154 views
Skip to first unread message

niraj vara

unread,
Jul 9, 2009, 9:03:05 AM7/9/09
to vglug
Dear ALl

              How can I add the squid and DNS services   in nagios and How Can I add all the partition details on nagios as default it show only root partition.

--
Niraj M. Vara
Linux Administrator
Indian  Institute of Management  Ahmedabad
Mobile : 9898221954

"DON'T TELL ME THE SKY IS THE LIMIT, THERE ARE FOOTPRINTS ON THE MOON"

sanjay dalal

unread,
Jul 9, 2009, 9:17:26 AM7/9/09
to VG...@googlegroups.com
Hi,
Try to use nagios plugins check_dns and check_squid.
--
Thanks & Regards,
Sanjay B. Dalal
Technology Specialist

http://sanjaybdalal.wordpress.com
Cell No: +919879398662

sanjay dalal

unread,
Jul 9, 2009, 9:34:56 AM7/9/09
to VG...@googlegroups.com
Hi,

For disk check up try out below procedure will help you to configure /home partition monitor setup.

Step 1  : Edit /etc/nagios/checkcommands.cfg:

 

# 'check_local_disk' command definition

 

define command{

                                command_name    check_local_disk

                                command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$

                                                }

 

Step 2 : open up /etc/nagios/commands.cfg

# Command used to check disk space usage on local partitions

 

define command{

                                command_name   check_local_disk

                                command_line   $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$

                                                }

 

Note : commands.cfg entry can be copied directly from checkcommands.cfg

 

Step 3 : edit /etc/nagios/services-servers.cfg

 

# Define a service to check the disk space of the root partition

# on the local machine.  Warning if < 20% free, critical if

# < 10% free space on partition.

 

define service{

        use                             generic-service         ; Name of service template to use

        host_name                                 hostname.com

        service_description                Home Partition

        is_volatile                                    0

        check_period                            24x7

        max_check_attempts            4

        normal_check_interval         5

        retry_check_interval            1

        contact_groups                     admins

   notification_options                    w,u,c,r

        notification_interval           960

        notification_period             24x7

   check_command         check_local_disk!20%!10%!/home

        }

 

Step : 4 Try to test your configuration

#nagios -v nagios.cfg

 

Step 5 : Restart Nagios

                #/etc/init.d/nagios restart



On Thu, Jul 9, 2009 at 6:33 PM, niraj vara <niraj...@gmail.com> wrote:

niraj vara

unread,
Jul 10, 2009, 4:15:56 AM7/10/09
to VG...@googlegroups.com
when I add the check_dns I am getting the following error

Error: Service check command 'check_dns' specified in service 'DNS' for host 'iimdns.iimahd.ernet.in' not defined anywhere!

sanjay dalal

unread,
Jul 10, 2009, 5:53:17 AM7/10/09
to VG...@googlegroups.com
HI,
There is should be some problem in configuration files. 
Please check out your configuration files twice.

sanjay dalal

unread,
Jul 10, 2009, 6:12:15 AM7/10/09
to VG...@googlegroups.com
hi 
Follow below steps to setup check_dns it may be helpful to you.

Step 1 : iimdns.iimahd.ernet.in DNS servers specified in the IP

 #/usr/local/nagios/libexec/check_dns -s Ipaddrss -h imdns.iimahd.ernet.in

Step 2 : Checkcommands.cfg file

 #vi  /usr/local /nagios/etc/checkcommands.cfg

 

# 'Check_dns' command definition

  define command (

          command_name check_dns

          command_line $ USER1 $ / check_dns-s $ HOSTADDRESS $-H $ ARG1 $

          )

#Definition of Service

  define service (

          use generic-service

          host_name hoge

          service_description DNS imdns.iimahd.ernet.in

          is_volatile 0

          check_period 24x7

          max_check_attempts 3

          normal_check_interval 5

          retry_check_interval 1

          notification_interval 240

          notification_period 24x7

          notification_options c, r

          check_command check_dns! imdns.iimahd.ernet.in

          contact_groups linux-admins

          ) 


Reply all
Reply to author
Forward
0 new messages