Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
gem804:gemnagios [2008/09/26 07:39] – Bernard Condraugem804:gemnagios [2026/10/16 22:03] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Install Nagios ====== 
  
-===== Upgrade to Nagios 2.11 (Ubuntu Hardy Heron 8.04, from Edgy 6.10) ===== 
- 
-Names of the config files have changed, but content remains mainly the same. The config files reside at 
-  /etc/nagios-plugins/config/ 
- 
-There are new service definitions for ssh access with ports different from the default port 21: 
-  check_ssh_port!<port number> 
- 
-The cgi directory has changed in the apt-get install, if you want to use the nagios checker plugin in firefox, use http://localhost/cgi-bin/nagios2/status.cgi 
- 
-You might need to chown ownership of the existing backuppc directory if you did a clean install, as the user / group id's might not match the previous installation. 
- 
-Also note that due to Gnome's virtual file system the disk space check on localhost will always return a critical error. To avoid this, replace the disk check script with //return-ok// in the services definition of localhost. 
- 
-===== New install ===== 
- 
-Follow the instructions of this link: https://help.ubuntu.com/community/Nagios2 
-Add a symlink to access the stylesheets: 
-  ln -s /etc/nagios2/stylesheets /usr/share/nagios2/htdocs/stylesheets 
- 
-===== Administrator ===== 
- 
-  htpasswd -c /etc/nagios2/htpasswd.users <user> 
- 
-==== Config file ==== 
- 
-Add <user> to all config definitions with nagiosadmin (all are comma-delimited) 
- 
-==== Create user ==== 
- 
-Following command creates the file htpasswd.users in /etc/nagios2: 
-  htpasswd bco /etc/nagios2/htpasswd.users 
- 
-==== Check nagios.cfg ==== 
- 
-  /usr/sbin/nagios2 -v /etc/nagios2/nagios.cfg 
- 
-===== Enable external commands ===== 
- 
-This is necessary to send commands to nagios through the web browser. You need to make the following changes to allow this: 
- 
-==== Config file ==== 
- 
- 
-==== File permissions ==== 
- 
-If you did not change the users of the default install, then nagios runs as user "nagios", the apache web server runs as user "www-data". Make the following changes to the file permissions to enable external commands. 
- 
-  chgrp www-data /var/lib/nagios2 
-  chmod g+rwx /var/lib/nagios2/rw 
-  chmod g+s /var/lib/nagios2/rw 
- 
-Then, restart apache and nagios: 
-  /etc/init.d/apache2 restart 
-  /etc/init.d/nagios2 restart