Differences

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

how_to_install_nagios_under_debian [2006/10/21 09:47]
82.226.166.133
how_to_install_nagios_under_debian [2006/10/21 09:51] (current)
82.226.166.133
Line 1: Line 1:
 +[[wp>:Nagios|Nagios]] is system and network monitoring application.
 +Because many people experience installation problems under [[Debian]],
 +there are some notes about the installation of Nagios with the MySql support under Debian sarge.
 +
 +====== Configuration ======
 +
 +===== Database access =====
 + 
 +Unless it already exists, create a database:
 +
 +  mysqladmin -u root -p create nagios
 +
 +Then, load the nagios database schema:
 +
 +  zcat /usr/share/doc/nagios-mysql/create_mysql.gz | mysql -u root -p nagios
 +
 +Grant the necessary privileges to the nagios database login:
 +
 +  mysql -u root -p nagios
 +  GRANT SELECT, INSERT, UPDATE, DELETE ON nagios.* TO nagios@localhost IDENTIFIED BY 'somepass';
 +  GRANT LOCK TABLES ON nagios.* TO nagios@localhost IDENTIFIED BY 'somepass';
 +
 +Edit the ''/etc/nagios/resource.cfg'' and ''/etc/nagios/cgi.cfg'' files to set the database name, user and password, beginning with the ''resource.cfg'' file lines :
 +
 +  #xsddb_host=localhost
 +  #xsddb_port=someport
 +  #xsddb_database=
 +  #xsddb_password=
 +  #xsddb_optimize_data=1
 +  #xsddb_optimize_interval=3600
 +
 +After editing, they should read similarly to :
 +
 +  xsddb_host=localhost
 +  #xsddb_port=someport
 +  xsddb_database=nagios
 +  xsddb_password=password_set_above_in_mysql
 +  #xsddb_optimize_data=1
 +  #xsddb_optimize_interval=3600
 +
 +Note that this assumes that you've left mysql on the standard port.  If not, please adjust the port setting accordingly and uncomment that line.  After you have edited the status data DB settings, you will need to edit the comment, downtime, and retention settings; you can either uncomment each appropriate line and duplicate the appropriate settings, or you can copy the whole block of settings and change the setting names (e.g. ''xsddb_host'' becomes ''xcddb_host'' for comment data, ''xdddb_host'' for downtime data, and ''xrddb_host'' for retention data).
 +
 +Now edit the /etc/nagios/cgi.cfg and put a # in front of the line :
 +
 +  nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/log/nagios/status.log 5 'nagios'
 +
 +and remove the # in front of the line ::
 +
 +  nagios_check_command=/etc/nagios/check_nagios_db
 +
 +Note: you need to restart the nagios daemon to use these new settings ::
 +
 +  $> sudo /etc/init.d/nagios restart
 +
 +You should see this message in the ''/var/log/nagios/nagios.log'' log file ::
 +
 +  $> tail -f /var/log/nagios/nagios.log
 +  [1072703571] Nagios 1.1 starting... (PID=10166)
 +
 +And nothing which begins with ''Error: '' ;-)
 +
 +===== Apache configuration =====
 +
 +Include the ''/etc/nagios/apache.conf'' into your apache configuration. You can add this line to your ''/etc/apache/httpd.conf'' :
 +
 +  Include /etc/nagios/apache.conf
 +
 +==== Apache authentication ====
 +
 +Create a htpasswd entry for the ''nagiosadmin'' user :
 +
 +  sudo htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
 +
 +====== Bug fixes ======
 +
 +===== Permissions on /etc/nagios-plugins prevent nagios from working =====
 +
 +If you have followed all other steps, including those in ''/usr/share/doc/nagios-mysql/README.Debian'', and are still being told that you lack permission to view host or service information, verify that ''/etc/nagios-plugins'' is owned by user ''nagios'' and group ''nagios'' so that the CGI scripts can access it.
 +
 +====== Links ======
 +
 +  * Overview of nagios source package: http://packages.qa.debian.org/n/nagios.html
 +  * Installing nagios-text on debian (sid): http://tcx.kappa.ro/~seba/tips/three_tips_configuring_nagios-text_on_debian_sid.html
 +  * Installing nagios-sql on debian: http://tcx.kappa.ro/~seba/tips/tips_configurare_nagios-mysql-debian.html
 +  * OnLamp articles
 +    * Installing Nagios: http://www.onlamp.com/pub/a/onlamp/2002/09/05/nagios.html
 +    * Nagios part 2: http://www.onlamp.com/pub/a/onlamp/2002/09/26/nagios.html
 +  * Further Informations
 +    * Checklist for Implementation Nagios Network Monitoring: http://www.pasicx.net/produkte/nagios/projektplan-mindmap.html
 +    * Projectplan for Implementation Nagios Network Monitoring: http://www.pasicx.net/produkte/nagios/projektplan-mindmap/
 +  * Nagios Workshops in 2006
 +    * 14.09.2006 Workshop "Citrix, Nagios / Monitoring" / Nuernberg
 +    * 11/2006 "Citrix Monitoring with Nagios" / Aschaffenburg click here for more details: http://www.pasicx.net/events/
 
how_to_install_nagios_under_debian.txt · Last modified: 2006/10/21 09:51 by 82.226.166.133
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki