Re: [Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Hugo van der Kooij
On Thu, 2 Feb 2006, Marc Haber wrote:

> On Thu, Feb 02, 2006 at 11:48:49AM -0800, Guy B. Purcell wrote:
> > Regarding recipient confusion with this method, you'll notice my
> > sample defs used a common alias.  The alias is what gets reported, so
> > recipients wouldn't see different hostnames--just different service
> > names.
>
> Wouldn't they then be looking for the wrong host in the web interface?

Not if you happen to use standard - format and everyone
knows about it.

Hugo.

-- 
I hate duplicates. Just reply to the relevant mailinglist.
[EMAIL PROTECTED]   http://hvdkooij.xs4all.nl/
Don't meddle in the affairs of magicians,
for they are subtle and quick to anger.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Guy B. Purcell


On Feb 2, 2006, at 10:01, Marc Haber wrote:


On Thu, Feb 02, 2006 at 09:34:06AM -0800, Guy B. Purcell wrote:

That you've been staring at the problem from waaay too close :^)
Seriously, all you need to do is to define (in Nagios, not
necessarily in the DNS, although that probably wouldn't hurt)
separate hosts for the different interfaces,


That's my solution (4), which is indeed most probably the least ugly
one.


Ah yes--missed that one (probably because it was so short compared to  
the others), sorry.


Regarding recipient confusion with this method, you'll notice my  
sample defs used a common alias.  The alias is what gets reported, so  
recipients wouldn't see different hostnames--just different service  
names.


-Guy



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Marc Haber
On Thu, Feb 02, 2006 at 11:48:49AM -0800, Guy B. Purcell wrote:
> Regarding recipient confusion with this method, you'll notice my  
> sample defs used a common alias.  The alias is what gets reported, so  
> recipients wouldn't see different hostnames--just different service  
> names.

Wouldn't they then be looking for the wrong host in the web interface?

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Guy B. Purcell


On Feb 2, 2006, at 02:25, Marc Haber wrote:


some systems I am responsible for have multiple IP addresses, with
services that are not running on all IP addresses. I thus need service
definitions that don't check the service on the host address, but on a
dedicated "service address" while still being associated to the host
which has a different address.

I have come up with various ways to do this, each of them ugly, but
differently so.


[...some truly ugly suggestions involving special command defs for  
each service check...]



What is your opinion?


That you've been staring at the problem from waaay too close :^)   
Seriously, all you need to do is to define (in Nagios, not  
necessarily in the DNS, although that probably wouldn't hurt)  
separate hosts for the different interfaces, a la


define host{
use corp-host
host_name   mink-ge0
alias   mink
address 10.10.10.10
}

define host{
use corp-host
host_name   mink-ge1
alias   mink
address 10.10.10.10
}

Once you have that, you just define the services for each "host" as  
appropriate.


-Guy



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Marc Haber
On Thu, Feb 02, 2006 at 09:34:06AM -0800, Guy B. Purcell wrote:
> That you've been staring at the problem from waaay too close :^)   
> Seriously, all you need to do is to define (in Nagios, not  
> necessarily in the DNS, although that probably wouldn't hurt)  
> separate hosts for the different interfaces,

That's my solution (4), which is indeed most probably the least ugly
one.

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] Service on an IP address different from the host

2006-02-02 Thread Marc Haber
Hi,

some systems I am responsible for have multiple IP addresses, with
services that are not running on all IP addresses. I thus need service
definitions that don't check the service on the host address, but on a
dedicated "service address" while still being associated to the host
which has a different address.

I have come up with various ways to do this, each of them ugly, but
differently so.

(1)
Duplicate each command definition for a service check like

define command{
command_namecheck_http
command_line$USER1$/check_http -H $HOSTADDRESS$
}

define command{
command_namecheck_http_addr
command_line$USER1$/check_http -H $ARG1$
}


(2)
One other idea I have come up with would be having a thing like an "optional
argument", which could be configured like

define command{
command_namecheck_http
command_line$USER1$/check_http -H $IFDEF $ARG1$$ $ARG1$ $ELSE$ 
$HOSTADDRESS$ $ENDIF$
}

(3)
A different approach (which is what I did back in netsaint days) was a
metaplugin, which allows command configuration like

define command {
command_namecheck_http
command_line$USER2$/modify_address $HOSTADDRESS$-$ARG1$ 
$USER1$/check_dns_random modify_address
}

which allows service definitions like

define service {
...
check_command   check_http
}

which checks the service on $HOSTADDRESS$ and

define service {
...
check_command   check_http!192.168.130.5
}

which checks the service on 192.168.130.5.

In the example, the metaplugin replaces the occurence of the string
modify_address with $HOSTADDRESS$ if $ARG1$ is empty, and $ARG1$
otherwise. This has the advantage of having a very straightforward
service configuration, at the price of having a confusing and complex
command definition which does not use nagios standard mechanisms.

(4)
The last approach would be to have host definitions for both IP
addresses, but that would probably be confusing for notification
recipients who are not so intimately familiar with system
architecture.



Which approach would, in your opinion, be appropriate for a new
installation? I am currently inclined towards (4).

What is your opinion?

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
Nagios-users mailing list
Nagios-users@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