Skrevet av Emne: Linux: Nagios fails to update after upgrade from Centos 4.7 to CentOS 5.2  (Lest 2962 ganger)

ATC

  • Gjest
After upgrade from CentOS 4.7 to CentOS 5.2, Nagios exhibits some strange behavior like plugins not working etc. When trying to update nagios, dependency resolution fails:

$ yum update nagios
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * update: atlas.atc.no
 * rpmforge: apt.sw.be
 * base: atlas.atc.no
 * addons: mirror.ii.uib.no
 * extras: atlas.atc.no
500 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package nagios.i386 0:3.0.6-1.el4.rf set to be updated
--> Processing Dependency: libttf.so.2 for package: nagios
--> Finished Dependency Resolution
Error: Missing Dependency: libttf.so.2 is needed by package nagios



ATC

  • Gjest
Nagios does not come with CentOS but is available via rpmforge (where you probably installed it from in the first place)

You need to replace the RHEL4 rpmforge repo with the RHEL5 one, like so:

$ rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Notice that rpm did not overwrite the .repo file, but this is what we want:

$ mv /etc/yum.repos.d/rpmforge.repo.rpmnew /etc/yum.repos.d/rpmforge.repo

Flush the cache

$ yum clean all

...and try again :-)

$ yum update nagios nagios-plugins

Don't forget to update the plugins^^

One more thing: You may need to check your resource.cfg since some versions of Nagios set USER2 to 'plugins/eventhandler', other versions use 'plugins/contrib'. If some of your plugins stop working, this is probably why.