Translations of this page:
ODT Export
 

2. Installation

1. How to Get Zabbix

Check the Zabbix Home Page at http://www.zabbix.com for information about the current version and for downloading instructions.

Zabbix is distributed as a source package, however it is also included into number of OS distributions pre-compiled.

 

2. Requirements

2.1. Hardware requirements

2.1.1. Memory Requirements

Zabbix requires both physical and disk memory. 128 MB of physical memory and 256 MB of free disk space could be a good starting point. However, the amount of required disk memory obviously depends on the number of hosts and parameters that are being monitored. If you're planning to keep a long history of monitored parameters, you should be thinking of at least a couple of gigabytes to have enough space to store the history in the database. Each Zabbix daemon process requires several connections to a database server. Amount of memory allocated for the connection depends on configuration of the database engine.

The more physical memory you have, the faster the database (and therefore Zabbix) works!

2.1.2. CPU Requirements

Zabbix and especially Zabbix database may require significant CPU resources depending on number of monitored parameters and chosen database engine.

2.1.3. Other hardware

A serial communication port and a serial GSM Modem required for using SMS notification support in Zabbix.

2.1.4. Examples of hardware configuration

The table provides several hardware configurations:

Name Platform CPU/Memory Database Monitored hosts
Small Ubuntu LinuxPII 350MHz 256MBMySQL MyISAM20
MediumUbuntu Linux 64 bitAMD Athlon 3200+ 2GBMySQL InnoDB500
LargeUbuntu Linux 64 bitIntel Dual Core 6400 4GBRAID10 MySQL InnoDB or PostgreSQL>1000
Very largeRedHat EnterpriseIntel Xeon 2xCPU 8GBFast RAID10 MySQL InnoDB or PostgreSQL>10000

Actual configuration depends on number of active items and refresh rates very much. It is highly recommended to run the database on a separate box for large installations.

2.2. Supported Platforms

Due to security requirements and mission-critical nature of monitoring server, UNIX is the only operating system that can consistently deliver the necessary performance, fault tolerance and resilience. Zabbix operates on market leading versions.

Zabbix is tested on the following platforms:

  • AIX
  • FreeBSD
  • HP-UX
  • Linux
  • Mac OS/X
  • NetBSD
  • OpenBSD
  • SCO Open Server
  • Solaris
  • Windows 2000, 2003, XP, Vista (only Zabbix agent)

Zabbix may work on other Unix-like operating systems as well.

2.3. Software Requirements

Zabbix is built around modern Apache WEB server, leading database engines, and the PHP scripting language.

The following software is required to run Zabbix:

SoftwareVersionComments
Apache 1.3.12 or later
PHP 5.0 or later
PHP modules:
php-gd
GD 2.0 or later PHP GD module must support PNG images.
PHP TrueType support --with-ttf
PHP bc support php-bcmath, --enable-bcmath
PHP XML support php-xml or php5-dom, if provided as a separate package by the distributor
PHP session support php-session, if provided as a separate package by the distributor
PHP socket support php-net-socket, --enable-sockets. Required for user script support.
PHP multibyte support php-mbstring, --enable-mbstring
MySQL
php-mysql
3.22 or later Required if MySQL is used as Zabbix back end database.
Oracle
php-oci8
Required if Oracle is used as Zabbix back-end database.
PostgreSQL
php-pgsql
7.0.2 or later Required if PostgreSQL is used as Zabbix back-end database.
Consider using PostgreSQL 8.x or later for much better performance.
It is suggested to use at least PostgreSQL 8.3, which introduced much better VACUUM performance.
SQLite
php-sqlite3
3.3.5 or later Required if SQLite is used as Zabbix back-end database.

Zabbix may work on previous versions of Apache, MySQL, Oracle, and PostgreSQL as well.

For other fonts than the default DejaVu, PHP function imagerotate might be required. If it is missing, these fonts might be rendered incorrectly in Monitoring → Overview header and other locations. This function is only available if PHP is compiled with bundled GD, which is not the case in Debian and other distributions.

2.3.1. WEB browser on client side

Support for HTML and PNG images is required. Cookies and Java Script must be enabled. Latest versions of Mozilla Firefox, Microsoft Internet Explorer, Opera and Konqueror are supported. Other browsers (Google Chrome, Apple Safari) may work with Zabbix as well.

2.4. Server requirements

RequirementDescription
OpenIPMI Required for IPMI support
libssh2 Required for SSH support. Version 1.0 or higher.

2.5. Choice of database engine

Zabbix Server and Proxy support four database engines:

  • MySQL
  • Oracle
  • PostgreSQL
  • SQLite

2.6. Database size

Zabbix configuration data requires fixed amount of disk space and does not grow much.

Zabbix database size mainly depends on these variables, which define amount of stored historical data:

  • Number of processed values per second

This is average number of new values Zabbix server receives every second. For example, if we have 3000 items for monitoring with refresh rate of 60 seconds, number of values per seconds is calculated as 3000/60 = 50.

It means that 50 new values are added to Zabbix database every second.

  • Housekeeper settings for history

Zabbix keeps values for a fixed period of time, normally several weeks or months. Each new value required certain amount of disk space for data and index.

So, if we would like to keep 30 days of history and we receive 50 values per second, total number of values will be around (30*24*3600)* 50 = 129.600.000, or about 130M of values.

Depending on used database engine, type of received values (floats, integers, strings, log files, etc), disk space for keeping a single value may vary from 40 bytes to hundreds of bytes. Normally it is around 50 bytes per value. In our case, it means that 130M of values will require 130M * 50 bytes = 6.5GB of disk space.

  • Housekeeper setting for trends

Zabbix keeps 1 hour max/min/avg/count statistics for each item in table trends. The data is used for trending and long period graphs.

Zabbix database, depending on database type, requires about 128 bytes per each total. Suppose we would like to keep trend data for 5 years. 3000 values will require (3000/1800)*(24*3600*365)* 128 = 6.3GB per year, or 31.5GB for 5 years.

  • Housekeeper settings for events

Each Zabbix event requires approximately 130 bytes of disk space. It is hard number of events generated by Zabbix daily. In worst case scenario, we may assume that Zabbix generates one event per second.

It means that if we want to keep 3 years of events, this would require 3*365*24*3600* 130 = 11GB

The table contains formulas that can be used to calculate disk space required for Zabbix system:

ParameterFormula for required disk space (in bytes)
Zabbix configuration Fixed size. Normally 10MB or less.
History days*(items/refresh rate)*24*3600*bytes
items : number of items
days : number of days to keep history
refresh rate : average refresh rate of items
bytes : number of bytes required to keep single value, depends on database engine, normally 50 bytes.
Trends days*(items/1800)*24*3600*bytes
items : number of items
days : number of days to keep history
bytes : number of bytes required to keep single trend, depends on database engine, normally 128 bytes.
Events days*events*24*3600*bytes
events : number of event per second. One (1) event per second in worst case scenario.
days : number of days to keep history
bytes : number of bytes required to keep single trend, depends on database engine, normally 130 bytes.

So, the total required disk space can be calculated as:
Configuration + History + Trends + Events
The disk space will NOT be used immediately after Zabbix installation. Database size will grow then it will stop growing at some point, which depends on hosekeeper settings.

Disk space requirements for nodes in distributed setup are calculated in a similar way, but this also depends on a total number of child nodes linked to a node.

2.7. Time synchronisation

It is very important to have precise system date on server with Zabbix running. ntpd is the most popular daemon that synchronizes the host's time with the time of other machines.

2.3. Components

2.3.1. Zabbix Components

Zabbix consists of several major software components, the responsibilities of which are outlined below.

2.3.2. Zabbix Server

This is the centre of the Zabbix software. The Server can remotely check networked services (such as web servers and mail servers) using simple service checks, but it is also the central component to which the Agents will report availability and integrity information and statistics. The Server is the central repository in which all configuration, statistical and operational data are stored, and it is the entity in the Zabbix software that will actively alert administrators when problems arise in any of the monitored systems.

Zabbix can also perform agent-less monitoring and also monitor network devices using SNMP agents.

2.3.3. Zabbix Proxy

The Proxy is an optional part of Zabbix deployment. The Proxy collects performance and availability data on behalf of Zabbix Server. All collected data is buffered locally and transferred to Zabbix Server the Proxy belongs to.

Zabbix Proxy is an ideal solution for a centralized monitoring of remote locations, branches, networks having no local administrators.

Zabbix Proxies can also be used to distribute load of a single Zabbix Server. In this case, only Proxies collect data thus making processing on the Server less CPU and disk I/O hungry.

2.3.4. Zabbix Agent

In order to actively monitor local resources and applications (such as harddrives, memory, processor statistics etc.) on networked systems, those systems must run the Zabbix Agent. The Agent will gather operational information from the system on which it is running, and report these data to the Zabbix for further processing. In case of failures (such as a harddisk running full, or a crashed service process), the Zabbix Server can actively alert the administrators of the particular machine that reported the failure.

