We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

[Nagios-devel] Multiple addresses per host ?

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

[Nagios-devel] Multiple addresses per host ?

Postby Guest » Sat Apr 06, 2002 11:19 am

Hi all,

In many of out server/firewall setups here we have different daemons
listening on different interfaces. For instance, we will have a firewall
with two binds running, on inside and one outside (or even three in some
special cases). Or we might have a differently configured httpd on each
interface.

The issue is that by default a host is given one ip address, and there
is no clean way of defining that two different services on two different
addresses actually belong to the same host object. The way I am doing it
at the moment is as follows:

define host {
host_name myhost
address 192.168.1.1
...
}

define service {
...
host_name myhost
service_description DNS-inside
check_command check_dns2!192.168.1.1
}
define service {
...
host_name myhost
service_description DNS-outside
check_command check_dns2!123.45.67.89
}

Where check_dns2 is a command which calls check_dns with $ARG1$ instead of
$HOSTADDRESS$ :

define command {
command_name check_dns2
command_line /usr/local/libexec/nagios/check_dns -H www.yahoo.com \
-s $ARG1$
}


I am considering modifyin the code to allow for such constructs:

define host {
host_name myhost
address 192.168.1.1 primary # this would also allow for IP aliases
address 123.45.67.89
}

or

define host {
host_name myhost
address 192.168.1.1
address2 123.45.67.89
}

Then we need some way of indication which $HOSTADDRESS$ we'll be using
for the service definitions -- but we run into the same problem which is
that we have to explicitly mention which address we want to run the check
against anyway.

Any ideas ?


On related topic which I am thinking about (though this might be made
possible in the future provided a sufficiently abstracted configuration
framework/API that would allow one to define their own config. modules/
parsers) -- it would be nice to be able to configure hosts/services in the
following fashion (BIND users will find it familiar):

host "myhost" {
host_name "myhost";
addresses { default 192.168.1.1; 123.45.67.89; };
service { dns; http; ping; } // default service checks -- template conf'ed
service { dns_in "DNS_IN" { 123.45.67.89; } // extra check, explicitly
// specify name, IP
}

Or something similar -- service template definitions allows for a very clean
separation between definition and usage -- we could benefit from this by
allowing service usage declaration within host block definitions, as above.

It's IMHO easier to configure and parse, maybe it's just me :)

Comments ?


--
_ _ |_ || regnauld@catpipe.net catpipe Systems ApS |
(_(_||_ || *BSD solutions, consulting, development |
|| Tlf.: +45 7021 0050 http://www.catpipe.net/ |





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: regnauld@catpipe.net
Guest
 

Return to Community Support

Who is online

Users browsing this forum: amane, G_Deshpande, Google [Bot] and 24 guests