Zabbix Monitoring Suite auf Debian 4.0 Etch

Mit der Open-Source-Lösung Zabbix steht ein beliebig erweiterbares Monitoring-Programm unter der Open-Source-Lizenz zur Verfügung. Es unterstützt serverseitig eine Vielzahl von Betriebssystemen wie Linux, Solaris, HP-UX, AIX, FreeBSD oder OpenBSD. Im folgenden ist die Installation und Konfiguration unter Debian GNU Linux 4.0 Etch beschrieben.

Installation

Welche vorkonfigurierten Pakete es unter Debian gibt, sehen wir durch aptitude search zabbix.

zabbix-search

p   zabbix-agent                    - software for monitoring of your networks -
p   zabbix-frontend-php             - software for monitoring of your servers --
p   zabbix-server-mysql             - software for monitoring of your networks -
p   zabbix-server-pgsql             - software for monitoring of your networks -

Die Installation unter Debian geht einfach vonstatten.

aptitude install zabbix-server-mysql

The following NEW packages will be automatically installed:
  dbconfig-common debconf-utils exim4 exim4-base exim4-config 
  exim4-daemon-light fping libdbd-mysql-perl libdbi-perl liblockfile1 
  libmysqlclient15off libnet-daemon-perl libpcre3 libplrpc-perl libsensors3 
  libsnmp-base libsnmp9 libsysfs2 mailx mysql-client-5.0 mysql-common 
  mysql-server mysql-server-5.0 perl perl-doc perl-modules psmisc snmpd ucf 
The following NEW packages will be installed:
  dbconfig-common debconf-utils exim4 exim4-base exim4-config 
  exim4-daemon-light fping libdbd-mysql-perl libdbi-perl liblockfile1 
  libmysqlclient15off libnet-daemon-perl libpcre3 libplrpc-perl libsensors3 
  libsnmp-base libsnmp9 libsysfs2 mailx mysql-client-5.0 mysql-common 
  mysql-server mysql-server-5.0 perl perl-doc perl-modules psmisc snmpd ucf 
  zabbix-server-mysql 
0 packages upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 55.3MB of archives. After unpacking 145MB will be used.
Do you want to continue? [Y/n/?] 

NTP ist wichtig für ein Monitoring System, da es hier auf korrekte Zeitdarstellungen ankommt.

  • aptitude install ntp

Und nicht zu vergessen - die locale-Konfiguration muss auch vollzogen sein.

  • dpkg-reconfigure locales
    • de_DE de_DE.ISO-8859-1... done
    • de_DE.UTF-8 de_DE.UTF-8... done
    • de_DE@euro de_DE.ISO-8859-15@euro... done
    • en_US en_US.ISO-8859-1... done

Server Konfiguration

Zunächst muß das mysql root Kennwort gesetzt werden.

zabbix:~# mysqladmin -u root password 'ganzgeheim'

Jetzt können o.a. Pakete konfiguriert werden.

zabbix:~# dpkg --configure -a

Setting up zabbix-server-mysql (1.1.4-10) ...

zabbix-server-mysql must have a database installed and configured before it can be used. If you like, this can be handled with dbconfig-common. If you are an advanced database administrator and know that you want to perform this configuration manually, or if your database has already been installed and configured, you should refuse this option. Details on what needs to be done should most likely be provided in /usr/share/doc/zabbix-server-mysql. Otherwise, you should probably choose this option.

  • Configure database for zabbix-server-mysql with dbconfig-common? [YES]

What is the password for the administrative account with which this package should create its MySQL database and user?

  • Password of your database’s administrative user: [oben angegebenes mysqladmin passwort]

Please provide a password for zabbix-server-mysql to register with the database server. If left blank, a random password will be generated for you.

  • MySQL application password for zabbix-server-mysql: [zabbix]

Creating config file /etc/zabbix/zabbix_server.conf with new version