The Zabbix Agents are extremely efficient because of use of native system calls for gathering statistical information.

2.3.5. The WEB Interface

In order to allow easy access to the monitoring data and then configuration of Zabbix from anywhere and from any platform, the Web-based Interface is provided. The Interface is a part of the Zabbix Server, and is usually (but not necessarily) run on the same physical machine as the one running the Zabbix Server.

Zabbix front-end must run on the same physical machine if SQLite is used.

 

4. Installation from Source

4.1. Software requirements

Building of Zabbix server or agents from sources requires additional software.

The following software is required to compile Zabbix:

One of the following database engines:

  • MySQL Headers and Libraries

Version 3.22 or later required.

  • Oracle Headers and Libraries

Sqlora8 headers and libraries are required.

  • PostgreSQL Headers and Libraries

Version 7.0.2 or later required. Consider using PostgreSQL 8.x for much better performance.

  • SQLite Headers and Libraries

Version 3.3.5 or later required.

Usually provided as part of mysql-dev, postgresql-dev, sqlite3-dev packages.

NET-SNMP (or UCD-SNMP) library and header files

Required for SNMP support. Optional.

Iksemel library and header files

Required to enable Jabber messaging. Optional.

Libcurl library and header files

Version 7.13.1 or higher required for WEB monitoring module. Optional.

C Compiler

C compiler is required. GNU C compiler is the best choice for open platforms. Other (HP, IBM) C compilers may be used as well.

GNU Make

GNU make is required to process Zabbix Makefiles.

4.2. Structure of Zabbix distribution

  • docs

The directory contains this Manual in PDF format

  • src

The directory contains sources for all Zabbix processes except frontends.

  • src/zabbix_server

The directory contains Makefile and sources for zabbix_server.

  • src/zabbix_agent

The directory contains Makefile and sources for zabbix_agent and zabbix_agentd.

  • src/zabbix_get

The directory contains Makefile and sources for zabbix_get.

  • src/zabbix_sender

The directory contains Makefile and sources for zabbix_sender.

  • include

The directory contains include Zabbix files.

  • misc
    • misc/init.d

The directory contains start-up scripts for different platforms.

  • frontends
    • frontends/php

The directory contains files of PHP frontend.

  • create

The directory contains SQL script for initial database creation.

  • create/schema

Database creation schemas.

  • create/data

Data for initial database creation.

  • upgrades

The directory contains upgrade procedures for different versions of Zabbix.

4.3. Zabbix Server

Server side

Step 1

Create the Zabbix superuser account

This is the user the server will run as. For production use you should create a dedicated unprivileged account ('zabbix' is commonly used). Running Zabbix as 'root','bin', or any other account with special rights is a security risk. Do not do it!

Zabbix server process (zabbix_server) is protected from being run under root account.

Step 2

Untar Zabbix sources

shell> gunzip zabbix-1.8.tar.gz && tar -xvf zabbix-1.8.tar
Step 3

Create the Zabbix database

Zabbix comes with SQL scripts used to create the required database schema and also to insert a default configuration. There are separate scripts for MySQL, Oracle, PostgreSQL and SQLite.

For MySQL:

shell> mysql -u<username> -p<password>
mysql> create database zabbix character set utf8;
mysql> quit;
shell> cd create/schema
shell> cat mysql.sql | mysql -u<username> -p<password> zabbix
shell> cd ../data
shell> cat data.sql | mysql -u<username> -p<password> zabbix
shell> cat images_mysql.sql | mysql -u<username> -p<password> zabbix

For Oracle (we assume that user zabbix with password password exists and has permissions to create database objects):

shell> cd create
shell> sqlplus zabbix/password
sqlplus> set def off
sqlplus> @schema/oracle.sql
sqlplus> @data/data.sql
sqlplus> @data/images_oracle.sql
sqlplus> exit

For PostgreSQL:

shell> psql -U <username>
psql> create database zabbix; 
psql> \q 
shell> cd create/schema 
shell> cat postgresql.sql | psql -U <username> zabbix 
shell> cd ../data 
shell> cat data.sql | psql -U <username> zabbix
shell> cat images_pgsql.sql | psql -U <username> zabbix

For SQLite:

shell> cd create/schema
shell> cat sqlite.sql | sqlite3 /var/lib/sqlite/zabbix.db 
shell> cd ../data 
shell> cat data.sql | sqlite3 /var/lib/sqlite/zabbix.db
shell> cat images_sqlite3.sql | sqlite3 /var/lib/sqlite/zabbix.db

The database will be automatically created if it does not exist.

Step 4

Configure and compile the source code for your system

The sources must be compiled for both the server (monitoring machine) as well as the clients (monitored machines). To configure the source for the server, you must specify which database will be used.

shell> ./configure --enable-server --with-mysql --with-net-snmp --with-jabber --with-libcurl # for MySQL + Jabber + WEB monitoring

or

shell> ./configure --enable-server --with-pgsql --with-net-snmp --with-jabber --with-libcurl # for PostgreSQL  + Jabber + WEB monitoring

or

shell> ./configure --enable-server --with-oracle=/home/zabbix/sqlora8 --with-net-snmp --with-jabber --with-libcurl # for Oracle + Jabber + WEB monitoring

Use flag –with-oracle to specify location of sqlora8 library. The libary is required for Oracle support. The library can be found at libsqlora8 homepage

Use flag –enable-static to statically link libraries. If you plan to distribute compiled binaries among different servers, you must use this flag to make these binaries work without required libraries. –enable-static does not work under Solaris. Flag –with-ucd-snmp can be used instead of –with-net-snmp. If no SNMP support required, both –with-net-snmp and –with-ucd-snmp may be skipped.

However, if you want to compile client binaries along with server binaries, run:

shell> ./configure  --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber --with-libcurl

Parameter –enable-static may be used to force static linkage.

Step 5

Make and install everything

shell> make install

By default,

make install

will install all the files in /usr/local/bin, /usr/local/lib etc. Make sure that you have enough permissions.

You can specify an installation prefix other than /usr/local using –prefix, for example –prefix=/home/zabbix. In this case daemon binaries will be installed under <prefix>/sbin, while utilities under <prefix>/bin. Man pages will be installed under <prefix>/share.

Step 6

Configure /etc/services

The step is optional. However, it is recommended. On the client (monitored) machines, add the following lines to /etc/services:

zabbix-agent    10050/tcp  Zabbix Agent
zabbix-agent    10050/udp  Zabbix Agent
zabbix-trapper  10051/tcp  Zabbix Trapper
zabbix-trapper  10051/udp  Zabbix Trapper 

Note that the port numbers are offical Zabbix ports registered in IANA.

Step 7

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent

Restart inetd

shell> killall -HUP inetd

Modify default settings in configuration files

Step 8

Configure /etc/zabbix/zabbix_agent.conf

You need to configure this file for every host having zabbix_agent installed. The file should contain IP address of Zabbix server. Connections from other hosts will be denied. You may take misc/conf/zabbix_agent.conf as example.

Step 9

Configure /etc/zabbix/zabbix_agentd.conf

You need to configure this file for every host with zabbix_agentd installed. The file should contain the IP address of the Zabbix server. Connections from other hosts will be denied. You may take misc/conf/zabbix_agentd.conf as example.

Step 10

Configure /etc/zabbix/zabbix_server.conf

For small installations (up to ten monitored hosts), default parameters are sufficient. However, you should change default parameters to maximize performance of Zabbix. See section [Performance tuning] for more details.

You may take misc/conf/zabbix_server.conf as example.

Step 11

Run server processes

Run zabbix_server on server side.

shell> cd sbin
shell> ./zabbix_server
Step 12

Run agents

Run zabbix_agentd where necessary.

shell> cd bin
shell> ./zabbix_agentd

4.4. Zabbix Proxy

Zabbix Proxy is a special process. It is not required to run the process.

Step 1

Create the Zabbix superuser account

This is the user the Proxy will run as. For production use you should create a dedicated unprivileged account ('zabbix' is commonly used). Running Zabbix Proxy as 'root','bin', or any other account with special rights is a security risk. Do not do it!

Zabbix Proxy process (zabbix_proxy) is protected from being run under root account.

Step 2

Untar Zabbix sources

shell> gunzip zabbix-1.8.tar.gz && tar -xvf zabbix-1.8.tar
Step 3

Create the Zabbix database. Optional.

Zabbix Proxy process will create database automatically on the first run if it does not exist. It will use existing database otherwise. Database auto-creation is supported for SQLite only.

Zabbix comes with SQL scripts used to create the required database schema. There are separate scripts for MySQL, Oracle, PostgreSQL and SQLite.

For MySQL:

shell> mysql -u<username> -p<password>
mysql> create database zabbix character set utf8; 
mysql> quit; 
shell> cd create/schema
shell> cat mysql.sql | mysql -u<username> -p<password> zabbix

For Oracle (we assume that user ‘zabbix’ with password ‘password’ exists and has permissions to create database objects):

shell> cd create/schema 
shell> cat oracle.sql | sqlplus zabbix/password >out.log

