[users] Nagios upgrade

Filipe Brandenburger filbranden at gmail.com
Tue Nov 4 15:05:22 CET 2008


Hello,

Yesterday I did the upgrade to Nagios 3 on my environment. Before
that, I had Nagios 2.9 installed from source, which I backed up and
removed, then I installed Nagios 3 from scratch and configured it. I
did this on a CentOS 5.2 host, i386, fully updated.

I found some little problems:

1) Dependency on libltdl.so.3:

When I first installed it, the "nagios" binary would not work for
nagios -v. I traced it to a library that was not installed. I fixed
this problem with "yum install libtool-ltdl". The dependency seems not
to be on the RPM:

> # yum install nagios
> Loading "fastestmirror" plugin
> Loading "priorities" plugin
> Loading mirror speeds from cached hostfile
>  * rpmforge: mirror.idilia.net
>  * base: mirror.idilia.net
>  * updates: mirror.idilia.net
>  * addons: mirror.idilia.net
> 271 packages excluded due to repository priority protections
> Setting up Install Process
> Parsing package install arguments
> Resolving Dependencies
> --> Running transaction check
> ---> Package nagios.i386 0:3.0.4-1.el5.rf set to be updated
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
> =============================================================================
>  Package                 Arch       Version          Repository        Size
> =============================================================================
> Installing:
>  nagios                  i386       3.0.4-1.el5.rf   rpmforge          3.6 M
>
> Transaction Summary
> =============================================================================
> Install      1 Package(s)
> Update       0 Package(s)
> Remove       0 Package(s)
>
> Total download size: 3.6 M
> Is this ok [y/N]: y
> Downloading Packages:
> (1/1): nagios-3.0.4-1.el5 100% |=========================| 3.6 MB    00:00
> Running rpm_check_debug
> Running Transaction Test
> Finished Transaction Test
> Transaction Test Succeeded
> Running Transaction
>   Installing: nagios                       ######################### [1/1]
>
> Installed: nagios.i386 0:3.0.4-1.el5.rf
> Complete!
> # ldd /usr/bin/nagios
> 	linux-gate.so.1 =>  (0x00ae7000)
> 	libperl.so => /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so (0x00101000)
> 	libresolv.so.2 => /lib/libresolv.so.2 (0x00236000)
> 	libnsl.so.1 => /lib/libnsl.so.1 (0x00de5000)
> 	libdl.so.2 => /lib/libdl.so.2 (0x00ccb000)
> 	libm.so.6 => /lib/libm.so.6 (0x00d33000)
> 	libcrypt.so.1 => /lib/libcrypt.so.1 (0x00d8a000)
> 	libutil.so.1 => /lib/libutil.so.1 (0x00249000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0x00d71000)
> 	libc.so.6 => /lib/libc.so.6 (0x00b86000)
> 	libltdl.so.3 => not found
> 	libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00258000)
> 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00dbe000)
> 	/lib/ld-linux.so.2 (0x00b68000)
> 	librt.so.1 => /lib/librt.so.1 (0x00dd5000)
> #



2) The default configuration does not work, there is an error that
prevents Nagios to start with it:

> # nagios -v /etc/nagios/nagios.cfg
>
> Nagios 3.0.4
> Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
> Last Modified: 10-15-2008
> License: GPL
>
> Reading configuration data...
>
> Error in configuration file '/etc/nagios/nagios.cfg' - Line 551 (NULL value)
>
> ***> One or more problems was encountered while processing the config files...
>
>      Check your configuration file(s) to ensure that they contain valid
>      directives and data defintions.  If you are upgrading from a previous
>      version of Nagios, you should be aware that some variables/definitions
>      may have been removed or modified in this version.  Make sure to read
>      the HTML documentation regarding the config files, as well as the
>      'Whats New' section to find out what has changed.
>
> #

I looked at it, and line 551 is this one (some lines above as context):
> # TIME CHANGE ADJUSTMENT THRESHOLDS
> # These options determine when Nagios will react to detected changes
> # in system time (either forward or backwards).
>
> time_change_threshold=

Commenting the time_change_threshold variable fixed the problem. I
don't know what it is, but I believe it should come with a default
that would work, but that might be your intent, to make the default
not work so as to force one to edit the config files...



3) This is not a bug per se, but I don't understand why the files
under /etc/nagios are owned by nagios:nagios instead of root:root.
AFAIK, Nagios does not write or change the configfiles at all, I
believe it only shows them on the web interface, but I don't know of
any feature for it to edit its configfiles. Even if it did, I believe
setting the permissions of all those files would be wrong, this should
at least be restricted to the files it must write if any.



Anyway, please have a look at that. Other than that, the package
worked great! Everything is working great for me, and I could say the
upgrade worked just fine, these small issues were not enough to go
ahead with it on my production environment.

Thanks!
Filipe



More information about the users mailing list