Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
NagiOS over CentOS

NagiOS over CentOS

Ratings: (0)|Views: 19|Likes:
Published by Shahab
How to install NagiOS over CentOS
How to install NagiOS over CentOS

More info:

Published by: Shahab on Jan 29, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Installing Nagios on CentOS 4.x/5.x
Note added 28 Jul 2010: This piece seems to be abandoned, is unmaintained, and refers toonly one of the nagios versions in circulation. Supplemented: 11 Oct 2012 It needs a re-write outof the conversational style
Installing Nagios on CentOS 4.x/5.xSystem:1.References:2.Packages:3.General UpgradesUpgrading from 2.41.Upgrading from 2.52.4.Set up Apache5.Installation/ConfigurationConfigure the Nagios Apache file1.Set up the password file2.Set up the CGI file3.Setting up nagios.cfg4.6.Object configuration filesTimeperiods1.Contacts/Contacts groups2.Host and host groups3.Services4.7.Starting Nagios8.Escalations9.Extended information10.Dependencies11.SELinux12.That's all, folks!13.1.
This document will breeze through installing and configuring everything necessary to get Nagios up andrunning. This will not touch in detail on the actual configuration directives Nagios uses. For that,documentation is readily available from the Nagios website, or available locally after Nagios isinstalled. I'll be explaining installation through RPMs and yum from Dag's repo (RPMforge), but sourceis available if you prefer to build your own. Again, documentation for this is readily available. Pleasesee the third-party Repositories section of the CentOS wiki in you don't already know how to enablerepos. This also assumes you already have a working e-mail server in your existing network as well.That's how notifications will get sent, and that's beyond the scope of this.
HowTos/Nagios - CentOS Wikihttp://wiki.centos.org/HowTos/Nagios1 of 1618-Oct-12 8:15 AM
CentOS 4.x/5x (Should work for any RHEL/Fedora flavor.)Nagios: 2.9
Nagios: http://www.nagios.org/ Official Docs: http://nagios.org/docs/ Community Docs: RepositoriesMonitoring Exchange: http://www.monitoringexchange.org/ Web Interfaces: http://www.nagios.org/faqs/viewfaq.php?faq_id=183Visualization additions: http://www.nagvis.org/ 
nagios-2.9-1.el4.rf nagios-devel-2.9-1.el4.rf nagios-plugins-nrpe-2.5.2-1.el4.rf nagios-plugins-1.4.8-2.el4.rf Other:Apache 2.0
General Upgrades
A quick note about upgrading. Generally, upgrading is as simple as typing yum update package_name.Just to be on the cautious side, backup your configuration files in /etc before upgrading. Secondly,always read the release notes to make sure configuration files and directives haven't change.
Upgrading from 2.4
A quick note about upgrading. If you're upgrading from version 2.4 (and previous 2.x version), andyou've installed following this guide then a simple yum upgrade will work just fine. As always, it's bestto backup any previous configurations before upgrading just in case something goes awry. Also, fromrelease 2.4 to 2.5 the only packages that Dag has re-spun are nagios and nagios-devel.
[me@mymachine ~] yum update nagios nagios-plugins nagios-devel nagios-plugins-nrpe
Upgrading from 2.5
HowTos/Nagios - CentOS Wikihttp://wiki.centos.org/HowTos/Nagios2 of 1618-Oct-12 8:15 AM
If you're upgrading from version 2.5 to 2.6, Dag's RPMs had a few quirks. Make sure you backup /etc/nagios before continuing.
[me@mymachine ~] service nagios stop[me@mymachine ~] cp -ar /etc/nagios /wherever/nagios_2.5_backup[me@mymachine ~] yum update nagios nagios-plugins nagios-devel nagios-plugins-nrpe
If cgi.cfg, misccommands.cfg, or checkcommands.cfg are missing or saved as .rpmsave or .rpmnew,then just copy them back from your backup that you just created. Otherwise, ignore the error justmentioned because the RPMs have been repaired. Thanks Dag! Also, there is a mistake int hecheck_linux_raid.pl script in the contributed plugins. This is easily fixed. Again, if you don't have anyproblems running this plugin, then it was fixed as well. This was brought to my attention from theNagios mailing list. A user had spooted this and reported things to the packager, so this is probablyresolved by now. Anyways, to correct the check_linux_raid.pl:
[me@mymachine ~] vim /usr/lib/nagios/plugins/contrib/check_linux_raid.plComment out line 26:use strict;#use lib utils.pmuse utils qw(%ERRORS);[me@mymachine ~] nagios -v /etc/nagios/nagios.cfg[me@mymachine ~] service nagios start
Set up Apache
Make sure you have Apache installed, then you'll need to quickly configure it if not. Chances are youprobably already have some web service running on your machine, but if not, get it running quickly thisway.
[me@mymachine ~] yum install httpd[me@mymachine ~] vim /etc/httpd/conf/httpd.conf
At least edit the server name directive to your IP address within /etc/httpd/conf/httpd.conf. Then turn onApache, and make sure it's set to start.
[me@mymachine ~] chkconfig httpd on[me@mymachine ~] service httpd start
Now open up a browser and see if your web server is running: http://localhost (or your IP). Youshould see the Apache 2 test page. If so, move along.If you require further assistance with getting Apache going, especially if you have a need to secure theserver, then please follow the documentation at http://www.apache.org. This will get your web serverup and running quickly, but provides no means of security what-so-ever, I just want to warn you. If you're running completely internal, then it shouldn't be a big deal. Ok, after you get that running, let'sinstall Nagios and start working on setting it up. By default, the RPMs you are going to installautomatically create a nagios.conf file for Apache to use. This file is in /etc/httpd/conf.d/nagios.conf.
HowTos/Nagios - CentOS Wikihttp://wiki.centos.org/HowTos/Nagios3 of 1618-Oct-12 8:15 AM

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->