Check file out.log for any error messages.

For PostgreSQL:

shell> psql -U <username>
psql> create database zabbix; 
psql> \q 
shell> cd create/schema 
shell> cat postgresql.sql | psql -U <username> zabbix 

For SQLite:

shell> cd create/schema
shell> cat sqlite.sql | sqlite3 /var/lib/sqlite/zabbix.db 

The database will be automatically created if it does not exist.

Step 4

Configure and compile the source code for your system

The sources must be compiled to enable compilation of Zabbix Proxy process. To configure the source for the Proxy, you must specify which database will be used.

shell> ./configure --enable-proxy --with-mysql --with-net-snmp –with-libcurl # for MySQL + WEB monitoring

or

shell> ./configure --enable-proxy --with-pgsql --with-net-snmp –with-libcurl # for PostgreSQL  + WEB monitoring

or

shell> ./configure --enable-proxy --with-oracle=/home/zabbix/sqlora8 --with-net-snmp –with-libcurl # for Oracle + WEB monitoring

Use flag –with-oracle to specify location of sqlora8 library. The libary is required for Oracle support. The library can be found at libsqlora8 homepage.

Use flag –enable-static to statically link libraries. If you plan to distribute compiled binaries among different hosts, you must use this flag to make these binaries work without required libraries. –enable-static does not work under Solaris. Flag –with-ucd-snmp can be used instead of –with-net-snmp. If no SNMP support required, both –with-net-snmp and –with-ucd-snmp may be skipped.

However, if you want to compile client binaries along with proxy binaries, run:

shell> ./configure  --enable-proxy --enable-agent --with-mysql –with-net-snmp –with-libcurl

Parameter —enable-static may be used to force static linkage.

Step 5

Make and install everything

shell> make install

By default,

make install

will install all the files in /usr/local/bin, /usr/local/lib etc. You can specify an installation prefix other than /usr/local using –prefix

Step 6

Configure /etc/services

The step is optional. However, it is recommended. On the client (monitored) machines, add the following lines to /etc/services:

zabbix_agent 10050/tcp
zabbix_trap 10051/tcp
Step 7

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent

Restart inetd

shell> killall -HUP inetd

Modify default settings in configuration files

Step 8

Configure /etc/zabbix/zabbix_proxy.conf

For small installations (up to ten monitored hosts), default parameters are sufficient. However, you should change default parameters to maximize performance of Zabbix Proxy. Make sure you have correct Hostname and Server parameters set. You may take misc/conf/zabbix_proxy.conf as example.

Step 9

Run Proxy processes

Run zabbix_proxy:

shell> cd sbin
shell> ./zabbix_proxy

4.5. Zabbix Agent

Client side

Step 1

Create the Zabbix account

This is the user the agent will run as. For production use you should create a dedicated unprivileged account (“zabbix” is commonly used). Zabbix agents have protection against running under root account.

Step 2

Untar Zabbix sources

shell> gunzip zabbix-1.6.tar.gz && tar xvf zabbix-1.6.tar
Step 3

Configure and compile the source code for your system

The sources must be compiled for the client only.

To configure the source for the client:

shell> ./configure --enable-agent

Use flag –enable-static to statically link libraries. If you plan to distribute compiled binaries among different hosts, you must use this flag to make these binaries work without required libraries.

Step 4

Build agent

shell> make

Copy created binaries from bin/ to /opt/zabbix/bin or any other directory. Other common directories are /usr/local/bin or /usr/local/zabbix/bin.

Step 5

Configure /etc/services

The step is not real requirement. However, it is recommended.

On the client (monitored) machines, add the following lines to /etc/services:

zabbix_agent 10050/tcp 
zabbix_trap 10051/tcp 
Step 6

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent

Restart inetd

shell> killall -HUP inetd
Step 7

Configure /etc/zabbix/zabbix_agent.conf

You need to configure this file for every host having zabbix_agent installed. The file should contain IP address of Zabbix server. Connections from other hosts will be denied. Note, that no end of line character should present in the file.

You may take misc/conf/zabbix_agent.conf as example.

Step 8

Configure /etc/zabbix/zabbix_agentd.conf

You need to configure this file for every host with zabbix_agentd installed. The file should contain IP address of Zabbix server. Connections from other hosts will be denied. You may take misc/conf/zabbix_agentd.conf as example.

Step 9

Run zabbix_agentd on all monitored machines

shell> /opt/zabbix/bin/zabbix_agentd

You should not run zabbix_agentd if you have chosen to use zabbix_agent!

