Making network layout portable

Peter Westlake peter.westlake at pobox.com
Mon Apr 2 14:58:47 CEST 2007


This is about a disadvantage of the way Nagios configuration files
work, and a suggested solution that doesn't involve much work, either
for Ethan or for Nagios users.

First, the problem. What happens when you move a Nagios installation
to a different machine? The parent links are directional, and depend
on the location of the Nagios host. If Nagios is installed on one
host, A, then another host, B, will have A as a parent. But if you
move the installation to B, you have to rewrite the host definitions
so that A has B as parent and B doesn't have a parent. For a big
network this rearranging of pointers could be very time-consuming and
prone to errors.

Distributed Nagios installations are also affected by this, because
each server will have to be given a configuration file with completely
different parent links specific to its host.

Now the suggested solution. Write a configuration that reflects all
the connections in the network, not just the ones that affect
reachability computations from the point of view of a single server.
Include a host "localhost" or "nagios-server" with no parents. Then
all you need to do to port the configuration to a new host is change
which hosts have "parent nagios-server".

For this to work, the configuration needs to allow two-way
connections. In the example above, A has parent B, B has parent A, and
one of them names the nagios server as parent. But this is a good idea
anyway, because it lets you model realistic networks with redundant
connections, as well as making config files much more portable. I have
a patch for this, which I posted a week or two back.

Opinions?

Peter.


-------------------------------------------------------------------------
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




More information about the Developers mailing list