bind nagios to a fix ip
Andreas Ericsson
ae at op5.se
Wed Jul 27 22:58:07 CEST 2005
Fa. Schramm e.K. - Deutschland wrote:
> Hi all,
>
> I am running an nagios daemon with serveral checks. My server machine
> which contains the nagios process, has 5 ip's collective.
>
> My problem is that nagios uses one of the 5 ip's, but not a fix ip. I
> want to tell nagios to use one fix ip. In other daemons i can tell the
> programm to bind an ip to it.
>
> In nagios i didn't found this option.
>
That's because Nagios isn't a networking daemon. It just sits on a
server and runs other programs (plugins) to do the actual checking. The
plugins leave to the kernel (that handles the routing table) to decide
which interface to send traffic through.
> Is there a way to fix this problem?
>
Short answer; No.
Long answer; It's possible but extremely cumbersome and the necessary
changes to the plugins requires a substantial amount of C-coding
knowledge as well as a complete insight into how IP networks work.
Since the plugins initiate the connection you'd have to make all the
plugins use raw sockets (all of them need to be setsuid for this to
work). That way they can set the outgoing IP by themselves. This is
almost always a very bad idea, since you might end up sending packets
that doesn't have a return route to send the responses through unless
each network has a default route that is interconnected with all the
other gateways (and all the networks know of each other). If you don't
know what I'm talking about, see the short answer above.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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