Make sure that your system allows allocation of 2MB of shared memory, otherwise the agent may not start and you will see “Can't allocate shared memory for collector.” in agent's log file. This may happen on Solaris 8.

4.6. Zabbix WEB Interface

Step 0

Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying PHP files into webserver HTML documents directory. It is suggested to use subdirectory instead of HTML root.

Common locations of HTML documents directory for Apache web server include:

  • /usr/local/apache2/htdocs (default directory when installing Apache from source)
  • /srv/www/htdocs (OpenSUSE, SLES)
  • /var/www/html (Fedora, RHEL, CentOS)
  • /var/www (Debian, Ubuntu)

To create subdirectory and copy Zabbix frontend files to it, execute the following commands, replacing actual directory:

mkdir <htdocs>/zabbix
cd frontends/php
cp -a . <htdocs>/zabbix
Step 1

Point your browser to Zabbix URL.

Step 2

Read and accept GPL v2.

Step 3

Make sure that all software pre-requisites are met.

Pre-requisiteMinimum valueDescription
PHP version 5.0
PHP Memory limit 8MB In php.ini:
memory_limit = 128M
PHP post max size 8MB In php.ini:
post_max_size = 8M
PHP max execution time 300 seconds In php.ini:
max_execution_time = 300
PHP database support One of: MySQL, Oracle, PostgreSQL, SQLite One of the following modules must be installed:
php-mysql, php-sqlora8, php-pgsql, php-sqlite3
PHP BC math Any Compiled in PHP5.
GD Version 2.0 or higher Module php-gd.
Image formats At least PNG Module php-gd.
Step 4

Configure database settings. Zabbix database must already be created.

Step 5

Enter Zabbix Server details.

Step 6

See summary of settings.

Step 7

Download configuration file and place it under conf/.

Step 8

Finishing installation.

Step 9

For distributed monitoring only!

If used in a distributed environment you have to run:

shell> ./zabbix_server –n <nodeid>

where Node ID is an unique Node identificator. For example:

shell> ./zabbix_server –n 1

This will convert database data for use with Node ID '1' and also adds a local node.

Step 10

Zabbix frontend is ready! Default user name is Admin, password zabbix.

 

5. Upgrading

5.1. Change level releases

For change level releases only upgrading of server binary and frontend is required. If mentioned in release notes, optional indexes may be added to the database to improve performance. Upgrading can be easily performed over several versions, for example, upgrading from 1.8.1 to 1.8.3 can be performed in single step.

5.2. Stable branch releases

For stable branch release upgrades (upgrading 1.4 to 1.6 or 1.6 to 1.8) in addition to binary and frontend upgrade database patch is usually required.

5.3. Version compatibility

Older agents from Zabbix 1.0, Zabbix 1.1.x, Zabbix 1.4.x and Zabbix 1.6.x can be used with Zabbix 1.8. It does not require any configuration changes on agent side.

Older Zabbix proxies of version 1.6.x can't be used with Zabbix 1.8, they should be upgraded.

5.4. Important notes

  • All hosts now are required to belong to at least one group.
  • CPU index for system.cpu.util key on Linux now starts with 0.
  • Key vfs.fs.size returns data in bytes for all operating systems now.
  • Key vfs.fs.size now takes into account reserved diskspace for root user.
  • Comment at the end of a configuration file line is not allowed anymore (this worked for numeric parameters only before).

5.5. System requirement changes

Additional or increased system requirements:

  • Support for PHP 4 dropped.
  • Maximal PHP memory size should be at least 128MB (option memory_limit).
  • Maximal PHP POST size should be at least 16MB (option post_max_size).

5.6. Known problems

  • PHP mbstring check may fail with PHP < 5.2 in Zabbix 1.8. To avoid this issue, copy zabbix.conf.php.example file to zabbix.conf.php and modify parameters, including database access parameters.
  • For IPMI support you need a recent OpenIPMI version - 2.0.13 and later is known to work.
  • Sorting in frontend is not performed for entities with positional variables (like item names with $1 etc).
  • XML export includes SNMP and other information for all items.
  • Hostnames with spaces do not work when sending data from a file with zabbix_sender.
  • Uploading of images for network maps may fail if database is not configured properly. Make sure database, tables and fields are set to UTF-8 encoding.

5.7. Upgrade procedure

The following steps have to be performed for successful upgrade from Zabbix 1.6.x to 1.8. The whole upgrade procedure may take several hours depending on size of Zabbix database.

5.7.1. Stop Zabbix server

Stop Zabbix server to make sure that no new data is inserted into database.

