[Nagiosplug-help] Nagios and Nagios Plugin Install Issues

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Nov 14 05:32:35 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please keep the thread on the mailing list.

On 13/11/07 09:58 PM, Stan Baptista wrote:
>> If you get (among others) /usr/lib/libcrypto.a with the above command
>> try adding this to configure:
>>
>> - --with-openssl=/usr
> 
> I did this and got past the compile errors. Thanks.

This is strange though. Is it a vanilla CantOS setup (no 3rd party
software installed excluding Nagios)? If so this might be worth
investigation... At the very least I can a FAQ entry...

> To install, I'm using the "Nagios Plugins Quick-and-Dirty Installation
> Instructions" found in /my/nagios-plugin/rootdir/README.
> 
> As root, I did these steps:
> 
> 0) skipped.
> 
> 1) .configure (incl --with-openssl=/usr)
> 
> 2) make
> 
> 3) make install
> 
> 4) skipped (make install-root). If I read the instructions correctly,
> I shouldn't need this step since I'm logged in as root.

I can't tell for you since some things changed recently for root plugins
and I haven't installed the package once since then. As a quick check
you can look for check_icmp in the libexec install directory. It (and a
few others) should be setuid.

For maximum security all suid plugins should be executable only by the
nagios user, although you probably really want this only if you have
unprivileged users on your server. I believe this can be accomplished
automatically by adding --with-nagios-user=<nagios_user>,
- --with-nagios-group=<nagios_group> and --without-world-permissions to
the configure script.

> 5) This steps says to verify that the host configuration file
> (hosts.cfg) for Nagios contains the correct paths to the new plugins.
> Apparently, this file should have been created in the following
> directory when installing Nagios:
> 
> /local/user/nagios/etc
> 
> There are several .cfg files there including cgi.cfg, localhost.cfg,
> resource.cfg, commands,.cfg, and nagios.cfg. But hosts.cfg is not
> among them.

The main file is nagios.cfg. You should at least look quickly over all
the options; the file itself is well documented and you can look for
additional informations in the Nagios doc:

http://nagios.sourceforge.net/docs/2_0/configmain.html

> I copied localhost.cfg to hosts.cfg and tried re-running steps 1), 2),
> and 3). No change. I did some research and it looks like others have
> encountered this problem but I didn't find a definitive solution. Did
> I miss something?

All other files except the cgi and resources files are objects
configurations. They define everything: contacts, notification time
periods, hosts, services dependencies, check and notification
commands... It doesn't matter how they are named and how the objects are
organized inside them, but they must all be referenced from the main
nagios config file using cfg_file or cfg_dir directives.

See:

http://nagios.sourceforge.net/docs/2_0/config.html
http://nagios.sourceforge.net/docs/2_0/configobject.html
http://nagios.sourceforge.net/docs/2_0/xodtemplate.html

When you run the pre-flight check (nagios -v) any error in the config is
explained in the output. Just read it carefully and make sure you have
no missing objects and the failing object is correctly defined.


Finally when you start to growing to a bigger config you will likely
want to use templates to make the config smaller and more maintainable.
You should look at these once you understand well the Nagios configuration:

http://nagios.sourceforge.net/docs/2_0/templaterecursion.html
http://nagios.sourceforge.net/docs/2_0/templatetricks.html

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOnpj6dZ+Kt5BchYRAlSqAJ4zWylZm3UWegLShB+pYNbicLwQsQCg5Mi/
4SB+HghGXuL/UzC8dxBxTwM=
=4tGZ
-----END PGP SIGNATURE-----




More information about the Help mailing list