[users] Nagios upgrade

Christoph Maser cmr at financial.com
Wed Nov 5 09:37:48 CET 2008


Am Dienstag, den 04.11.2008, 15:05 +0100 schrieb Filipe Brandenburger:
> 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:
> > 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)
> > #
>
Interesting. My package (test build before commiting does not have this
library linked:

[root at ob1nc0503 ~]# rpm -q nagios
nagios 0:3.0.4-1.x86_64
[root at ob1nc0503 ~]# ldd /usr/bin/nagios | grep tdl
[root at ob1nc0503 ~]#

Also since this is a c-library this dependency should have been found
and set by __find_requires.
So to the best of my limited knowledge i see a possible issue with the
buildsystem here.

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

It was not my intent, it is the original sample config from the source
release. But it matches my ideas, i really have a problem with people
running nagios and not reading/understanding the docs ;)
Anyway if you (and other users) complay enough i will make that one work


> 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.
>
Actually I did not touch that stuff. It's from this section in the SPEC:

%defattr(-, nagios, nagios, 0755)
%dir %{_sysconfdir}/nagios/
%config(noreplace) %{_sysconfdir}/nagios/*.cfg
%config(noreplace) %{_sysconfdir}/nagios/objects
%{_localstatedir}/nagios
%{_localstatedir}/nagios/spool
%{logdir}


I don't have my own opinion on this one, so please more comments!


Chris


financial.com AG

Munich head office/Hauptsitz München: Maria-Probst-Str. 19 | 80939 München | Germany
Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany
Management board/Vorstand: Dr. Steffen Boehnert (CEO/Vorsitzender) | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach
Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender)
Register court/Handelsregister: Munich – HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553



More information about the users mailing list