5.7.2. Backup existing Zabbix database

This is very important step. Make sure that you have backup of your database. It will help if upgrade procedure fails (lack of disk space, power off, any unexpected problem).

5.7.3. Backup configuration files, PHP files and Zabbix binaries

Make a backup copy of Zabbix binaries, configuration files and PHP files.

5.7.4. Install new server binaries

You may use pre-compiled binaries or compile your own.

5.7.5. Review Server configuration parameters

Some parameters of zabbix_server.conf were changed in 1.8, new parameters added. You may want to review them.

  • Configuration option StartDBSyncers has been removed from Zabbix server and proxy configuration files.
5.7.6. Upgrade database

Perform this step only when upgrading from version 1.6. Skip when upgrading from one 1.8.x version to another.

Before applying database patches, all Zabbix processes must be stopped.

Make sure to have a valid database backup before starting database upgrade.

Before running upgrade scripts drop the following indexes:

MySQL

alter table dhosts drop index dhosts_1;
alter table dservices drop index dservices_1;
alter table httptest drop index httptest_2;
alter table httptest drop index httptest_3;
alter table history_log drop index history_log_2;
alter table history_text drop index history_text_2;
alter table actions drop index actions_1;
alter table escalations drop index escalations_2;
alter table graphs_items drop index graphs_items_1;
alter table graphs_items drop index graphs_items_2;
alter table services drop index services_1; 

Oracle or PostgreSQL

drop index dhosts_1;
drop index dservices_1;
drop index httptest_2;
drop index httptest_3;
drop index history_log_2;
drop index history_text_2;
drop index actions_1;
drop index escalations_2;
drop index graphs_items_1;
drop index graphs_items_2;
drop index services_1; 

Ignore any warning messages about non-existent indexes!

Database upgrade scripts are located in directory upgrades/dbpatches/1.8/<db engine>:

  • MySQL: upgrades/dbpatches/1.8/mysql/patch.sql
  • Oracle: upgrades/dbpatches/1.8/oracle/patch.sql
  • PostgreSQL: upgrades/dbpatches/1.8/postgresql/patch.sql

Database upgrade should take around 10-15 minutes, for PostgreSQL it may take several hours or more because of conversion of existing historical data. It is recommended to test the upgrade procedure in a non-production environment.

If you are converting the database to UTF-8, it can take many hours.

Make sure that you have enough permissions (create table, drop table, create index, drop index). Also make sure that you have enough free disk space.

These scripts are for upgrade from Zabbix 1.6.x to 1.8 only! For upgrade from earlier versions use also upgrade scripts from Zabbix 1.6.x.

Example usage:

shell> cd mysql; mysql zabbix -u<username> -p<password> < patch.sql

or

shell> cd postgresql; psql -U <username> zabbix < patch.sql
5.7.7. Install new Zabbix GUI
5.7.8. Start new Zabbix binaries

Start new binaries. Check log files to see if the binaries have started successfully.

6. Using Zabbix appliance

As an alternative to setting up manually or reusing existing server for Zabbix, users may download Zabbix appliance.

To get started, boot the appliance and point your browser at the IP it has received over DHCP.

Booting Zabbix appliance

Zabbix appliance is an OpenSUSE 11.2 based image, available in the following formats:

  • vmdk (VMWare/Virtualbox);
  • CD iso;
  • HDD/flash image;
  • Xen guest.

It has Zabbix server configured and running on MySQL, as well as frontend available.

The appliance has been built using SUSE Studio.

6.1. Changes to SUSE configuration

There are some changed applied to the base OpenSUSE configuration.

6.1.1. MySQL configuration changes
  • Binary log is disabled;
  • InnoDB is configured to store data for each table in a separate file.
6.1.2. Using a static IP address

By default the appliance uses DHCP to obtain IP address. To specify a static IP address:

  • Log in as root user;
  • Open file /etc/sysconfig/network/ifcfg-eth0 in your favourite editor;
  • Set BOOTPROTO variable to static;
  • Set IPADDR, NETMASK and any other parameters as required for your network;
  • Create file /etc/sysconfig/network/routes. For the default route, use default 192.168.1.1 - - (replacing with your gateway address).
  • Run the command rcnetwork restart.

To configure DNS, add nameserver entries in /etc/resolv.conf, specifying each nameserver on its own line: nameserver 192.168.1.2.

Alternatively, just use yast configuration utility to update network settings.

6.1.3. Other changes
  • Network is configured to use DHCP to obtain IP address;
  • Utility fping is set to have permissions 4710 and is owned by group zabbix - suid and only alowed to be used by zabbix group;
  • ntpd configured to synchronise to the public pool servers;
  • Various basic utilities have been added that could make working with Zabbix and monitoring in general easier.

6.2. Zabbix configuration

Appliance Zabbix setup has the following passwords and other configuration changes:

6.2.1. Passwords

System:

  • root:zabbix
  • zabbix:zabbix

Database:

  • root:zabbix
  • zabbix:zabbix

Zabbix frontend:

  • admin:zabbix

To change the database user password it has to be changed in the following locations:

  • MySQL;
  • zabbix_server.conf;
  • zabbix.conf.php.
6.2.2. File locations

Configuration files are placed in /etc/zabbix.

Zabbix logfiles are placed in /var/log/zabbix.

Home directory for user zabbix is /var/lib/zabbix.

6.2.3. Changes to Zabbix configuration
  • Some items and triggers in the default Linux template are disabled (mostly those who did not correspond to appliance setup);
  • Server name for Zabbix frontend set to “Zabbix 1.8 Appliance”;
  • Frontend timezone is set to Europe/Riga, Zabbix home (this can be modified in /etc/php5/apache2/php.ini);
  • Disabled triggers and web scenarios are shown by default to reduce confusion.
6.2.4. Preserving configuration

If you are running live CD version of the appliance or for some other reason can't have persistent storage, you can create a backup of whole database, including all configuration and gathered data.

To create the backup, run:

mysqldump zabbix | bzip2 -9 > dbdump.bz2

Now you can transfer file dbdump.bz2 to another machine.

To restore from the backup, transfer it to the appliance and execute:

bzcat dbdump.bz2 | mysql zabbix

Make sure that Zabbix server is stopped while performing the restore.

6.3. Frontend access

Access to frontend by default is allowed from:

  • 127.0.0.1
  • 192.168.0.0/16
  • 10.0.0.0/8
  • ::1

Root (/) is redirected to /zabbix on the webserver, thus frontend can be accessed both as http://<host> and http://<host>/zabbix.

This can be customised in /etc/apache2/conf.d/zabbix.conf. You have to restart webserver after modifying this file. To do so, log in using SSH as root user and execute:

service apache2 restart

6.4. Firewall

By default, only two ports are open - 22 (SSH) and 80 (HTTP). To open additional ports - for example, Zabbix server and agent ports - modify iptables rules with SuSEfirewall2 utility:

SuSEfirewall2 open EXT TCP zabbix-trapper zabbix-agent

Then reload the firewall rules:

SuSEfirewall2 stop
SuSEfirewall2 start

6.5. Monitoring capabilities

Zabbix server is compiled with support for the following:

  • SNMP;
  • IPMI;
  • Web monitoring;
  • SSH2;
  • IPv6.

In the provided configuration Zabbix server itself is monitored with the help of locally installed agent for some base parameters, additionally Zabbix frontend is monitored as well using web monitoring.

Zabbix appliance monitoring own web frontend

Note that web frontend monitoring logs in - this can add lots of entries to the audit log.

6.6. Naming, init and other scripts

Zabbix daemons have their names changed from standard with underscore to dash to conform to SUSE guidelines. They are called:

  • zabbix-agentd
  • zabbix-server

In a similar fashion, configuration files are:

  • /etc/zabbix/zabbix-server.conf
  • /etc/zabbix/zabbix-agentd.conf

Appropriate init scripts are provided. To control Zabbix server, use any of these:

service zabbix-server status
rczabbix-server status
/etc/init.d/zabbix-server status

Replace server with agentd for Zabbix agent daemon.

6.6.1. Scheduled scripts

There is a scheduled script, run from the crontab every 10 minutes that restarts Zabbix server if it is not running, /var/lib/zabbix/bin. It logs timestamped problems and starting attempts at /var/log/zabbix/server_problems.log. This script is available since Zabbix Appliance version 1.8.3.

Make sure to disable this crontab entry if stopping of Zabbix server is desired.

6.7. Format-specific notes

6.7.1. Xen

To use images in Xen server, run:

xm create -c file-with-suffix.xenconfig

See the following pages for more information on using Xen images:

To use Xen images with Citrix Xenserver you might need to convert images with XenConvert utility, available from Citrix website.

 

Discussion

mma, 2010/05/17 14:36
In "1.2.3. Software Requirements", you type "PHP TryeType support". Do you say "PHP TrueType support" ?
richlv, 2010/06/07 10:43
thanks, fixed
 
1.8/manual/installation.txt · Last modified: 2010/05/26 10:04 by richlv
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-No Derivative Works 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki