Nagios Installation in Debian 5.0 Lenny

Aus Wiki Thomas-Krenn.AG
Wechseln zu: Navigation, Suche

Dieser Artikel zeigt die Installation von Nagios 3.0.6 in Debian 5.0 Lenny. Es werden dabei ausschließlich die direkt in Debian Lenny enthaltenen Pakete verwendet.

Inhaltsverzeichnis

Installation von Nagios

Die Installation von Nagios und den Plugins wird einfach über folgendes Kommando durchgeführt:

apt-get install nagios3 nagios-plugins

Damit ein Zugriff auf das Webinterface möglich ist muss noch das Passwort für den User nagiosadmin gesetzt werden:

htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

Das Nagios Webinterface ist nun unter http://SERVER-IP/nagios3/ erreichbar:

Nagios 3.0.6 Webinterface nach der Installation in Debian 5.0 Lenny

External Commands

Damit Kommandos über das Webinterface ausgeführt werden dürfen sind einige Schritte erforderlich. Diese sind in /usr/share/doc/nagios3/README.Debian auch beschrieben.[1]

Zuerst wird die Option check_external_commands in der Konfigurationsdatei /etc/nagios3/nagios.cfg auf 1 gesetzt[2]:

# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below).  By default
# Nagios will *not* check for external commands, just to be on the
# cautious side.  If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands

check_external_commands=1

Danach müssen noch die Dateiberechtigungen angepasst werden:

/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start

Installation von NagiosGrapher

NagiosGrapher ist eine von der Firma Netways entwickelte Nagios Add-On Software zur automatischen Erstellung von Performance-Graphen.

Die Installation erfolgt wieder über apt-get:

apt-get install nagiosgrapher

In der Konfigurationsdatei /etc/nagios3/nagios.cfg müssen zwei Konfigurationsparameter angepasst werden:

Hier dazu noch der vollständige Auszug inklusive der Kommentare aus der Konfiguraionsdatei:

# PROCESS PERFORMANCE DATA OPTION
# This determines whether or not Nagios will process performance
# data returned from service and host checks.  If this option is
# enabled, host performance data will be processed using the
# host_perfdata_command (defined below) and service performance
# data will be processed using the service_perfdata_command (also
# defined below).  Read the HTML docs for more information on
# performance data.
# Values: 1 = process performance data, 0 = do not process performance data

process_performance_data=1

# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
# These commands are run after every host and service check is
# performed.  These commands are executed only if the
# enable_performance_data option (above) is set to 1.  The command
# argument is the short name of a command definition that you
# define in your host configuration file.  Read the HTML docs for
# more information on performance data.

#host_perfdata_command=process-host-perfdata
#service_perfdata_command=process-service-perfdata
service_perfdata_command=ngraph-process-service-perfdata-pipe

Nach dieser Änderung ist ein Neustart von Nagios erforderlich:

/etc/init.d/nagios3 stop
/etc/init.d/nagios3 start

In Nagios erscheint nun neben jeden geeigneten Service-Eintrag ein Symbol das zum jeweiligen Nagios Grapher verlinkt::

Nagios 3.0.6 Webinterface mit Symbolen für den Nagios Grapher neben jeden geeigneten Service-Eintrag

Das folgende Bild zeigt als Beispiel die Anzeige der Load Average:

Nagios Grapher Beispiel für die load average

Einzelnachweise

  1. http://www.velt.de/blog/sven/nagios-3-0-und-andere-debian-packages#comment-96
  2. http://www.nagios-wiki.de/nagios/doku3/extcommands

Weitere Informationen


Share/Save/Bookmark  Feedback zu diesem Artikel geben
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Kategorien
Drucken/exportieren
Werkzeuge