Discussion:
[Nagios-users] bind nagios server to a certain IP
Greg Cope
2006-07-17 14:43:26 UTC
Permalink
Hi All,

Is it possible to get a nagios server to bind to an IP?

Searching seems to reveal no config for this.

I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.

This also means I can move the IP to any other host with out having to
re-configure all the clients.

Any ideas?

greg
Giles Coochey
2006-07-17 14:48:55 UTC
Permalink
For communicating between the cluster you can use a dedicated subnet and
do not implement a default route.

For the web interface you can bind apache to whatever interface through
the apache configuration.

-----Original Message-----
From: nagios-users-***@lists.sourceforge.net
[mailto:nagios-users-***@lists.sourceforge.net] On Behalf Of Greg
Cope
Sent: 17 July 2006 16:43
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP

Hi All,

Is it possible to get a nagios server to bind to an IP?

Searching seems to reveal no config for this.

I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.

This also means I can move the IP to any other host with out having to
re-configure all the clients.

Any ideas?

greg




------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-***@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
Greg Cope
2006-07-17 14:58:34 UTC
Permalink
Post by Giles Coochey
For communicating between the cluster you can use a dedicated subnet and
do not implement a default route.
The host already has a default route.
Post by Giles Coochey
For the web interface you can bind apache to whatever interface through
the apache configuration.
That's the easy bit.

Thanks,


Greg
Post by Giles Coochey
-----Original Message-----
Cope
Sent: 17 July 2006 16:43
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP
Hi All,
Is it possible to get a nagios server to bind to an IP?
Searching seems to reveal no config for this.
I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.
This also means I can move the IP to any other host with out having to
re-configure all the clients.
Any ideas?
greg
------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
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
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
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
Morris, Patrick
2006-07-17 15:14:08 UTC
Permalink
Post by Giles Coochey
-----Original Message-----
Of Greg Cope
Sent: Monday, July 17, 2006 7:43 AM
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP
Hi All,
Is it possible to get a nagios server to bind to an IP?
Searching seems to reveal no config for this.
I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.
This also means I can move the IP to any other host with out
having to re-configure all the clients.
Nagios itself doesn't bind to an IP address. What do you want to bind
to the IP?
Greg Cope
2006-07-17 15:37:24 UTC
Permalink
Post by Morris, Patrick
Post by Giles Coochey
-----Original Message-----
Of Greg Cope
Sent: Monday, July 17, 2006 7:43 AM
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP
Hi All,
Is it possible to get a nagios server to bind to an IP?
Searching seems to reveal no config for this.
I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.
This also means I can move the IP to any other host with out
having to re-configure all the clients.
Nagios itself doesn't bind to an IP address. What do you want to bind
to the IP?
I've set allowed_hosts in nrpe.conf - so the clients will only accept
checks from a certain IP.

This is the IP I am trying to get nrpe checks bound to.

Greg
Hugo van der Kooij
2006-07-17 21:42:57 UTC
Permalink
Post by Greg Cope
Post by Morris, Patrick
Post by Giles Coochey
-----Original Message-----
Of Greg Cope
Sent: Monday, July 17, 2006 7:43 AM
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP
Hi All,
Is it possible to get a nagios server to bind to an IP?
Searching seems to reveal no config for this.
I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.
This also means I can move the IP to any other host with out
having to re-configure all the clients.
Nagios itself doesn't bind to an IP address. What do you want to bind
to the IP?
I've set allowed_hosts in nrpe.conf - so the clients will only accept
checks from a certain IP.
This is the IP I am trying to get nrpe checks bound to.
Sounds like you are in need of post-route packet mangling. Time to hit the
iptables manuals and setup a custome ruleset to rewrite the addresses as
needed.

Hugo.
--
I hate duplicates. Just reply to the relevant mailinglist.
***@vanderkooij.org http://hvdkooij.xs4all.nl/
Don't meddle in the affairs of magicians,
for they are subtle and quick to anger.
Giles Coochey
2006-07-17 15:18:47 UTC
Permalink
Post by Greg Cope
The host already has a default route.
Hi Greg,

What I mean to say is if you have one IP for cluster communications
(without a default route) and another IP (your roaming IP for nagios
which has the default route). You can implement this with a second
interface card or subinterface and existing interface using dot1q
encapsulation, if your switch infrastructure supports it, for which you
do not assign a default route. You do this on both servers for the
specific reason of checking that nagios is running on both hosts. It's
simply a management interface.

