|
|
|
|
| Linux: Nagios fails to update after upgrade from Centos 4.7 to CentOS 5.2 |
|
Problem: 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
|
Solution: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.
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
We welcome anyone who is willing to contribute to this public knowledge base,
contact siteadmin@atc.no
if you have information you would like to share. The idea is not to replace
the commercial support sites, but to publish those hard-to-find
solutions you've found yourself looking for over and over again.
Show all articles