Changes

Jump to navigation Jump to search
3,697 bytes removed ,  00:10, 26 January 2014
no edit summary
Line 1: Line 1: −
==Updating from 2.12 to 3.05==
  −
I was able to successfully update a simple Nagios installation from 2.12 to 3.05 using the following commands:
  −
<nowiki># save the existing nagios config
  −
cd /etc
  −
tar -cvf nagios.tar nagios/*
     −
# remove nagios 2.12 and install nagios 3.05
  −
rpm --nodeps -e nagios
  −
yum --enablerepo=dag install nagios
  −
  −
# restore the nagios 2.12 config folder
  −
cd /etc
  −
mv nagios nagios.org
  −
tar xvf nagios.tar
  −
  −
# comment out the only nagios 2.12 directive that nagios 3.05 complained about
  −
cd /etc/nagios
  −
mv nagios.cfg nagios.cfg.org
  −
sed s/"check_result_buffer_slots"/"# check_result_buffer_slots"/ nagios.cfg.org > nagios.cfg
  −
  −
# restart nagios and nagiosgrapher
  −
service nagiosgrapher restart
  −
service nagios restart</nowiki>
  −
  −
I also needed to restore the cusomized logos I had created to /usr/share/nagios/images/logos/
  −
  −
[[User:Mmccarn|Mmccarn]] 23:23, 16 November 2008 (UTC)
  −
  −
==Problem with pre-existing group named 'nagios'==
  −
The install scripts failed on my system due to a pre-existing group named 'nagios'.
  −
  −
During install, I got some errors about "nagios doesn't exist, using root".
  −
  −
I deleted the nagios group, removed and reinstalled the packages, and that worked.
  −
  −
[[User:Mmccarn|Mmccarn]] 21:46, 25 October 2008 (UTC)
  −
  −
--[[User:Stephdl|Stephdl]] ([[User talk:Stephdl|talk]]) 13:37, 26 October 2013 (MDT)
   
{{Languages}}
 
{{Languages}}
{{Needs review}}
+
{{WIP box| --[[User:Stephdl|Stephdl]] ([[User talk:Stephdl|talk]]) 13:59, 26 October 2013 (MDT) }}
 
{{Note box|This contrib was only applied and used on fresh SME (server only mode) install. Conflicts with other installed packages were not examined. The author strongly recommend to install this monitoring system on a dedicated server. It is entirely possible to run it on a virtualized system, which monitors the host itself. In this case you should set up a second Nagios server (acting as a watchdog) on an independent hardware (physically or virtualized) to monitor the main Nagios system}}
 
{{Note box|This contrib was only applied and used on fresh SME (server only mode) install. Conflicts with other installed packages were not examined. The author strongly recommend to install this monitoring system on a dedicated server. It is entirely possible to run it on a virtualized system, which monitors the host itself. In this case you should set up a second Nagios server (acting as a watchdog) on an independent hardware (physically or virtualized) to monitor the main Nagios system}}
   Line 95: Line 58:  
=== Installation ===
 
=== Installation ===
   −
{{Note box|If you have the Nagios 2 contrib installed, follow the update instructions below}}
+
{{Note box|The Current version of nagios is 3.2 in smecontribs, there is no plan yet to update this contrib. If you have the skill and the need you should work to update this work to the newer release.}}
    
==== Installation of a central Nagios server ====
 
==== Installation of a central Nagios server ====
Line 101: Line 64:     
  yum install --enablerepo=smecontribs smeserver-nagios nagios
 
  yum install --enablerepo=smecontribs smeserver-nagios nagios
 +
 +
then to configure :
 +
 +
/bin/cp -ba /etc/nagios/nagios.cfg-smeserver /etc/nagios/nagios.cfg
 +
/bin/cp -ba /etc/nagios/cgi.cfg-smeserver /etc/nagios/cgi.cfg
 +
 +
then (optional) :
 +
cd /tmp
 +
wget http://repo.openfusion.net/centos5-i386/nagios-of-plugins-0.13.8-1.of.el5.noarch.rpm
 +
yum localinstall nagios-of-plugins-0.13.8-1.of.el5.noarch.rpm
 +
 +
then:
 +
 
  signal-event post-upgrade; signal-event reboot
 
  signal-event post-upgrade; signal-event reboot
 +
 +
alternatively if necessary you can install [[Nagios_NRPE|NRPE]] or [[Nagios_NSCA|NSCA]] addons not yet in smecontribs see [[bugzilla:7644]] or [[bugzilla:7645]]
 +
yum install  --enablerepo=smecontribs smeserver-nagios-nrpe
 +
or
 +
yum install  --enablerepo=smecontribs smeserver-nagios-nsca
 +
then
 +
signal-event post-upgrade; signal-event reboot
 +
 +
==== Configure the dag repositoy ====
 +
 +
You need to activate the [[Dag]] reposity before installing this contrib.<br />
 +
 +
see [[dag|dag repository]] <br />
 +
    
===== Install the VMware ESXi Server CIM Hardware Monitoring (optional) =====
 
===== Install the VMware ESXi Server CIM Hardware Monitoring (optional) =====
Line 119: Line 109:  
To get some configuration hints run  
 
To get some configuration hints run  
 
  rpm -qi nagios-plugins-esx3i
 
  rpm -qi nagios-plugins-esx3i
  −
===== Install the Nuvola theme (optional) =====
  −
{{Needs review}}
  −
The Nuvola theme provides a nice and modern GUI. The screenshot above was made with the Nuvola theme installed.
  −
cd /usr/share/nagios
  −
rm -rf config.js images index.html main.html side side.html stylesheets
  −
cd -
  −
tar --strip-path=1 -C /usr/share/nagios -xzf nagios-nuvola-*.tar.gz
  −
chmod a+r -R /usr/share/nagios
  −
Empty your browser cache and reload the Nagios page.
  −
  −
===== Integrate Ajaxterm in the Nuvola theme Home menu (optional) =====
  −
{{Needs review}}
  −
Install the [[Ajaxterm]] contrib and run
  −
patch -p0 /usr/share/nagios/side/dtree_data.js < dtree_data.js.patch
  −
Empty your browser cache and reload the Nagios page.
  −
  −
===== Install additional logo icons (optional) =====
  −
{{Needs review}}
  −
This installs a set of icons, including the SME server logo. The logos can be used in the ''hostextinfo{}'' sections. A preview of the logos can be found [http://wiki.contribs.org/images/d/d0/Nagios-logos.jpg here].
  −
  −
tar --strip-path 1 -C /usr/share/nagios/images/logos -xzf nagios-icons-nx-*.tar.gz
  −
chown nagios.root  /usr/share/nagios/images/logos/*
  −
chmod 644  /usr/share/nagios/images/logos/*
      
==== Hints ====
 
==== Hints ====
Line 162: Line 128:  
* It is a good idea to make your Nagios server as independent as possible from the infrastructure it monitors, i.e., use a dedicated hardware, network, mail- and pager system, firewall and internet connection if possible.  
 
* It is a good idea to make your Nagios server as independent as possible from the infrastructure it monitors, i.e., use a dedicated hardware, network, mail- and pager system, firewall and internet connection if possible.  
 
* Consider to setup a second Nagios somewhere on your network, which monitors your central Nagios server. Then you need to install the NRPE also on the central server.
 
* Consider to setup a second Nagios somewhere on your network, which monitors your central Nagios server. Then you need to install the NRPE also on the central server.
  −
==== Update from Nagios 2 to Nagios 3 ====
  −
Before installing this contrib based on Nagios 3, remove all packages of the previous Nagios 2 installation
  −
service nagios stop
  −
service nagiosgrapher stop
  −
  −
/usr/bin/yum erase \
  −
nagios-plugins-esx3i \
  −
nagios-nrpe \
  −
nagios-plugins-temptrax \
  −
nagios-plugins \
  −
nagios-of-plugins \
  −
nagios-plugins-generic \
  −
nagios  smeserver-nagios-nrpe \
  −
smeserver-nagios \
  −
smeserver-nagios-plugins-mysql \
  −
nagios-plugins-nrpe  \
  −
nagios-plugins-setuid \
  −
smeserver-nagiosgrapher \
  −
smeserver-nagios-backup
  −
Remove all NagiosGrapher rrd data. It is not possible to tranfer the existing NagiosGrapher data to PNP.
  −
rm -rf /var/lib/nagios/*
  −
Backup your Nagios configuration data
  −
cp -a /etc/nagios /etc/nagios.v2
  −
Delete Nagios configuration data
  −
rm -rf /etc/nagios
  −
Move the retention data to the new Nagios 3 loaction
  −
mkdir -p /var/nagios/
  −
mv /var/log/nagios/retention.dat /var/nagios/
  −
  −
'''Now install this contrib following the instructions in chapter 'Installation'
  −
'''
  −
service nagios stop
  −
Delete the default configuration files
  −
cd /etc/nagios
  −
rm -rf commands/default.cfg \
  −
  objects \
  −
  contacts/contacts.cfg \
  −
  hostgroups/default.cfg \
  −
  hosts/localhost.cfg \
  −
  servicegroups/default.cfg \
  −
  services/localhost.cfg \
  −
  templates/default.cfg \
  −
  timeperiods/default.cfg
  −
  −
Copy your saved configuration files to /etc/nagios. When you place them into the pre-defined directories contacts, services, hostgroups, templates, commands, hosts, servicegroups, and timeperiods you don't need to adjust nagios.cfg.
  −
  −
Review your config files and do the following
  −
* add <tt>'''use host-pnp'''</tt> to your generic host definition to add an action url for PNP  to all hosts.
  −
* for all services that output performance data add <tt>'''action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$'''</tt> to your service template definitions
  −
* move all options from <tt>'''hostextinfo'''</tt>  definition (except <tt>'''host_name'''</tt> and <tt>'''action_url'''</tt>) to <tt>'''host'''</tt> definition. Delete the <tt>'''hostextinfo'''</tt>  definition.
  −
* do the same for <tt>'''serviceextinfo'''</tt> definitons
  −
  −
When done check your config
  −
nagios -v /etc/nagios/nagios.cfg
  −
and finally start the service
  −
service nagios start
      
==== Backup and Restore ====
 
==== Backup and Restore ====
Line 286: Line 195:  
* PNP4Nagios: http://www.pnp4nagios.org/pnp/start
 
* PNP4Nagios: http://www.pnp4nagios.org/pnp/start
 
----
 
----
[[Category: Contrib]]
+
<nowiki>[[Category: Contrib]]
 
[[Category: Webapps]]
 
[[Category: Webapps]]
 
[[Category: Administration:Monitoring]]
 
[[Category: Administration:Monitoring]]
 +
</nowiki>

Navigation menu