granting access to database zabbix for zabbix@localhost: success.
verifying access for zabbix@localhost: success.
creating database zabbix: success.
verifying database zabbix exists: success.
populating database via sql...  done.
dbconfig-common: flushing administrative password
Starting Zabbix server: zabbix_server

Dienste definieren in /etc/services

cat << EOF >> /etc/services
zabbix_agent 10050/tcp
zabbix_trap 10051/tcp

Zabbix Webfrontend + lokaler Client

  • aptitude install zabbix-frontend-php zabbix-agent

zabbix-frontend

The following NEW packages will be automatically installed:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-common defoma file 
  fontconfig-config libapache2-mod-php5 libapr1 libaprutil1 libexpat1 
  libfontconfig1 libfreetype6 libft-perl libgd2-xpm libjpeg62 libmagic1 
  libpng12-0 libpq4 libsqlite3-0 libt1-5 libttf2 libx11-6 libx11-data 
  libxau6 libxdmcp6 libxml2 libxpm4 mime-support php5-common php5-gd 
  php5-mysql sgml-base ttf-dejavu x11-common xml-core 
The following NEW packages will be installed:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-common defoma file 
  fontconfig-config libapache2-mod-php5 libapr1 libaprutil1 libexpat1 
  libfontconfig1 libfreetype6 libft-perl libgd2-xpm libjpeg62 libmagic1 
  libpng12-0 libpq4 libsqlite3-0 libt1-5 libttf2 libx11-6 libx11-data 
  libxau6 libxdmcp6 libxml2 libxpm4 mime-support php5-common php5-gd 
  php5-mysql sgml-base ttf-dejavu x11-common xml-core zabbix-agent 
  zabbix-frontend-php 
0 packages upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.0MB of archives. After unpacking 32.9MB will be used.
Do you want to continue? [Y/n/?] 
...
Setting up zabbix-agent (1.1.4-10) ...

Creating config file /etc/zabbix/zabbix_agentd.conf with new version

Creating config file /etc/zabbix/zabbix_agent.conf with new version
Starting Zabbix agent: zabbix_agentd

Setting up zabbix-frontend-php (1.1.4-10) ...

Creating config file /etc/zabbix/dbconfig.php with new version
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.2 for ServerName
 waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.2 for ServerName .

Einloggen mit Admin ohne Kennwort.

  • Profile: Passwort setzen!!

Neuer User:

  • Configuration » Create User, wenn dieser erstellt ist, dann auswählen und
  • New Permission : Default Permission : Add : Resource ID 0 für admin
  • New Permission : Default Permission : Read-Write : Resource ID 0 für admin

Host Konfiguration

  • Configuration » Hosts » Create Host Group (Sofern die Standardgruppe “Templates” existiert, haben wir schon eine Basisüberwachung).
  • Configuration » Hosts » Create Host + Save
Name zabbix
Groups [X] Templates
New group
Use IP address [X]
IP address 127.0.0.1
Port 10050
Status Monitored
Link with Template Unix_t
Use profile [-]

Jetzt werden die Trigger erstellt.

  • Montitoring » Latest Data zeigt uns die aktuellen Daten.
  • Configuration » Triggers » Host == “hostname” gibt uns die Möglichkeit, die Trigger für unseren Host anzupassen.
  • Configuration » Items »

Troubleshooting

Bei Problemen mit Zabbix sind die folgenden Logdateien zu prüfen:

  • /var/log/zabbix-agent/zabbix_agentd.log
  • /var/log/zabbix-server/zabbix_server.log

Die Konfigurationsdatien für Server, Agent und Web-Interface sind:

  • /etc/zabbix/apache.conf
  • /etc/zabbix/dbconfig.php
  • /etc/zabbix/zabbix_agentd.conf
  • /etc/zabbix/zabbix_server.conf
 
wissen/monitoring/zabbix-open-source-monitoring-tool.txt · Zuletzt geändert: 05.09.2010 20:31
 
Recent changes RSS feed Donate Valid XHTML 1.0 Valid CSS Recent cached RSS feed cacert-signed web site: inhalt.serviert.de