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.
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.
Und nicht zu vergessen - die locale-Konfiguration muss auch vollzogen sein.
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.
What is the password for the administrative account with which this package should create its MySQL database and user?
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.
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-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.
Neuer User:
| 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.
Bei Problemen mit Zabbix sind die folgenden Logdateien zu prüfen:
Die Konfigurationsdatien für Server, Agent und Web-Interface sind: