check_ping to monitor all IP's of a firewall

Marouane HIMDI marouane.himdi at kereval.com
Thu Mar 5 10:22:18 CET 2009


You should do as Kevin suggested or you can define one service that check if
all interfaces of the firewall are up (there are many plugins which address
this issue)


Best regards


Dr Marouane HIMDI
Ingénieur R&D/R&D Engineer
 

KEREVAL
4, rue Hélène Boucher
Z.A. Bellevue
35235 Thorigné Fouillard 
Tel : +33 (0)2 23 20 36 64
http://www.kereval.com
 
P Pensez à l'environnement : n'imprimez ce message et ses pièces jointes que
si nécessaire !

-----Message d'origine-----
De : Kevin Keane [mailto:subscription at kkeane.com] 
Envoyé : jeudi 5 mars 2009 09:57
Cc : Nagios Users Mailinglist
Objet : Re: [Nagios-users] check_ping to monitor all IP's of a firewall

You can do the same thing in services as you did in hosts. First, define 
a new check command in commands.cfg:

# 'check_ping_ip' command definition
define command{
        command_name    check_ping_ip
        command_line    $USER1$/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$ 
-p 5
        }

And then add the services you need:

define host {
     host_name Prod-firewall
     use generic-switch
     address xx.xx.xx.40
     hostgroups firewall
}

define service {
    host_name Prod-firewall
    service_Description Ping_1
    use generic-service
    check_period       24x7
    notification-interval 240
    notification_period 24x7
    check_command check_ping_ip!xx.xx.xx.40!3000.0,80%!5000.0,100%
}


define service {
    host_name Prod-firewall
    service_Description Ping_1
    use generic-service
    check_period       24x7
    notification-interval 240
    notification_period 24x7
    check_command check_ping_ip!xx.xx.xx.41!3000.0,80%!5000.0,100%
}

and so on

asam30 at gmail.com wrote:
> Hi,
>
> I've a question on how to monitor multiple IP's of a firewall device 
> using check_ping in Nagios. Example, I have a firewall (prod-fireall) 
> has 6 ip's associated with it so in host.cfg i should do like this
>
> define host{
>           host_name       Prod-firewall-0
>           use             generic-switch
>           address         xx.xx.xx.40
>           hostgroups      firewall
>           }
>
> define host{
>           host_name       Prod-firewall-1
>           use             generic-switch
>           address         xx.xx.xx.41
>           hostgroups      firewall
>           }
> define host{
>           host_name       Prod-firewall-2
>           use             generic-switch
>           address         xx.xx.xx.42
>           hostgroups      firewall
>           }
> like I need to assign different hostname per each ip address but in 
> the nagios interface, this looks a long list of host name that we dont 
> want to have. Is there any way that I can have a single hostname 
> showing in nagios interface and that should monitor all IPs associated 
> with it?
>
-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think
About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or
proprietary information. Please be advised that the unauthorized use or
disclosure of the information is strictly prohibited. The information herein
is intended only for use by the intended recipient(s) named above. If you
have received this transmission in error, please notify the sender
immediately and permanently delete the e-mail and any copies, printouts or
attachments thereof.


----------------------------------------------------------------------------
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list