If your passive system(s) detect that the active nagios host is
experiencing problems (which you can do in a number of ways with both
local and remote checks on the secondary IP address) it can take on the
role of the active by reconfiguring the primary interface card with the
IP of the failed device.

Thanks

Giles
Post by Greg Cope
-----Original Message-----
Cope
Sent: 17 July 2006 16:43
To: nagios
Subject: [Nagios-users] bind nagios server to a certain IP
Hi All,
Is it possible to get a nagios server to bind to an IP?
Searching seems to reveal no config for this.
I want to get nagios to use one IP on a cluster so that the other host
(active-passive) can take it over in the event of a failure.
This also means I can move the IP to any other host with out having to
re-configure all the clients.
Any ideas?
greg
----------------------------------------------------------------------
--
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
42 _______________________________________________
Nagios-users mailing list
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
----------------------------------------------------------------------
--- Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
42 _______________________________________________
Nagios-users mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
Post by Greg Cope
::: Messages without supporting info will risk being sent to /dev/null
Greg Cope
2006-07-17 15:40:02 UTC
Permalink
Post by Giles Coochey
Post by Greg Cope
The host already has a default route.
Hi Greg,
What I mean to say is if you have one IP for cluster communications
(without a default route) and another IP (your roaming IP for nagios
which has the default route). You can implement this with a second
interface card or subinterface and existing interface using dot1q
encapsulation, if your switch infrastructure supports it, for which you
do not assign a default route. You do this on both servers for the
specific reason of checking that nagios is running on both hosts. It's
simply a management interface.
If your passive system(s) detect that the active nagios host is
experiencing problems (which you can do in a number of ways with both
local and remote checks on the secondary IP address) it can take on the
role of the active by reconfiguring the primary interface card with the
IP of the failed device.
Thanks
Giles
Thanks Giles.

The host already runs linux heartbeat, and is in an active-passive ha
cluster running bind, ldap and dhcpd. I wanted to add nagios to the
mix. When setting this up it is usual to give each app a VIP address,
and configure that on the active host.

As I have configured nrpe clients to only allow checks from one IP - the
nrpe checks needs to come from that IP address.

Greg
Giles Coochey
2006-07-17 15:56:35 UTC
Permalink
Post by Greg Cope
Thanks Giles.
The host already runs linux heartbeat, and is in an
active-passive ha cluster running bind, ldap and dhcpd.
I wanted to add nagios to the mix. When setting this
up it is usual to give each app a VIP address, and
configure that on the active host.
As I have configured nrpe clients to only allow checks
from one IP - the nrpe checks needs to come from that
IP address.
Well the short answer is nagios will run it's checks from the Interface
which is most suited to be the route to that host.

It doesn't in itself 'bind' to any address, but simply uses the routing
table on the system for each plug-in's communications.

Nagios isn't a network daemon in itself, and it's the individual
plug-ins, be they perl or compiled C that initiate the network accesses
- perhaps you should check NRPE docs, I don't happen to use that myself,
but do know that the NRPE daemon runs on the client, and locally on the
nagios server, NRPE just runs as a check using the local routing table.

Under Linux, with iptables patches, it *may* be possible to mark packets
coming from a particular process and have them processed in their own ip
routing table. This is a complicated set up however, and I get the
impression that you're looking for an easier solution.
Greg Cope
2006-07-17 16:01:20 UTC
Permalink
Post by Giles Coochey
Post by Greg Cope
Thanks Giles.
The host already runs linux heartbeat, and is in an
active-passive ha cluster running bind, ldap and dhcpd.
I wanted to add nagios to the mix. When setting this
up it is usual to give each app a VIP address, and
configure that on the active host.
As I have configured nrpe clients to only allow checks
from one IP - the nrpe checks needs to come from that
IP address.
Well the short answer is nagios will run it's checks from the Interface
which is most suited to be the route to that host.
Yes - that's what I realised.

So my only choice is to either remove the allow host constraint on nrpe,
or to add more IP's to it. I suppose either is roughly the same amount
of work.
Post by Giles Coochey
Under Linux, with iptables patches, it *may* be possible to mark packets
coming from a particular process and have them processed in their own ip
routing table. This is a complicated set up however, and I get the
impression that you're looking for an easier solution.
Done that before - but I do not want to start playing with firewall
rules just for this.

