directives question

Timothy Moore twmoore at bea.com
Tue May 13 16:51:03 CEST 2003


O...K...A...Y  I'll play along......Where do I insert the custom directive in the services.cfg?
I have created a plugin to ping the interfaces. I have created a service to call the plugin. I need to pass multiple addresses to the service to the plugin. Using arguments with the check_command directive within services.cfg requires a definition for every host, and then I'm maintaining host addresses in two configuration files.

Yes, I have thought out my design. I want to "service alert" if *any* interface is down (including the primary IP), but "host alert" if a specific IP is down. Ex: page the backup admin if that interface is down, page All if host is down.

Let me rephrase my question. Q: Can you create custom directives within a definition?

Nota bene: (Before you reply, stop and give this some thought, as you might actually figure out the desired design, thus saving you a few e-mails. ;-)


-----Original Message-----
From: Carroll, Jim P [Contractor] [mailto:jcarro10 at sprintspectrum.com]
Sent: Monday, May 12, 2003 3:53 PM
To: Timothy Moore; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] directives question


If you want to create services (plural) to ping the other interfaces for a host, the place to do it would be in services.cfg, not hosts.cfg (as per your 'custom' example).

You're on the right track!  Just follow through with what you've started (but do so in services.cfg, not hosts.cfg).

Nota bene:  Using the design approach you appear to be leaning towards, ff your primary interface goes down but the other interfaces remain up (and the services also remain up), this might not be the best approach.  Do you want to be alerted if *any* interface goes down, or only if *all* interfaces go down?  (Before you reply, stop and give this some thought, as you might actually figure out the desired design, thus saving you a few e-mails.  ;-)

jc


-----Original Message-----
From: Timothy Moore [mailto:twmoore at bea.com]
Sent: Monday, May 12, 2003 5:19 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] directives question


Is it possible to create custom directives within the hosts definition?  I want to create a service to ping secondary interfaces on a host.  I want to keep "check-host-alive"  separate to ping the primary address
define host{
         use                     generic_hosts
         host_name         sunbox
         alias                   Sun 450
         address              999.999.999.10
          custom             999.999.999.12,999.999.999.14,999.999.999.16
         parents              WS
         }


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
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