Greg
Morris, Patrick
2006-07-17 16:01:17 UTC
Permalink
Post by Giles Coochey
-----Original Message-----
Of Giles Coochey
Sent: Monday, July 17, 2006 8:57 AM
To: Greg Cope
Cc: nagios
Subject: Re: [Nagios-users] bind nagios server to a certain IP
Nagios isn't a network daemon in itself, and it's the
individual plug-ins, be they perl or compiled C that initiate
the network accesses
- perhaps you should check NRPE docs, I don't happen to use
that myself, but do know that the NRPE daemon runs on the
client, and locally on the nagios server, NRPE just runs as a
check using the local routing table.
Sounds like, given the requirements, the solution may be to just make
sure the Nagios machine's default route is bound to the virtual
interface.
Miguel Fernandes
2006-07-17 16:15:35 UTC
Permalink
Hi!

I'm trying to use headers and footers with the cgis, but I can't get it
working. I've search the web and followed the instructions on the manual:
Create an ssi folder inside the html one, create the files common-header.ssi,
common-footer.ssi, change permission to 644 and 755, but it seems the cgi's
aren't finding them. Then I move the folder outside the html folder
(/usr/share/nagios/) play with permission but nothing worked. Has anybody
worked with headers and footers in nagios?

Thanks!
Hugo van der Kooij
2006-07-18 05:34:26 UTC
Permalink
Post by Miguel Fernandes
I'm trying to use headers and footers with the cgis, but I can't get it
Create an ssi folder inside the html one, create the files common-header.ssi,
common-footer.ssi, change permission to 644 and 755, but it seems the cgi's
aren't finding them. Then I move the folder outside the html folder
(/usr/share/nagios/) play with permission but nothing worked. Has anybody
worked with headers and footers in nagios?
What does this have to do with "bind nagios server to a certain IP"? Why
do you start a totally new and unrelated subject by replying?

And it works exactly as shown in the manual. Just make sure you follow the
manual exactly.

Hugo.
--
I hate duplicates. Just reply to the relevant mailinglist.
***@vanderkooij.org http://hvdkooij.xs4all.nl/
Don't meddle in the affairs of magicians,
for they are subtle and quick to anger.
Steve Shipway
2006-07-18 00:04:53 UTC
Permalink
Post by Greg Cope
Post by Greg Cope
Post by Greg Cope
Is it possible to get a nagios server to bind to an IP?
...
Post by Greg Cope
Post by Greg Cope
Post by Greg Cope
I want to get nagios to use one IP on a cluster so that
the other
Post by Greg Cope
Post by Greg Cope
host
(active-passive) can take it over in the event of a failure.
...
Post by Greg Cope
Post by Greg Cope
I've set allowed_hosts in nrpe.conf - so the clients will
only accept
Post by Greg Cope
checks from a certain IP.
We do this by just adding the IP addresses of every member of the
cluster, plus the cluster virtual IP, to the NRPE allowed_hosts lists
and switch access tables. Otherwise it gets a bit awkward in having to
make your HA software (linux_HA?) change your default router to force
the virtual interface (and then change back on fail back).

Steve
Greg Cope
2006-07-18 08:19:26 UTC
Permalink
Post by Steve Shipway
Post by Greg Cope
Post by Greg Cope
Post by Greg Cope
Is it possible to get a nagios server to bind to an IP?
...
Post by Greg Cope
Post by Greg Cope
Post by Greg Cope
I want to get nagios to use one IP on a cluster so that
the other
Post by Greg Cope
Post by Greg Cope
host
(active-passive) can take it over in the event of a failure.
...
Post by Greg Cope
Post by Greg Cope
I've set allowed_hosts in nrpe.conf - so the clients will
only accept
Post by Greg Cope
checks from a certain IP.
We do this by just adding the IP addresses of every member of the
cluster, plus the cluster virtual IP, to the NRPE allowed_hosts lists
and switch access tables. Otherwise it gets a bit awkward in having to
make your HA software (linux_HA?) change your default router to force
the virtual interface (and then change back on fail back).
Steve,

That's the answer I came to as well - but thanks for pointing it out.

Greg
Post by Steve Shipway
Steve
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
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
Continue reading on narkive:
Loading...