ZABBIX Manual v1.6 Release 017
Review and Approval
Name Signature Date
For ZABBIX SIA:

No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of ZABBIX SIA

Copyright 2008 ZABBIX SIA, REGISTERED IN LATVIA NO: LV40003738045

Table of Contents

Table of Contents

1.ABOUT....................................................................................................................20

1.1.Revision History...........................................................................................................20 1.2.Conventions..................................................................................................................20 1.3.Distribution list.............................................................................................................21 1.4.Overview of ZABBIX.....................................................................................................22

1.4.1.What is ZABBIX? ............................................................................................22 1.4.2.What does ZABBIX offer? ..............................................................................22 1.4.3.Why use ZABBIX? ..........................................................................................23 1.4.4.Users of ZABBIX .............................................................................................23

1.5.Goals and Principles....................................................................................................23 1.5.1.Main Goals of ZABBIX Development ..............................................................23 1.5.2.Main principles of ZABBIX development..........................................................23

1.6.What’s new in ZABBIX 1.6...........................................................................................24 1.6.1.Escalations and Repeated notifications...........................................................24 1.6.2.Much Better Performance................................................................................24 1.6.3.Support of IPv6................................................................................................24 1.6.4.Support of IPMI................................................................................................24 1.6.5.Better Distributed Monitoring...........................................................................24 1.6.6.ZABBIX Proxy Process....................................................................................24 1.6.7.Dashboard.......................................................................................................24 1.6.8.Dynamic Screens.............................................................................................25 1.6.9.Nice Zoom for Graphs.....................................................................................25 1.6.10.Pie Charts......................................................................................................25 1.6.11.Basic Management Functions........................................................................25 1.6.12.More Efficient Communication with Agents....................................................25 1.6.13.More Efficient ZABBIX Sender.......................................................................25 1.6.14.Improved View of Trigger Statuses................................................................25 1.6.15.Support of SNMP Data with Dynamic Index...................................................25 1.6.16.Special Processing of Well-known SNMP OIDs.............................................25 1.6.17.Added Printable View for All Screens............................................................26

1.6.18.Disabling of Login Rights for a Group of Users..............................................26

1.6.19.Added Support of UTF-8................................................................................26

1.6.20.Added Screen for Better Management of Translations..................................26

1.6.21.Added Maintenance Mode.............................................................................26

1.6.22.Unlimited Number of Map Link Styles............................................................26

1.6.23.Improved User Permission Schema...............................................................26

1.6.24.Other Improvements......................................................................................26 1.6.24.1.Queue moved into Administration...............................................................26 1.6.24.2.Link to Maps, Screens and Graphs moved to the Dashboard.....................26 1.6.24.3.Auto-login option.........................................................................................27 1.6.24.4.New communication protocol......................................................................27 1.6.24.5.Support of themes for ZABBIX front-end....................................................27 1.6.24.6.User ‘guest’ can be disabled.......................................................................27 1.6.24.7.Disabling of a group of users......................................................................27 1.6.24.8.Database down screen...............................................................................27 1.6.24.9.Duplicated Login removed..........................................................................27 1.6.24.10.Added sorting for all screens....................................................................27 1.6.24.11.Better informative message......................................................................27 1.6.24.12.Support of import/export of the host template linkage information............27 1.6.24.13.Support of negative values in graphs........................................................28 1.6.24.14.Support of directories in the parameter Include........................................28 1.6.24.15.Support of new macros.............................................................................28 1.6.24.16.New after-login greeting message............................................................28 1.6.24.17.Auto-discovery by ICMP ping....................................................................28 1.6.24.18.Increased number of log entries sent per second.....................................28 1.6.24.19.Added mass-update functionality for hosts and triggers...........................28 1.6.24.20.Added full-screen icon..............................................................................28 1.6.24.21.Active only mode for ZABBIX agent..........................................................28 1.6.24.22.Added monitoring of Proxy availability......................................................28 1.6.24.23.Added protection against brute-force attacks............................................29 1.6.24.24.Improved event viewing............................................................................29 1.6.24.25.More accurate ICMP pings........................................................................29 1.6.24.26.Support of bulk acknowledgements..........................................................29 1.6.24.27.Added time filter to Availability Report.......................................................29 1.6.24.28.History of Actions moved under Administration.........................................29 1.6.24.29.Required server performance value is available.......................................29 1.6.24.30.Added support of auto-login......................................................................29 1.6.24.31.Automatic selection of the first element in drop-downs.............................29 1.6.24.32.Last access time is displayed for users.....................................................29 1.6.24.33.More flexible Status of Trigger screen......................................................29 1.6.24.34.Extended host profiles..............................................................................30

1.7.Installation and Upgrade Notes...................................................................................30

1.7.1.Installation........................................................................................................30

1.7.2.Version compatibility........................................................................................30

1.7.3.Important.........................................................................................................30

1.7.4.Upgrade procedure..........................................................................................30 1.7.4.1.Stop ZABBIX server......................................................................................30

1.7.4.2.Backup existing ZABBIX database...............................................................30 1.7.4.3.Backup configuration files, PHP files and ZABBIX binaries..........................30 1.7.4.4.Install new server binaries.............................................................................31 1.7.4.5.Review Server configuration parameters......................................................31 1.7.4.6.Upgrade database........................................................................................31 1.7.4.7.Install new ZABBIX GUI................................................................................31 1.7.4.8.Start new ZABBIX binaries...........................................................................31

1.8.Commercial support.....................................................................................................31

2.INSTALLATION.......................................................................................................33

2.1.How to Get ZABBIX......................................................................................................33 2.2.Requirements...............................................................................................................33

2.2.1.Hardware Requirements..................................................................................33 2.2.1.1.Memory Requirements..................................................................................33 2.2.1.2.CPU Requirements.......................................................................................33 2.2.1.3.Other hardware.............................................................................................33 2.2.1.4.Examples of hardware configuration.............................................................33 2.2.2.Supported Platforms........................................................................................34 2.2.3.Software Requirements...................................................................................35 2.2.4.Choice of database engine..............................................................................36 2.2.5.Database size..................................................................................................36 2.2.6.Time synchronization.......................................................................................38

2.3.Components.................................................................................................................39 2.3.1.ZABBIX Components.......................................................................................39 2.3.2.ZABBIX Server................................................................................................39 2.3.3.ZABBIX Proxy..................................................................................................39 2.3.4.ZABBIX Agent..................................................................................................39 2.3.5.The WEB Interface..........................................................................................40

2.4.Installation from Source..............................................................................................40 2.4.1.Software requirements.....................................................................................40 2.4.2.Structure of ZABBIX distribution......................................................................41 2.4.3.ZABBIX Server................................................................................................42 2.4.4.ZABBIX Proxy..................................................................................................47 2.4.5.ZABBIX Agent..................................................................................................51 2.4.6.ZABBIX WEB Interface....................................................................................54

2.5.Upgrading.....................................................................................................................64

2.5.1.Database upgrade...........................................................................................64

3.ZABBIX PROCESSES............................................................................................65

3.1.ZABBIX Server..............................................................................................................65 3.2.ZABBIX Proxy...............................................................................................................68 3.3.ZABBIX Agent (UNIX, standalone daemon)................................................................72 3.4.ZABBIX Agent (UNIX, Inetd version)...........................................................................75 3.5.ZABBIX Agent (Windows)............................................................................................76

3.5.1.Installation........................................................................................................76 3.5.2.Usage..............................................................................................................77

3.6.ZABBIX Sender (UNIX).................................................................................................80 3.7.ZABBIX Get (UNIX).......................................................................................................81

4.CONFIGURATION...................................................................................................82

4.1.Development Environment..........................................................................................82 4.2.Actions..........................................................................................................................82

4.2.1.Action conditions..............................................................................................83 4.2.2.Operations.......................................................................................................86 4.2.3.Macros for messages and remote commands.................................................87

4.3.Macros...........................................................................................................................88

4.3.1.List of supported macros ................................................................................88

4.4.Applications..................................................................................................................92 4.5.Graphs...........................................................................................................................92 4.6.Medias...........................................................................................................................92

4.6.1.EMAIL..............................................................................................................92 4.6.2.JABBER...........................................................................................................92 4.6.3.SCRIPT............................................................................................................93 4.6.4.GSM Modem....................................................................................................93

4.7.Host templates..............................................................................................................93 4.8.Host groups..................................................................................................................94 4.9.Host and trigger dependencies...................................................................................94 4.10.Items............................................................................................................................95

4.10.1.Item key.........................................................................................................95 4.10.2.Supported by Platform...................................................................................95 4.10.3.ZABBIX Agent..............................................................................................101 4.10.4.SNMP Agent................................................................................................111 4.10.5.Simple checks..............................................................................................113 4.10.5.1.Timeout processing...................................................................................115 4.10.5.2.ICMP pings...............................................................................................116

4.10.6.Internal Checks............................................................................................116 4.10.7.Aggregated checks......................................................................................117 4.10.8.External checks............................................................................................118

4.11.User Parameters.......................................................................................................119

4.11.1.Simple user parameters...............................................................................119 4.11.2.Flexible user parameters.............................................................................120

4.12.Windows performance counters.............................................................................121

4.12.1.Simple user parameters...............................................................................122

4.13.Triggers.....................................................................................................................122

4.13.1.Expression for triggers ................................................................................123 4.13.2.Trigger dependencies .................................................................................130 4.13.3.Trigger severity............................................................................................131 4.13.4.Hysteresis ...................................................................................................132

4.14.Screens and Slide Shows........................................................................................132 4.15.IT Services................................................................................................................133 4.16.User permissions.....................................................................................................135

4.16.1.Overview......................................................................................................135 4.16.2.User types....................................................................................................135

4.17.The Queue.................................................................................................................135

4.17.1.Overview......................................................................................................135 4.17.2.How to read.................................................................................................136

4.18.Utilities......................................................................................................................137

4.18.1.Start-up scripts ............................................................................................137 4.18.2.snmptrap.sh ................................................................................................137

7.QUICK START GUIDE..........................................................................................139

7.1.Login............................................................................................................................139

7.1.1.Protection against brute force attacks............................................................140

7.2.Add user......................................................................................................................140 7.3.Email settings.............................................................................................................144 7.4.Add agent-enabled host.............................................................................................146 7.5.Set-up notifications....................................................................................................151

8.XML IMPORT AND EXPORT...............................................................................154

8.1.Goals...........................................................................................................................154

8.2.Overview.....................................................................................................................154 8.3.Data export..................................................................................................................154 8.4.Data import.................................................................................................................156

9.TUTORIALS..........................................................................................................158

9.1.Extending ZABBIX Agent...........................................................................................158 9.2.Monitoring of log files................................................................................................159 9.3.Remote actions...........................................................................................................159 9.4.Monitoring of Windows services..............................................................................161

10.ESCALATIONS AND REPEATED NOTIFICATIONS.........................................163

10.1.Goals.........................................................................................................................163 10.2.Overview...................................................................................................................163

11.WEB MONITORING............................................................................................164

11.1.Goals.........................................................................................................................164 11.2.Overview...................................................................................................................164 11.3.WEB Scenario...........................................................................................................164 11.4.WEB Step..................................................................................................................166 11.5.Real life scenario .....................................................................................................168

12.LOG FILE MONITORING....................................................................................172

12.1.Overview...................................................................................................................172 12.2.How it works.............................................................................................................172

13.AUTO-DISCOVERY............................................................................................173

13.1.Goals.........................................................................................................................173 13.2.Overview...................................................................................................................173 13.3.How it works.............................................................................................................174

13.3.1.Discovery.....................................................................................................174 13.3.2.Actions.........................................................................................................174

13.4.Auto-discovery rule .................................................................................................175 13.5.Real life scenario .....................................................................................................175

14.ADVANCED SNMP MONITORING.....................................................................180

14.1.Special MIBs.............................................................................................................180 14.2.Use of dynamic indexes...........................................................................................182

15.MONITORING OF IPMI DEVICES......................................................................184

15.1.Goals.........................................................................................................................184 15.2.IMPI parameters........................................................................................................184 15.3.IPMI actions..............................................................................................................184

16.USE OF PROXIES..............................................................................................185

16.1.Why use Proxy..........................................................................................................185 16.2.Proxy v.s. Node.........................................................................................................185 16.3.Configuration............................................................................................................186

17.DISTRIBUTED MONITORING............................................................................187

17.1.Goals.........................................................................................................................187 17.2.Overview ..................................................................................................................187 17.3.Configuration............................................................................................................187

17.3.1.Configuration of Nodes................................................................................187 17.3.2.Simple configuration....................................................................................189 17.3.3.More complex setup.....................................................................................194

17.4.Platform independence............................................................................................195 17.5.Configuration of a single Node...............................................................................195 17.6.Switching between nodes........................................................................................196 17.7.Data flow...................................................................................................................196

17.7.1.Child to Master.............................................................................................196 17.7.2.Master to Child.............................................................................................196 17.7.3.Firewall settings...........................................................................................197

17.8.Performance considerations...................................................................................197

18.MAINTENANCE MODE FOR ZABBIX GUI........................................................198

18.1.Goals.........................................................................................................................198 18.2.Configuration............................................................................................................198 18.3.How it looks like.......................................................................................................199

19.WEB INTERFACE...............................................................................................200

19.1.Creating your own theme........................................................................................200

19.2.Configuration............................................................................................................201

19.2.1.General........................................................................................................201 19.2.1.1.Events.......................................................................................................201 19.2.1.2.Housekeeper............................................................................................203 19.2.1.3.Images......................................................................................................204 19.2.1.4.Themes.....................................................................................................207 19.2.1.5.Value mapping..........................................................................................208 19.2.1.6.Working time.............................................................................................210 19.2.1.7.Other.........................................................................................................212

19.2.2.WEB............................................................................................................213

19.2.3.Hosts............................................................................................................217 19.2.3.1.Hosts.........................................................................................................217 19.2.3.2.Templates.................................................................................................220 19.2.3.3.Proxies......................................................................................................222 19.2.3.4.Host groups..............................................................................................224 19.2.3.5.Template linkage......................................................................................226 19.2.3.6.Applications...............................................................................................228

19.2.4.Items............................................................................................................230 19.2.4.1.Items.........................................................................................................230

19.2.5.Triggers.......................................................................................................237 19.2.5.1.Triggers....................................................................................................237

19.2.6.Actions.........................................................................................................241 19.2.6.1.Actions......................................................................................................241

19.2.7.Graphs.........................................................................................................243 19.2.7.1.Graphs......................................................................................................243

19.2.8.Screens........................................................................................................247 19.2.8.1.Screens.....................................................................................................247

19.2.9.Maps............................................................................................................251 19.2.9.1.Maps.........................................................................................................252

19.2.10.IT Services.................................................................................................258 19.2.10.1.IT Services..............................................................................................258

19.2.11.Discovery...................................................................................................261 19.2.11.1.Discovery................................................................................................261

19.2.12.Export/Import.............................................................................................263 19.2.12.1.Export.....................................................................................................263 19.2.12.2.Import......................................................................................................265

19.3.Administration..........................................................................................................267

19.3.1.Authentication..............................................................................................267 19.3.1.1.HTTP........................................................................................................267 19.3.1.2.LDAP........................................................................................................269

19.3.2.Users...........................................................................................................270 19.3.2.1.Users........................................................................................................270 19.3.2.2.User Groups.............................................................................................275

19.3.3.Media types..................................................................................................278 19.3.3.1.Media types...............................................................................................278 19.3.4.Scripts..........................................................................................................280 19.3.5.Audit.............................................................................................................282 19.3.6.Queue..........................................................................................................285 19.3.7.Notifications.................................................................................................288 19.3.8.Locales........................................................................................................289 19.3.9.Installation....................................................................................................291

20.PERFORMANCE TUNING..................................................................................292

20.1.Real world configuration ........................................................................................292 20.2.Performance tuning .................................................................................................292

20.2.1.Hardware ....................................................................................................292 20.2.2.Operating System .......................................................................................292 20.2.3.Database Engine ........................................................................................293 20.2.4.General advices ..........................................................................................293

21.COOKBOOK.......................................................................................................295

21.1.GENERAL RECIPES.................................................................................................295 21.1.1.Monitoring of server's availability.................................................................295 21.1.2.Sending alerts via WinPopUps....................................................................295

21.2.MONITORING OF SPECIFIC APPLICATIONS..........................................................295 21.2.1.AS/400.........................................................................................................295 21.2.2.MySQL.........................................................................................................295 21.2.3.Mikrotik routers............................................................................................297 21.2.4.WIN32..........................................................................................................297 21.2.5.Novell...........................................................................................................297 21.2.6.Tuxedo.........................................................................................................298 21.2.7.Informix........................................................................................................298 21.2.8.JMX..............................................................................................................298

21.3.INTEGRATION...........................................................................................................301

21.3.1.HP OpenView..............................................................................................301

22.TROUBLESHOOTING........................................................................................303

22.1.Error and warning messages..................................................................................303

23.LICENCE.............................................................................................................305

24.CONTRIBUTE.....................................................................................................313

25.CREDITS.............................................................................................................315 25.1.Developers of ZABBIX..............................................................................................315 25.2.Contributors to ZABBIX...........................................................................................315

About this Manual

This manual is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This manual is part of ZABBIX software. The latest version of the manual is available at http://www.zabbix.com.

The ZABBIX Reference Manual IS NOT distributed under a GPL-style license.

Use of the manual is subject to the following terms:

Please send an e-mail to sales@zabbix.com for more information.

Introduction

Purpose of this Document

The purpose of this document is to provide a comprehensive introduction and overview of ZABBIX, its architecture, the features it offers and their functions. This document contains all information necessary for the successful administration of ZABBIX.

What you should already know

No deep technical knowledge is required, although an understanding of UNIX is essential.

Who Should Use this Document

Anyone involved in installation and administration of ZABBIX, and anyone else wishing to get an insight into how it works.

Contacts

ZABBIX SIA

Location: Neretas 2/1-109, LV-1004, Riga, Latvia Tel: +371 7743943 Fax: +371 7743944 Email: sales@zabbix.com

ZABBIX SIA, Product Manager, Director Alexei Vladishev Email: alexei.vladishev@zabbix.com

ZABBIX SIA, Sales Email: sales@zabbix.com

ZABBIX SIA, Customer Support Email: support@zabbix.com

Glossary

TERM Active

Active checker

Action

Agent

Alerter

Auto-registration

Auto-discovery

Event Graphs

Host Housekeeper

IPMI DESCRIPTION

Active refers to a mode that the ZABBIX Agent can run in. When running actively, the agent keeps track of what items to send to the server and at what intervals. The agent can poll the server at set intervals in order to keep track of what items it should be sending.

Active checker gather operational information from the system where ZABBIX Agent is running, and report this data to the ZABBIX for further processing.

An action is a response taken when a Trigger has been triggered. Actions can be configured to send messages to specific user groups as defined in ZABBIX, based on their Media Type settings, or execute remote commands.

Agent refers to the program that is run on hosts that want to be monitored. It is run as a service and can process both active and passive checks simultaneously.

Alerter is a server process which is responsible for execution of actions (emails, jabber, SMS, scripts).

Auto-registration refers to a feature of ZABBIX that allows Hosts to automatically register themselves with the ZABBIX server. This is configured via the web interface by an administrator that defines a particular Hostname patter such as ‘*-Linux’ and define Items for that host based on a Template of items.

ZABBIX auto-discovery module is a module which performs automated discovery of hosts and services and generating events for further processing.

An event is when a trigger is triggered.

Graphs can refer to the simple graphs that are available for each numerical Item that is monitored, or it can refer to custom graphs which can be used to show several numerical Items in one graph.

Host refers to the machine that is being monitored.

Housekeeper refers to the service within the ZABBIX server that cleans the ZABBIX database of old actions, events, history, and trend data as defined by the user. Housekeeping of Actions and Events is defined in General settings. History and trend data is defined per item.

Intelligent Platform Management Interface.

IT Services

Item

Location Map

Master or Master Node Media Type

Node Node ID Node Watcher Queue

Passive

Pinger Poller

Proxy

IT Services refers to a feature within ZABBIX that allows users to define an SLA and have ZABBIX keep track of the expected SLA and actual SLA. IT Services are defined as groups of triggers and can be configured to calculate the minimum of a group or maximum of a group.

Item refers to an individual item that is monitored on a host, such as load average or response time. Item can refer to an item obtained via the ZABBIX agent, SNMP, or other means. Items can be configured as float, 64-bit integers, character strings, text or log values.

Environment monitored by a single Node. Map refers to a feature of ZABBIX that allows users to create customized graphics via the web interface to create network maps and define links between Hosts on the map. Links can be configured to change color or style based on Triggers.

Master Node. Master Node may have one or several Childs.

Master Node can control configuration of the Childs. Media Types are used to notify ZABBIX users when an Action has occurred. Media types can be via email or custom scripts. Media Types are configured globally to be made available to all Users, and then specified per User to allow certain Users to be notified via one media type, and other users to be notified via another media type.

ZABBIX Server in distributed setup monitoring number of

hosts. Node ID is a unique number which identifies Node. Each Node must have its own unique Node ID.

ZABBIX Server process which takes care of inter-node

communications. Queue refers to the internal queue of items the ZABBIX server is monitoring. Based on the specified intervals of items the ZABBIX server maintains a queue to keep track of the items and when it should poll them.

Passive refers to a mode that the ZABBIX Agent can run in. When running passively, the agent waits for requests for items from the server and sends them back as requested. It should be noted that typically the agent runs in both modes, and the modes are defined by the Item when it is configured.

ZABBIX Server process which processes ICMP pings.

ZABBIX Server process which is responsible for retrieval of data from ZABBIX and SNMP agents and processing remote (simple) checks.

ZABBIX Proxy process which collects performance and availability data from servers and network devices and send it to a ZABBIX Server for further processing.

ROI Screen

Sender Server

SLA

Child or Child Node Template

Timer Trapper Trigger

User

Return on Investment.

Screen refers to another customizable feature of ZABBIX which allows users to create custom pages within ZABBIX for displaying information. A screen can consist of graphs (custom), simple graphs, maps, or plain text such as the last 5 values of a particular item.

ZABBIX utility which sends data to ZABBIX Server for further processing. It usually used in user scripts.

Server refers to the program that is run on a centralized machine that has been deemed the “monitoring station”. The server is run as a service and is in charge of keeping track of all the configured hosts, items, actions, alerts, etc.

SLA refers to Service Level Agreement. These are typically used in contracts between companies and clients in order to define a certain level of service such as 99.5% availability of a particular Host.

Child Node is linked to a Master Node. Child Nodes reports to Master Node.

A Template is a Host that has a defined set of Items, Triggers, etc. which Hosts can be linked to. This allows easier configuration of hosts and changes to hosts without having to change each individual host. Host Templates are no different from other hosts except that their status is set to ‘Template’ during configuration and as such no Host is actually monitored.

ZABBIX Server process responsible for processing of date and time related functions of trigger expressions.

ZABBIX Server process responsible for processing of ZABBIX Agent (active) checks, log files and data sent by sender.

A trigger is used to define constraints on items and provide notifications when these constraints are exceeded. For example, you could be monitoring load average on a specific host and want to know when load average exceeds 1.0. Triggers are very flexible and can allow for multiple constraints.

The ZABBIX web front-end can be configured to allow access to multiple users at varying levels of access. Users can be allowed anonymous access via the guest account and be allowed to view all available data but not modify any changes, or users can be given access to only view or modify specific sections of ZABBIX.

User parameter User Parameter, (UserParameter) refers to custom scripts defined in an agent’s configuration file. User parameters are defined by a key and command. The key refers to the item defined in the web interface and can be configured to accept arguments as sent by the server.

ZABBIX ZABBIX Software

ZABBIX SIA Latvian company that develops and provides support for ZABBIX.

References

The following publications provide further information on technical aspects of ZABBIX.

Internal documents

No internal documents at the moment.

External References

1.About

1.1.Revision History

Release Date Reason Who
13 10/04/2008 Updated Release Notes Alexei Vladishev
15 18/09/2008 Pre-1.6 updates. Alexei Vladishev
16 04/11/08 Added: Maintenance mode Configuration (Hosts, WEB, Triggers, Graphs, Maps, everything) Paremeters StartDBSyncers, BufferSend, BufferSize creation of new themes Key zabbix[proxy,...] Alexei Vladishev
17 04/11/08 Added: info on permission check for notifications description of {TRIGGER.NSEVERITY} description of last(#num) information on of secure LDAP connections error codes (version 1.8) macros for system maps (version 1.8) item data type (version 1.8.) Alexei Vladishev

1.2.Conventions

Document conventions

The ZABBIX Manual uses the typographical conventions shown in the following table.

Format Definition

file name Name of file or directory

Important note Shell commands Constants Note: Note Notes, important information, strong emphasis Shell commands, paths, configuration files Constants, configuration parameters Notes, comments, additional details.
1.3.Distribution list
Author Changes
Alexei Vladishev Author and maintainer of the Manual.
Charlie Collins Significant improvements of initial (LyX) versions of the document.
Shawn Marriott Proofreading of the ZABBIX Manual v1.0.

1.4.Overview of ZABBIX

1.4.1.What is ZABBIX?

ZABBIX was created by Alexei Vladishev, and currently is actively developed and supported by ZABBIX SIA.

ZABBIX is an enterprise-class open source distributed monitoring solution.

ZABBIX is software that monitors numerous parameters of a network and the health and integrity of servers. ZABBIX uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. ZABBIX offers excellent reporting and data visualisation features based on the stored data. This makes ZABBIX ideal for capacity planning.

ZABBIX supports both polling and trapping. All ZABBIX reports and statistics, as well as configuration parameters, are accessed through a web-based front end. A web-based front end ensures that the status of your network and the health of your servers can be assessed from any location. Properly configured, ZABBIX can play an important role in monitoring IT infrastructure. This is equally true for small organisations with a few servers and for large companies with a multitude of servers.

ZABBIX is free of cost. ZABBIX is written and distributed under the GPL General Public License version 2. It means that its source code is freely distributed and available for the general public. Both free and commercial support is available and provided by ZABBIX Company.

1.4.2.What does ZABBIX offer?

ZABBIX offers:

  • auto-discovery of servers and network devices
  • distributed monitoring with centralised WEB administration
  • support for both polling and trapping mechanisms
  • server software for Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X
  • native high performance agents (client software for Linux ,Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X, Tru64/OSF1, Windows NT4.0, Windows 2000, Windows 2003, Windows XP, Windows Vista)
  • agent-less monitoring
  • secure user authentication
  • flexible user permissions
  • web-based interface
  • flexible e-mail notification of predefined events
  • high-level (business) view of monitored resources
  • audit log

1.4.3.Why use ZABBIX?

  • Open Source solution
  • highly efficient agents for UNIX and WIN32 based platforms
  • low learning curve
  • high ROI. Downtimes are very expensive.
  • low cost of ownership
  • very simple configuration
  • Centralised monitoring system. All information (configuration, performance data) is stored in relational database
  • high-level service tree
  • very easy setup
  • support for SNMP (v1,v2). Both trapping and polling.
  • visualisation capabilities
  • built-in housekeeping procedure

1.4.4.Users of ZABBIX

Many organisations of different size around the World rely on ZABBIX as a primary monitoring platform.

1.5.Goals and Principles

1.5.1.Main Goals of ZABBIX Development

There are several goals ZABBIX is trying to achieve:

  • become recognized Open Source monitoring tool
  • create ZABBIX user group, which helps making the software even better
  • provide high-quality commercial support

1.5.2.Main principles of ZABBIX development

  • be user friendly
  • keep things simple
  • use as few processing resources as possible
  • react fast
  • document every aspect of the software

1.6.What’s new in ZABBIX 1.6

1.6.1.Escalations and Repeated notifications

Support of escalations and repeated notifications has been implemented. Escalations can be configured in a very flexible way and may include not only notifications but also execution of remote and IPMI commands.

1.6.2.Much Better Performance

ZABBIX database cache module, when enabled by the parameter StartDBSyncers, increases speed of ZABBIX up-to 4-8x times depending on the configuration.

1.6.3.Support of IPv6

All ZABBIX modules support both IPv4 and IPv6. ZABBIX can be used in mixed or IPv6 only environments.

1.6.4.Support of IPMI

ZABBIX support monitoring of IPMI parameters and manual execution of IMPI commands from ZABBIX front-end as well as remote commands.

1.6.5.Better Distributed Monitoring

ZABBIX distributed monitoring has been improved for a more efficient Node synchronisation protocol.

See also details on ZABBIX Proxy.

1.6.6.ZABBIX Proxy Process

ZABBIX Proxy is a lightweight process, which collects data collection on behalf of ZABBIX Server. The proxies can be used in order to centralise monitoring of remote locations by reporting to the central server or one of ZABBIX nodes in the distributed environment.

ZABBIX Proxy simplifies deployment and maintenances of the centralised distributed monitoring significantly.

1.6.7.Dashboard

ZABBIX Dashboard provides high level personalized details about the monitored environment. Now this is a central part of ZABBIX front-end.

1.6.8.Dynamic Screens

A screen element can be made dynamic. In this case, the information displayed in the element will depend on the particular host selected by ZABBIX user.

1.6.9.Nice Zoom for Graphs

The Zoom period can be selected by mouse for drill-down analysis.

1.6.10.Pie Charts

Pie charts (both 2D and 3D) are supported.

1.6.11.Basic Management Functions

Traceroute and Ping can be executed from a number of screens. More scripts can be added and configured.

The scripts are executed on the single ZABBIX server or any ZABBIX node in the distributed setup.

1.6.12.More Efficient Communication with Agents

ZABBIX Agents support data buffering, which can be tuned by new configuration parameters, BufferSize and BufferSend.

The communication protocol has been improved to support sending of multiple values by one TCP connection.

1.6.13.More Efficient ZABBIX Sender

ZABBIX Sender has been improved to support sending of multiple values by one network connection.

1.6.14.Improved View of Trigger Statuses

The screen will display information about triggers and associated events.

1.6.15.Support of SNMP Data with Dynamic Index

A new syntax can be used to monitor SNMP data with a dynamic index. See SNMP section for more details.

1.6.16.Special Processing of Well-known SNMP OIDs

Simple SNMP OIDs, like ifDescr, ifInOctets, ifInOctets, and other can be used in ZABBIX and will be translated automatically into correct numeric representation by ZABBIX itself.

1.6.17.Added Printable View for All Screens

Any screen can be printed in a nice way by pressing the “Print” link.

1.6.18.Disabling of Login Rights for a Group of Users

An entire user group can be configured not to have access to ZABBIX front-end.

1.6.19.Added Support of UTF-8

ZABBIX front-end is UTF-8 ready. Note that ZABBIX database and ZABBIX server and agent processes still are not ready for correct processing of UTF-8 data.

1.6.20.Added Screen for Better Management of Translations

The screen can be used to add new translations of ZABBIX front-end.

1.6.21.Added Maintenance Mode

ZABBIX maintenance mode can be activated to disable ZABBIX front-end temporarily.

1.6.22.Unlimited Number of Map Link Styles

Any number of triggers can be linked to the map link. The style of the triggers will define how the link is displayed.

1.6.23.Improved User Permission Schema

In 1.6 user permissions slightly differ from the permissions in 1.4.

1.6.24.Other Improvements

1.6.24.1.Queue moved into Administration

Now the information is available to ZABBIX Super Administrators only.

1.6.24.2.Link to Maps, Screens and Graphs moved to the Dashboard

The main menu was simplified. Now Maps, Screens and Graphs can be accessed from the Dashboard.

1.6.24.3.Auto-login option

The user profile option makes possible automatic login to ZABBIX front-end within one month.

1.6.24.4.New communication protocol

New more efficient communication protocol makes possible sending of multiple values by one TCP connection.

1.6.24.5.Support of themes for ZABBIX front-end

New frond-end includes two themes by default. More themes can be added.

1.6.24.6.User ‘guest’ can be disabled

In this case, user authorization is required for access to the ZABBIX front-end.

1.6.24.7.Disabling of a group of users

A group of users can be disabled.

1.6.24.8.Database down screen

Nice screen will appear in case if ZABBIX front-end is unable to talk to the database.

1.6.24.9.Duplicated Login removed

The Login menu item has been removed to avoid confusion.

1.6.24.10.Added sorting for all screens

Most of tables in ZABBIX front-end can be sorted by selected column.

1.6.24.11.Better informative message

Information message has different colours depending on status. It may also contain more details, which are hidden by default.

1.6.24.12.Support of import/export of the host template linkage information

XML import/export respects host template linkage information.

1.6.24.13.Support of negative values in graphs

Graphs support displaying of negative values.

1.6.24.14.Support of directories in the parameter Include

Parameter Include can be used to include all files in a directory.

1.6.24.15.Support of new macros

Add new macros, which can be useful for notifications: {EVENT.DATE}, {EVENT.TIME}, {EVENT.AGE}, {ESC.HISTORY}

1.6.24.16.New after-login greeting message

Welcome message is not confusing any more.

1.6.24.17.Auto-discovery by ICMP ping

Auto-discovery supports discovery by ICMP ping.

1.6.24.18.Increased number of log entries sent per second

By default ZABBIX will send no more than 100 of lines per second per each log file.

1.6.24.19.Added mass-update functionality for hosts and triggers

Some of host and trigger attributes can be mass-updated.

1.6.24.20.Added full-screen icon

Most of screens support full-screen mode, which is controlled by the full-screen icon.

1.6.24.21.Active only mode for ZABBIX agent

Active-only mode can be enabled for agents. In this case, the agent will not listen for incoming connections, which may be important for security.

1.6.24.22.Added monitoring of Proxy availability

Availability of proxies can be monitored automatically using new internal checks.

1.6.24.23.Added protection against brute-force attacks

ZABBIX front-end is protected from brute force attacks.

1.6.24.24.Improved event viewing

Every single event provides detailed information about executed commands and notifications.

1.6.24.25.More accurate ICMP pings

Refresh rate for ICMP pings can be controlled individually for each item.

1.6.24.26.Support of bulk acknowledgements

Multiple events can be acknowledged by a single click thanks to bulk-acknowledgement.

1.6.24.27.Added time filter to Availability Report

Availability report support selection of time period.

1.6.24.28.History of Actions moved under Administration

History of actions and remote command moved to Administration->Audit.

1.6.24.29.Required server performance value is available

The value is a good indicator of performance of ZABBIX and can be used for hardware requirements.

1.6.24.30.Added support of auto-login

Optional one month auto-login is supported on user level.

1.6.24.31.Automatic selection of the first element in drop-downs

The first element of all drop-down controls will be selected by default.

1.6.24.32.Last access time is displayed for users

Last access time is available for users.

1.6.24.33.More flexible Status of Trigger screen

Status of Triggers screen provide information about triggers and corresponding events.

1.6.24.34.Extended host profiles

Extended host profiles can be optionally used.

1.7.Installation and Upgrade Notes

1.7.1.Installation

See the INSTALLATION section for full details.

1.7.2.Version compatibility

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

1.7.3.Important

User permission schema has been changed. Now ZABBIX Administrators do not have write access to all hosts by default.

ZABBIX 1.6 does not allow empty user passwords. All empty passwords are replaced by 'zabbix' after database upgrade! User 'guest' is the only exception.

1.7.4.Upgrade procedure

The following steps have to be performed for successful upgrade from ZABBIX

1.4.x to 1.6.

The whole upgrade procedure may take several hours depending on size of ZABBIX database.

1.7.4.1.Stop ZABBIX server

Stop ZABBIX server to make sure that no new data are coming to database.

1.7.4.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).

1.7.4.3.Backup configuration files, PHP files and ZABBIX binaries

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

1.7.4.4.Install new server binaries

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

1.7.4.5.Review Server configuration parameters

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

1.7.4.6.Upgrade database

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

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

Note: Database upgrade may take quite significant time, several hours or more. It is recommended to test the upgrade procedure in a non-production environment.

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.

Note: These scripts are for upgrade from ZABBIX 1.4.x to 1.6 only!

1.7.4.7.Install new ZABBIX GUI

Follow Installation Instructions.

1.7.4.8.Start new ZABBIX binaries

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

1.8.Commercial support

ZABBIX SIA offers a full range of support options to meet your specific needs.

ZABBIX Support Services provide direct access to our expert Support Engineers who are ready to assist you in the development, deployment, and management of ZABBIX.

Visit http://www.zabbix.com/services.php or contact sales@zabbix.com for more details.

2.Installation

2.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.

2.2.Requirements

2.2.1.Hardware Requirements

2.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.

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

2.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.2.1.3.Other hardware

A serial communication port and a serial GSM Modem required for using SMS notifications built-in ZABBIX.

2.2.1.4.Examples of hardware configuration

The table provides several hardware configurations:

hosts Small

Ubuntu

PII 350MHz

MySQL MyISAM 20

Linux 256MB

Ubuntu

AMD Athlon

MySQL InnoDB 500

Medium

Linux 64 bit 3200+ 2GB

Ubuntu

Intel Dual

MySQL InnoDB >1000

Large

Linux 64 bit

Core 6400

or

4GB PostgreSQL

RAID10

RedHat

Intel Xeon

MySQL InnoDB >10000

Very large

Enterprise 2xCPU

or 8GB

PostgreSQL Fast RAID10

Note: 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.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)

Note: ZABBIX may work on other Unix-like operating systems as well.

2.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:

Software Version Comments
Apache 1.3.12 or later
PHP 4.3 or later
PHP modules: php-gd php-bcmath 4.3 or later PHP GD module must support PNG images.
MySQL php-mysql 3.22 or later Required if MySQL is used as ZABBIX back end database.
Oracle php-sqlora8 9.2.0.4 or later 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.
SQLite php-sqlite3 3.3.5 or later Required if SQLite is used as ZABBIX back-end database.

Note: ZABBIX may work on previous versions of Apache, MySQL, Oracle, and PostgreSQL as well.

WEB browser on client side

Support for HTML and PNG images required. MS Explorer (5.xx and 6.xx) and Mozilla 1.x work perfectly. Cookies and Java Script must be enabled. Other browsers may work with ZABBIX as well.

2.2.4.Choice of database engine

ZABBIX Server and Proxy support four database engines:

  • MySQL
  • Oracle
  • PostgreSQL
    • SQLite
    • Each database engine has its own advantages. We cannot recommend one over another. Choice of database engine depends on the following aspects:
  • how powerful is your hardware
  • free or commercial database engine
  • how busy is ZABBIX Server or Proxy

The table can be used as a general recommendation on choice of database engine.

Database engine of choice Usage
MySQL InnoDB Heavy duty Node/Standalone Server Heavy duty Proxy
MySQL MyISAM Light duty Node/Standalone Light duty Proxy
PostgreSQL Heavy duty Node/Standalone Server Heavy duty Proxy
Oracle Heavy duty Node/Standalone Server
SQLite Light duty Proxy

2.2.5.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:

Parameter Formula 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.

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.

Trends

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.

Events

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.

Note: 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.2.6.Time synchronization

It is very important to have precise system date on server with ZABBIX running. timed is one of most popular daemons 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.

Note: ZABBIX front-end must run on the same physical machine if SQLite is used.

2.4.Installation from Source

2.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.

Note: 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.

2.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.

2.4.3.ZABBIX Server

Server side

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!

Note: ZABBIX server process (zabbix_server) is protected from being run under root account.

Untar ZABBIX sources

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

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;

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

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

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-netsnmp –with-jabber –with-libcurl # for Oracle + Jabber + WEB monitoring

Note: 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

Note: 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.

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

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 Agent zabbix-agent 10050/udp Zabbix Agent zabbix-trapper 10051/tcp Zabbix Trapper zabbix-trapper 10051/udp Zabbix Trapper

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

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.

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 Configure /etc/zabbix/zabbix_server.conf 10

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 Run server processes 11

Run zabbix_server on server side.

shell> cd bin shell> ./zabbix_server

Step Run agents 12

Run zabbix_agentd where necessary.

shell> cd bin shell> ./zabbix_agentd

2.4.4.ZABBIX Proxy

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

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!

Note: ZABBIX Proxy process (zabbix_proxy) is protected from being run under root account.

Untar ZABBIX sources

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

Create the ZABBIX database. Optional.

Note: 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 by 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;

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/schema

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

Note: Check file out.log for any error messages.

shell> cd ../data shell> cat data.sql | sqlplus zabbix/password >out.log shell> cat images_oracle.sql | sqlplus zabbix/password >>out.log

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

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

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-netsnmp –with-libcurl # for Oracle + WEB monitoring

Note: 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

Note: 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. 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

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 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

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.

Run Proxy processes

Run zabbix_proxy:

shell> cd sbin shell> ./zabbix_proxy

2.4.5.ZABBIX Agent

Client side

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.

Untar ZABBIX sources

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

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

Note: 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.

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. 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

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

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.

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. Run zabbix_agentd on all monitored machines

shell> /opt/zabbix/bin/zabbix_agentd

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

Note: 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.

2.4.6.ZABBIX WEB Interface

Point your browser to ZABBIX URL.

Read and accept GPL v2.

Make sure that all software pre-requisites are met.

Pre-requisite Minimum value Description
PHP version 4.3.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, phppgsql, 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.

Enter ZABBIX Server details.

See summary of settings.

Download configuration file and place it under conf/.

Finishing installation.

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'.

2.5.Upgrading

The upgrade procedure is quite simple. New binaries and frontend should be installed according to latest installation instructions. In order to update database structure, the following steps should be performed.

The upgrade process can take from 0 seconds (if no patches required) to several hours. Note that before applying database patches, all ZABBIX processes must be stopped.

Database upgrade is usually required for upgrade from one major stable release to another. For example, from 1.4.x to 1.6.x.

For production installations a database backup is required!

2.5.1.Database upgrade

Go to the upgrades/dbpatches directory. In this directory are subdirectories named according to a version upgrade (e.g. 1.0beta3_to_1.0beta4). Enter the directory corresponding to your upgrade (if you are upgrading through multiple versions, you will need to apply the upgrades one at a time). Depending on which database you use:

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

or

shell> cd postgresql; cat patch.sql|psql -U <username> zabbix

Do not forget to upgrade PHP front-end files.

Finally, read version specific notes below for any extra procedures and useful information.

3.ZABBIX Processes

3.1.ZABBIX Server

ZABBIX Server is a central process of ZABBIX software. ZABBIX Server can be started by executing:

shell> cd bin shell> ./zabbix_server

ZABBIX Server runs as a daemon process. ZABBIX Server accepts the following command line parameters:

-c --config <file> specify configuration file, default is

/etc/zabbix/zabbix_server.conf -h --help give this help -v --version display version number

In order to get this help run:

shell> zabbix_server -h

Example of command line parameters:

shell> zabbix_server –c /usr/local/etc/zabbix_server.conf shell> zabbix_server --help shell> zabbix_server -v

The configuration file contains parameters for zabbix_server. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters:

Parameter Mandatory Default value Description
AlertScriptsPath No /home/zabbix/bin Location of scripts for user-defined media types.
DBHost Yes - Database name. Usually ‘zabbix’.
Parameter Mandatory Default value Description
DBName Yes - Database name. Usually ‘zabbix’.
DBSocket No - DB socket name. Used for non-TCP connection to MySQL database. Example: /tmp/mysql.sock
DBPassword No NULL Database password. If password is not used, then this parameter must be commented.
DBUser No NULL User name for connecting to the database.
DebugLevel No 3 Debug level, one of 0 – none 1 – critical 2 – errors 3 – warnings 4 – debug
DisableHouseke eping No 0 If set to 1, housekeeper will be disabled.
ExternalScripts No / etc/zabbix/extern alscripts Location of scripts for external checks.
FpingLocation No /usr/sbin/fping Location of ICMP pinger. It must have setuid flag set.
HousekkepingFr equency No 1 The parameter defines how often the daemon must perform housekeeping procedure (in hours). If PostgreSQL is used set the value to 24 as it will perform command VACUUM.
Include No - Use this parameter to include a file into the configuration file. Number of parameters Include is not limited. For example: Include=/etc/zabbix/db_conn. conf
ListenIP No - Interface to listen by trapper processes. Trapper will listen
Parameter Mandatory Default value Description
to all interfaces if this parameter is not set.
ListenPort No 10051 Port number to listen by trapper processes.
LogFile No - Name of log file. If not set, syslog is used.
LogFileSize No 1 This parameter controls log rotation setting for LogFile. By default, ZABBIX automatically roatates log file when it reaches 1MB. This parameter is in MB. If set to 0, no log rotation will be performed.
NodeID No 0 Unique NodeID (0-999). Must be ‘0’ or missing for standalone ZABBIX Server.
NodeNoEvents No 0 If set to ‘1’ local events won’t be sent to master node.
NodeNoHistory No 0 If set to ‘1’ local history won’t be sent to master node.
PidFile No / tmp/zabbix_serv er.pid Name of file to store PID
PingerFrequenc y No 30 ZABBIX server ping servers once per PingerFrequency seconds (1-3600).
SenderFrequenc y No 30 The parameter defines how often the daemon must try to send alerts (in seconds)
SourceIP No - Set source IP address for all connections established by the process.
StartDBSyncers No 0 Enable database cache: 0 – Disabled 1 – Enabled
StartDiscoverers No 1 Number of discoverers to start (0-255).
StartHTTPPoller s No 5 Number of HTTP pollers to start (0-255).
StartPollers No 5 Number of pollers to start (0
Parameter Mandatory Default value Description
255).
StartPollersUnre achable No 1 Number of pollers for unreachable hosts to start (0255).
StartTrappers No 5 Number of trappers to start (0-255)
Timeout No 5 Do not spend more than Timeout seconds on retrieving requested value (130) Note: Example of the configuration file can be found at misc/conf/zabbix_server.conf
TrapperTimeout No 5 Do not spend more than Timeout seconds on
processing of traps (1-255)
UnavailableDela y No 60 How ofter try to connect to unavailable host
UnreachableDel ay No 15 How often try to connect to unreachable host
UnreachablePeri od No 45 If a host was unreachable for more than UnreachablePeriod seconds, change host status to Unavailable

3.2.ZABBIX Proxy

ZABBIX Proxy is a process which collects performance and availability data from one or more monitored devices and sends the information to a ZABBIX Server. ZABBIX Proxy can be started by:

shell> cd sbin shell> ./zabbix_proxy

ZABBIX Proxy runs as a daemon process. ZABBIX Proxy accepts the following command line parameters:

-c --config <file> specify configuration file, default is

/etc/zabbix/zabbix_proxy.conf -h –help give this help -v --version display version number

In order to get this help run:

shell> zabbix_proxy -h

Example of command line parameters:

shell> zabbix_proxy –c /usr/local/etc/zabbix_proxy.conf shell> zabbix_proxy --help shell> zabbix_proxy -v

The configuration file contains parameters for zabbix_proxy. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters:

Parameter Mandatory Default value Description
ConfigFrequenc y No 3600 (1 hour) How often proxy refreshes configuration data in seconds.
DataSenderFreq uency No 10 Proxy will send collected data every N seconds. Possible values 1-3600 seconds.
DBHost Yes - Database name. Usually ‘zabbix’.
DBName Yes - Database name. Usually ‘zabbix’.
DBSocket No - DB socket name. Used for non-TCP connection to MySQL database. Example: /tmp/mysql.sock
DebugLevel No 3 Debug level, one of 0 – none 1 – critical 2 – errors 3 – warnings 4 – debug
Parameter Mandatory Default value Description
FpingLocation No /usr/sbin/fping Location of ICMP pinger. It must have setuid flag set.
Fping6Location No /usr/sbin/fping6 Location of ICMP pinger for TCP6. It must have setuid flag set.
Hostname Yes - Unique proxy name. The name is used to identify proxy on server side.
HeartbeatFreque ncy No 60 Frequency of heartbeat messages in seconds. If set to 0, heartbeat messages will be disabled.
HousekeepingFr equency No 1 The parameter defines how often the daemon must perform housekeeping procedure (in hours). If PostgreSQL is used set the value to 24 as it will perform command VACUUM.
ListenIP No - Interface to listen by trapper processes. Trapper will listen to all interfaces if this parameter is not set.
ListenPort No 10051 Port number to listen by trapper processes.
LogFile No - Name of log file. If not set, syslog is used.
LogFileSize No 1 This parameter controls log rotation setting for LogFile. By default, ZABBIX automatically roatates log file when it reaches 1MB. This parameter is in MB. If set to 0, no log rotation will be performed.
PidFile No / tmp/zabbix_serv er.pid Name of file to store PID
ProxyLocalBuffe r No 0 Proxy will keep data locally for N hours. This parameter may be used if local data is used by third party applications.
ProxyOfflineBuff No 1 Proxy will keep data N hours
Parameter Mandatory Default value Description
er in case if no connectivity with ZABBIX Server. Older data will be lost.
Server Yes 30 DNS name or IP address of ZABBIX server thr proxy will report to.
ServerPort No 10051 The Proxy will connect to this server port.
SourceIP No - Set source IP address for all connections established by the process.
StartDBSyncers No 0 Enable database cache: 0 – Disabled 1 – Enabled
StartDiscoverers No 1 Number of discoverers to start (0-255).
StartHTTPPoller s No 5 Number of HTTP pollers to start (0-255).
StartPingers No 1 Number of ICMP pingers to start (0-255).
StartPollers No 5 Number of pollers to start (0255).
StartPollersUnre achable No 1 Number of pollers for unreachable hosts to start (0255).
StartTrappers No 5 Number of trappers to start (0-255)
PingerFrequenc y No 30 ZABBIX server ping servers once per PingerFrequency seconds (1-3600).
Timeout No 5 Do not spend more than Timeout seconds on retrieving requested value (1255)
TrapperTimeout No 5 Do not spend more than Timeout seconds on processing of traps (1-255)
UnavailableDela y No 60 How ofter try to connect to unavailable host
UnreachableDel ay No 15 How often try to connect to unreachable host

3.3.ZABBIX Agent (UNIX, standalone daemon)

ZABBIX UNIX Agent runs on a host being monitored. The agent provides host's performance and availability information for ZABBIX Server.

ZABBIX Agent processes items of type ‘ZABBIX Agent’ or ‘ZABBIX Agent (active)’.

ZABBIX Agent can be started by executing:

shell> cd bin shell> ./zabbix_agentd

ZABBIX Agent runs as a daemon process. ZABBIX Agent accepts the following command line parameters:

-c --config <file> specify configuration file, default is

/etc/zabbix/zabbix_agentd.conf -h --help give this help -v --version display version number -p --print print supported metrics and exit -t --test <metric> test specified metric and exit

In order to get this help run:

shell> zabbix_agentd –h

Example of command line parameters:

shell> zabbix_agentd –c /usr/local/etc/zabbix_agentd.conf shell> zabbix_agentd --help

shell> zabbix_agentd --print shell> zabbix_agentd –t “system.cpu.load[all,avg1]

The configuration file contains configuration parameters for zabbix_agentd. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters:

Parameter Mandatory Default value Description
BufferSend No 5 Do not keep data longer than N seconds in buffer. Number of seconds, 1-3600.
BufferSize No 100 Maximum number of values in a buffer. The agent will send all collected data to ZABBIX Server or Proxy if the buffer is full.
DebugLevel No 3 Debug level: 0 – none 1 – critical 2 – errors 3 – warnings 4 – debug
DisableActive No 0 Disable processing of active checks. The agent will not connect to ZABBIX server to get list of active items if set to '1'.
DisablePassive No 0 Disable processing of passive checks. The agent will not listen TCP port. Set this parameter to '1' if you use active checks only.
EnableRemoteC ommands No 0 Enable remote commands. ZABBIX server will be able to send commands for execution by the agent.
Hostname No System hostname. Unique host name. The hostname is used for active checks only. If missing, system hostname (system.hostname) is used.
Include No - Use this parameter to include
Parameter Mandatory Default value Description
a file into the configuration file. Number of parameters Include is not limited. For example: Include=/etc/zabbix/user_par ameters.conf
ListenIP No - IP address to bind agent to. Useful if the host has multiple interfaces.
ListenPort No 10050 Port number to listen.
LogFile No - Name of log file. If not set, syslog is used.
LogFileSize No 1 This parameter controls log rotation setting for LogFile. By default, ZABBIX automatically roatates log file when it reaches 1MB. This parameter is in MB. If set to 0, no log rotation will be performed.
PidFile No / tmp/zabbix_age ntd.pid Name of PID file.
RefreshActiveCh ecks No 120 The agent will refresh list of active checks once per 120 (default) seconds.
Server Yes - Comma-delimited list of IP addresses of ZABBIX servers or Proxies. Connections from other IP addresses will be rejected.
ServerPort No 10051 The agent will connect to this server port for processing active checks. This can be port of ZABBIX Server or a Proxy.
SourceIP No - Set source IP address all connections established by the process.
StartAgents No 5 Number of agents to start.
Timeout No 3 Do not spend more than Timeout seconds on getting requested value (1-255). The
Parameter Mandatory Default value Description
agent does not kill timeouted User Parameters processes!
UserParameter No - User-defined parameter to monitor. There can be several user-defined parameters. Value has form , Example:UserParameter=use rs,who|wc -l Note: Example of the configuration file can be found at misc/conf/zabbix_agentd.con f.

3.4.ZABBIX Agent (UNIX, Inetd version)

The file contains configuration parameters for zabbix_agent. The file must exist and it should have read permissions for user ‘zabbix’. Supported parameters:

Parameter Mandatory Default value Description
Server Yes - Comma-delimited list of IP addresses of ZABBIX Servers or Proxies. Connections from other IP addresses will be rejected.
Timeout No 3 Do not spend more than Timeout seconds on getting requested value (1-255). The agent does not kill timeouted User Parameters processes!
UserParameter No - User-defined parameter to monitor. There can be several user-defined parameters. Example:UserParameter=us ers,who|wc -l

Note: Example of the configuration file can be found at misc/conf/zabbix_agent.conf

3.5.ZABBIX Agent (Windows)

Zabbix_agentd is ZABBIX agent for Win32/64 systems. It will work on Windows NT 4.0, Windows 2000, Windows XP, and Windows Vista.

3.5.1.Installation

Installation is very simple and includes 3 steps: Create configuration file. Create configuration file c:/zabbix_agentd.conf (it has the same syntax as UNIX agent). Install agent as a Windows service.

zabbix_agentd.exe --install

If you wish to use configuration file other than c:\zabbix_agentd.conf, you should use the following command for service installation:

zabbix_agentd.exe --config <your_configuration_file> install

Full path to configuration file should be specified. Run agent. Now you can use Control Panel to start agent's service or run:

zabbix_agentd.exe --start

Note: Windows NT 4.0 note. Zabbix_agentd.exe uses PDH (Performance Data Helper) API to gather various system information, so PDH.DLL is needed. This DLL is not supplied with Windows NT 4.0, so you need to download and install it by yourself. Microsoft Knowledge Base article number 284996 describes this in detail and contains a download link. You can find this article at http://support.microsoft.com/default.aspx?scid=kb;en-us;284996

3.5.2.Usage

Command line syntax:

zabbix_agentd.exe [-Vhp] [-idsx] [-c <file>] [-t <metric>]

ZABBIX Windows Agent accepts the following command line parameters:

Options:
-c --config <file> Specify alternate configuration file (default is
c:\zabbix_agentd.conf).
-h --help Display help information.
-V --version Display version number.
-p --print Print list of supported checks (metrics) and
exit.
-t –test <metric> Test single check (metric) and exit.

Functions:

-i --install Install ZABBIX agent as a service. -d --uninstall Uninstall ZABBIX agent service. -s --start Start ZABBIX agent service. -x --stop Stop ZABBIX agent service.

The configuration file (c:/zabbix_agentd.conf) contains configuration parameters for Zabbix_agentd.exe. Supported parameters:

Parameter Mandatory Default value Description
Alias No - Sets the alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one. For example, if you wish to retrieve paging file usage in percents from the server, you may use
Parameter Mandatory Default value Description
parameter "perf_counter[\Paging File(_Total)\% Usage]", or you may define an alias by adding the following line to configuration file: Alias = pg_usage:perf_counter[\Pagi ng File(_Total)\% Usage] After that you can use parameter name "pg_usage" to retrieve the same information. You can specify as many "Alias" records as you wish. Please note that aliases cannot be used for parameters defined in "PerfCounter" configuration file records.
DebugLevel No 3 Debug level, one of 0 – none 1 – critical 2 – errors 3 – warnings 4 – debug
Include No - Use this parameter to include a file into the configuration file. Number of parameters Include is not limited. For example: Include=c:\user_parameters. conf
ListenPort No 10050 Port number to listen.
LogFile No - Name of log file. If not set, syslog is used.
LogUnresolvedS ymbols No - Controls logging of unresolved symbols during agent startup. Values can be strings ‘yes’ or ‘no’ (without quotes).
MaxCollectorPro cessingTime No 100 Sets maximum acceptable processing time of one data sample by collector thread (in milliseconds). If processing time will exceed specified
Parameter Mandatory Default value Description
value, warning message will be written to the log file.
NoTimeWait No - The parameter has no effect.
PerfCounter No - <parameter_name>,"<perf_c ounter_path>",<period> Defines new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following:
PerfCounter = interrupts,"\Processor(0)\Inter rupts/sec",60
Please note double quotes around performance counter path. Samples for calculating average value will be taken every second. You may run typeperf –qx to get list of all performance counters available in Windows.
PidFile No - The parameter has no effect.
Server Yes - Comma-delimited list of IP addresses of ZABBIX servers. Connections from other IP addresses will be rejected.
SourceIP No - Set source IP address all connections established by the process.
StartAgents No - The parameter has no effect.

3.6.ZABBIX Sender (UNIX)

ZABBIX UNIX Sender is a command line utility which may be used to send performance data to ZABBIX Server for processing.

The utility is usually used in long running user scripts for periodical sending of availability and performance data.

ZABBIX Sender can be started by executing:

shell> cd bin shell> ./zabbix_sender –z zabbix –p 10051 –s LinuxDB3 –k db.connections –o 43

ZABBIX Sender accepts the following command line parameters:

-z --zabbix-server Hostname or IP address of ZABBIX Server.

<zabbix server> -p --port <zabbix Specify port number of server trapper server port> running on the server. Default is 10051.

-s --host <host Specify host name. Host IP address and

name or IP> DNS name will not work. -I --source-Specify source IP address address <ip address>

-k --key <key of Specify metric name (key) we want to send. metric>

-o --value <value> Specify value of the key. -i --input-file Load values from input file. <input file>

-h --help Give this help. -v --version Display version number.

In order to get this help run:

shell> zabbix_sender -h

3.7.ZABBIX Get (UNIX)

ZABBIX UNIX Get is a process which communicates with ZABBIX Agent and retrieves required information. The utility is usually used for troubleshooting of ZABBIX Agents. ZABBIX Get can be started by executing:

shell> cd bin shell> ./zabbix_get -s127.0.0.1 -p10050 -k"system.cpu.load[all,avg1]"

ZABBIX Get accepts the following command line parameters:

-p --port <port Specify port number of agent running on the

number> host. Default is 10050. -s –host <host Specify host name or IP address of a host. name or IP>

-I --source-Specify source IP address address <ip address>

-k –key <key of Specify metric name (key) we want to metric> retrieve. -h --help Give this help. -v --version Display version number.

In order to get this help run:

shell> zabbix_get -h

4.Configuration

4.1.Development Environment

Ubuntu Linux is used as a primary development platform for ZABBIX.

Four servers are used for test purposes:

4.2.Actions

ZABBIX reacts to events by executing set of operations. An action can be defined for any event or set of events generated by ZABBIX.

Action attributes:

Parameter Description
Name Unique action name.
Event Source Source of event. Currently two sources are supported: Triggers – events generated by trigger status changes Discovery – events generated by auto-discovery module
Enable escalations Enable escalations. If enable, the action will be escalated according to operation steps defined for
Parameter Description
operations.
Period (seconds) Time period for increase of escalation step.
Event Source Event source:
Triggers – action will be executed for events generated
by triggers
Discovery – action will be executed for discovery
events
Default subject Default notification subject. The subject may contain
macros.
Default message Default notification message. The message may
contain macros.
Recovery message If enabled, ZABBIX will send a recovery message after
an original problem is resolved. The messages will be
send to those who received any message for this
problem before.
Recovery subject Subject of the recovery message. It may contain
macros.
Recovery message Recovery message. It may contain macros.
Status Action status:
Enabled – action is active
Disabled – action is disabled

4.2.1.Action conditions

An action is executed only in case if an event matches defined set of conditions. The following conditions can be defined for Trigger based events:

Condition type Supported operators Description
Application =, like, not like = -event came from Trigger, which is part of the Application like -event came from Trigger, which is part of the Application containing the String not like -event came from Trigger, which is part of the Application not containing the String
Condition type Supported operators Description
Host group =, <> Compare against Host Group having a trigger which generated event.
= -event came from this Host Group
<> -event did not come from this Host Group
Host template =, <> Compare against Host Template the trigger belongs to.
= -event came from a trigger inherited from this Host Template
<> -event did not come from a trigger inherited from this Host Template
Host =, <> Compare against Host having a trigger which generated event.
= -event came from this Host
<> -event did not come from this Host
Trigger =, <> Compare against generated event. Trigger which
= -event generated by this Trigger
<> -event generated by other Trigger
Trigger (name) description like, not like Compare against Trigger Name which generated event. like – String can be found in Trigger Name. Case sensitive.
not like – String cannot be found in Trigger Name. Case sensitive.
Trigger severity =, <>, >=, <= Compare with Trigger Severity.
= -equal to trigger severity
<> -not equal to trigger severity
>= -more or equal to trigger severity
<= -less or equal to trigger severity
Trigger value = Compare with Trigger Value. = -equal to trigger value (OK PROBLEM) or
Time period in in Event is within time period. in – event time matches period the time
Time period is given in format:
Copyright 2008 ZABBIX SIA Page 84 of 320
Condition type Supported operators Description
dd-dd,hh:mm-hh:mm;dddd,hh:mm:hh:mm;…

Trigger value:

  • Trigger changes status from FALSE to TRUE (trigger value is TRUE)
  • Trigger changes status from TRUE to FALSE (trigger value is FALSE)

Note: Status change FALSE->UNKNOWN->TRUE is treated as FALSE->TRUE, and TRUE->UNKNOWN->FALSE as TRUE->FALSE.

The following conditions can be defined for Discovery based events:

Condition type Supported operators Description
Host IP =, <> Check if IP address of a discovered Host is or is not in the range of IP addresses. = -Host IP is in the range <> -Host IP is out of the range
Service type =, <> Check if a discovered service. = -matches discovered service <> -event came from a different service
Service port =, <> Check if TCP port number of a discovered service is or is not in the range of ports. = -service port is in the range <> -service port is out of the range
Discovery status = Up – matches Host Up and Service Up events Down – matches Host Down and Service Down events
Uptime/Downtime >=, <= Downtime for Host Down and Service Down events. Uptime for Host Up and Service Up events.
Condition type Supported operators Description
>= -uptime/downtime is more or equal
<= -uptime/downtime is less or equal Parameter is given in seconds.
Received value = <> >= <= like not like Compare with value received from an agent (ZABBIX, SNMP). String comparison. = -equal to the value <> -not equal to the value >= -more or equal to the value <= -less or equal to the value like – has a substring not like – does not have a substring Parameter is given as a string.

For example this set of conditions (calculation type: AND/OR):

Host group = Oracle servers Host group = MySQL servers Trigger name like ‘Database is downTrigger name like ‘Database is unavailable

is evaluated as

(Host group = Oracle servers or Host group = MySQL servers) and (Trigger name like ‘Database is down’ or Trigger name like ‘Database is unavailable’)

4.2.2.Operations

Operation or a set of operations is executed when event matches conditions.

ZABBIX supports the following operations:

  • Send message
    • Remote command(s), including IPMI.
    • Additional operations available for discovery events:
  • Add host
  • Remove host
  • Add to group
  • Delete from group
  • Link to template
  • Unlink from template
Parameter Description
Step If escalation is enabled for this action, escalation settings: From – execute for each step starting from this one To – till this (0, for all steps starting from From) Period – increase step number after this period, 0 – use default period.
Operation type Type of action: Send message – send message to user Execute command – execute remote command
Event Source
Send message to Send message to: Single user – a single user User group – to all member of a group
Default message If selected, default message will be used.
Subject Subject of the message. The subject may contain macros.
Message The message itself. The message may contain macros.
Remote command List of remote commands.

Note: Starting from 1.6.2, ZABBIX sends notifications only to those users, which have read permissions to a host (trigger), which generated the event. At least one host of a trigger expression must be accessible.

4.2.3.Macros for messages and remote commands

The macros can be used for more efficient reporting.

Subject: {TRIGGER.NAME}: {TRIGGER.STATUS} Message subject will be replaced by something like: ‘Processor load is too high on server zabbix.zabbix.com: ON

The message will be replaced by something like: ‘Processor load is: 1.45’

The message will be replaced by something like:

Latest value: 1.45 MAX for 15 minutes: 2.33 MIN for 15 minutes: 1.01

4.3.Macros

ZABBIX supports number of macros which may be used in various situations. Effective use of macros allows to save time and make ZABBIX configuration more transparent.

4.3.1.List of supported macros

The table contains complete list of macros supported by ZABBIX.

{DATE} X Current date in yyyy.mm.dd. format.
{ESC.HISTORY} X Escalation history. Log of previously sent messages.
{EVENT.AGE} X Age of the event. Useful in escalated messages.
{EVENT.DATE} X Date of the event.
{EVENT.ID} X Numeric event ID which triggered this action.
{EVENT.TIME} X Time of the event.
{HOSTNAME} X X X X Host name of first item of the trigger which caused a notification.
{HOST.CONN} X X X IP and host DNS name depending on host settings.
{HOST.DNS} X X X Host DNS name.
{IPADDRESS} X X X X IP address of first item of the trigger which caused a notification.
{ITEM.LASTVALUE} X X The latest value of first item of the trigger expression which caused a notification. Supported from ZABBIX 1.4.3.
It is alias to {{HOSTNAME}: {TRIGGER.KEY}.last(0)}
{ITEM.NAME} X Name of first item of the trigger which caused a notification.
{ITEM.VALUE} {ITEM.VALUE1} X The latest value of Nth item of the trigger expression if used for displaying triggers.
… {ITEM.VALUE9} Historical (when event happenned) value of Nth item of the trigger expression if used for displaying events.
Supported from ZABBIX 1.4.3.
{PROFILE.CONTACT} X Contact from host profile.
{PROFILE.DEVICETY PE} X Device type from of host profile.
{PROFILE.HARDWAR E} X Hardware from host profile.
{PROFILE.NAME} X Name from host profile.
Copyright 2008 ZABBIX SIA Page 90 of 320
{PROFILE.LOCATION} {PROFILE.MACADDR ESS} {PROFILE.NOTES} {PROFILE.OS} {PROFILE.SERIALNO} {PROFILE.SOFTWAR E} {PROFILE.TAG} {STATUS} {TIME} {TRIGGER.COMMENT } {TRIGGER.ID} X X X X X X X X X X X Location from host profile. Mac Address from host profile. Notes from host profile. OS from host profile. Serial No from host profile. Software from host profile. Tag from host profile. Alias for {TRIGGER.STATUS}. Current time in hh:mm.ss. Trigger comment. Numeric trigger ID which triggered this action.
{TRIGGER.KEY} X Key of first item of the trigger which caused a notification.
{TRIGGER.NAME} X Name (description) of the trigger.
{TRIGGER.NSEVERIT Y} X Numerical trigger severity. Possible values:
0 - Not classified
1 - Information
2 - Warning 3 - Average 4 - High 5 - Disaster
{TRIGGER.SEVERITY} X Supported starting from ZABBIX 1.6.2. Trigger severity. Possible values: Not classified
Information
Warning Average High Disaster
{TRIGGER.STATUS} X Unknown Trigger state. ON - if trigger is in TRUE state, OFF - if trigger is in FALSE state.
{TRIGGER.URL} X Trigger URL.

{TRIGGER.VALUE} X X Current trigger value:

0 - trigger is in OFF state

1 – trigger is in ON state

2 – trigger UNKNOWN

This macro can also be used in

trigger expressions. {host:key.func(param) X X Simple macros as used in trigger } expressions.

Note: Macros for host labels are supported starting from 1.8.

4.4.Applications

Application is a set of host items. For example, application ‘MySQL Server’ may contain all items which are related to the MySQL server: availability of MySQL, disk space, processor load, transactions per second, number of slow queries, etc.

An item may be linked with one or more applications.

Applications are used in ZABBIX front-end to group items.

4.5.Graphs

User-defined graphs allow the creation of complex graphs. These graphs can be easily accessed via the menu item “Graphs”.

4.6.Medias

Media is a delivery channel for ZABBIX alerts. None, one or more media types can be assigned to user.

4.6.1.EMAIL

Email notification

4.6.2.JABBER

Notifications using Jabber messaging.

4.6.3.SCRIPT

Custom script. ZABBIX passes three command line parameters to the script: Recipient, Subject and Message.

4.6.4.GSM Modem

ZABBIX supports sending of SMS messages using Serial GSM Modem connected to ZABBIX Server’s serial port.

Make sure that:

    • Speed of a serial device (normally /dev/ttyS0 under Linux) matches GSM Modem
    • ZABBIX does not set speed of the serial link. It uses default settings.
  • The serial device has read/write access for user zabbix. Run commans ls –l /dev/ttyS0 to see current permission of the serial device.
  • GSM Modem has PIN entered and it preserves it after power reset. Alternatively you may disable PIN on the SIM card.

PIN can be entered by issuing command AT+CPIN=”NNNN” (NNNN is your PIN number, the quotes must present) in a terminal software, such as Unix minicom or Windows HyperTerminal.

ZABBIX has been tested with the following GSM modems:

  • Siemens MC35
  • Teltonika ModemCOM/G10

4.7.Host templates

Use of templates is an excellent way of making maintenance of ZABBIX much easier.

A template can be linked to a number of hosts. Items, triggers and graphs of the template will be automatically added to the linked hosts. Change definition of a template item (trigger, graph) and the change will be automatically applied to the hosts.

Host template attributes:

Parameter Description
Name Unique template (host) name. unique within ZABBIX Node. The name must be
Parameter Description
Groups List of host groups the template belongs to.
New group Assign new host group to the template.
Link with template Used to create hierarchical templates.

4.8.Host groups

Host group may have zero, one or more hosts. Host group attributes:

Parameter Description
Group name Unique host group name. The name must be unique within ZABBIX Node.
Hosts List of hosts of this group.

4.9.Host and trigger dependencies

ZABBIX does not support host dependencies. Host dependencies can be defined using more flexible option, i.e. trigger dependencies.

How it works?

A trigger may have list of one or more triggers it depends on. It means that the trigger will still change its status regardless of state of the triggers in the list, yet the trigger won’t generate notifications and actions in case if one of the trigger in the list has state TRUE.

Host dependency

Suppose you have two hosts: a router and a server. The server is behind the router. So, we want to receive only one notification if the route is down:

“The router is down”

instead of:

“The router is down” and “The host is down”

In order to achieve this, we create a trigger dependency: “The host is down” depends on “The router is down”

In case if both the server and the router is down, ZABBIX will not execute actions for trigger “The host is down”.

4.10.Items

Item is a single performance or availability check.

4.10.1.Item key

Flexible and non-flexible parameters

Flexible parameter is parameter which accepts argument. For example, vfs.fs.free[*] is flexible parameter. * is any string that will be passed as argument of the parameter. vfs.fs.free[/], vfs.fs.free[/opt] -correct definitions.

Allowed characters

The following characters are allowed:

0-9a-zA-Z_.,:-$<space>

Note: Use of the ‘,’ and ‘:’ is not recommended and can be dropped in future releases. Support of Novell parameters will be maintained.

4.10.2.Supported by Platform

Please consult ZABBIX Manual for Windows parameters. The table is valid for ZABBIX 1.1beta3 and higher.

Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
agent.ping X X X X X X X X X
agent.version X X X X X X X X X
kernel.maxfiles - X X X - - - - -
kernel.maxproc - - - X X - - - -
net.if.collisions[<if>] - X X X X - - - -
net.if.in[<if><,mode>] - X X X X - - - -
mode bytes - X X X X - - - -
packets - X X X X - - - -
errors - X X X X - - - -
dropped - X X X - - - - -
net.if.out[<if><,mode>] - X X X X - - - -
mode bytes - X X X X - - - -
packets - X X X X - - - -
errors - X X X X - - - -
dropped - X X - - - - - -
net.tcp.dns[<ip,>zone] - X X X X X X X -
net.tcp.listen[port] - - - X X - - - -
net.tcp.port[<ip,>port] X X X X X X X X X
net.tcp.service.perf[service<,ip> <,port>] - X X X X X X X -
net.tcp.service[service<,ip><,port >] - X X X X X X X -
proc.mem[<name><,user> <,mode><,cmdline>] - X X X X - X X -
Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
mode sum - X X X X - X X -
avg - X X X X - X X -
max - X X X X - X X -
min - X X X X - X X -
proc.num[<name><,user> <,state><,cmdline>] - X X X X - X X -
state all - X X X X - X X -
sleep - X X X X - X X -
zomb - X X X X - X X -
run - X X X X - X X -
system.boottime - X X X - - - - -
system.cpu.intr - X X X X - - - -
system.cpu.load[<cpu> <,mode>] X X X X X X - - -
mode avg1 - X X X X X - - -
avg5 - X X X X X - - -
avg15 - X X X X X - - -
system.cpu.num X X X X X X - - -
system.cpu.switches - - - X X - - - -
system.cpu.util[<cpu><,type> <,mode>] X - X X X - - - -
Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
type user - - X X X X - - -
nice - - X X - X - - -
idle - - X X X X - - -
system - - X X - X - - -
kernel - - - - X X - - -
wait - - - - X X - - -
interrupt - - - X - - - - -
mode avg1 - X X X - X - - -
avg5 - X X X - X - - -
avg15 - X X X - X - - -
system.run[command<,mode>] X X X X X X X X X
mode wait X X X X X X X X X
nowait X X X X X X X X X
system.hostname X X X X X X X X X
system.localtime X X X X X X X X X
system.swap.in[<swap><,type>] - - X - X - - - -
type count - - - - X - - - -
pages - - - - X - - - -
system.swap.out[<swap><,type>] - - X - X - - - -
type count - - - - X - - - -
pages - - - - X - - - -
system.swap.size[<swap><,type>] X X X X X - - X -
Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
mode free - X X X X - - X -
total - X X X X - - X -
system.uname X X X X X X X X -
system.uptime X X X X X - - - -
system.users.num - X X X X X X X -
vfs.dev.read[device<,type> <,mode>] - X X X X - - - -
type sectors - X X - - - - - -
operations - X X - X - - - -
bytes - - - - X - - - -
ops - - - X - - - - -
bps - - - X - - - - -
mode avg1 - - - X - - - - -
avg5 - - - X - - - - -
avg15 - - - X - - - - -
vfs.dev.write[device<,type> <,mode>] - X X X X - - - -
type sectors - X X - - - - - -
operations - X X - X - - - -
bytes - - - - X - - - -
ops - - - X - - - - -
bps - - - X - - - - -
Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
mode avg1 - - - X - - - - -
avg5 - - - X - - - - -
avg15 - - - X - - - - -
vfs.file.cksum[file] X X X X X X X X -
vfs.file.exists[file] X X X X X X X X X
vfs.file.md5sum[file] X X X X X X X X -
vfs.file.regexp[file, user] - X X X X X X X -
vfs.file.regmatch[file, user] - X X X X X X X -
vfs.file.size[file] X X X X X X X X -
vfs.file.time[file<,mode>] - X X X X X X X -
mode modify - X X X X X X X -
access - X X X X X X X -
change - X X X X X X X -
vfs.file.inode[fs<,mode>] - X X X X X X X -
mode total - X X X X X X X -
free - X X X X X X X -
used - X X X X X X X -
pfree - X X X X X X X -
pused - X X X X X X X -
vfs.file.size[fs<,mode>] - X X X X X X X -
Parameter system Windows Linux 2.4 Linux 2.6 FreeBSD Solaris HP-UX AIX Tru64 Mac OS/X
mode total - X X X X X X X -
free - X X X X X X X -
used - X X X X X X X -
pfree - X X X X X X X -
pused - X X X X X X X -
vm.memory.size[<mode>] X X X X X X X - -
mode total - X X X X X X X -
free - X X X X X X X -
shared - X X X - X X - -
buffers - X X X - X X - -
cached - X X X - X X - -

4.10.3.ZABBIX Agent

Flexible and non-flexible parameters

Flexible parameter is parameter which accepts argument. For example, vfs.fs.free[*] is flexible parameter. * is any string that will be passed as argument of the parameter. vfs.fs.free[/], vfs.fs.free[/opt] -correct definitions.

String between [] may contain the following characters:

0-9a-zA-Z.:,()_/[space]

List of supported parameters ZABBIX AGENT

Key Description Return value Parameters Comments
agent.ping Check the agent availability. Always return ‘1’. - Can be used as a TCP ping.
agent.version Version of ZABBIX Agent. String - Example of returned value: 1.3.2
kernel.maxfiles Maximum number of opened files supported by OS. Number of files. Integer.
kernel.maxproc Maximum number of processes supported by OS. Number of processes. Integer.
log[file<,regexp >] Monitoring of log file. Log. file – full file name regexp – regual expression Must be Active Check.
net.if.collisions[ if] Out-of-window collision. Number of collisions. Integer. if -interface
net.if.in[if Network Integer. if -interface
<,mode>] interface incoming statistic. mode bytes number of bytes (default) packets number of packets errors number of errors dropped number of dropped packets
net.if.out[if Network Integer. if -interface Examples:
<,mode>] interface outgoing statistic. mode bytes number of bytes (default) packets number of packets errors number of errors net.if.out[eth0,errors] net.if.out[eth0] You may use this key with Delta (speed per second) in order to get bytes per second statistics.
Key Description Return value Parameters Comments
dropped number of dropped packets
net.tcp.dns[ip, Checks if DNS 0 -DNS is down ip -IP address of Example:
zone] service is up. 1 -DNS is up DNS server (ignored) zone -zone to test the DNS net.tcp.dns[127.0.0.1, zabbix.com]
net.tcp.listen[p ort] Checks if this port is in LISTEN state. 0 -it is not 1 -it is in LISTEN state port -port number Example: net.tcp.listen[80]
net.tcp.port[<ip Check, if it is 0 -cannot ip -IP Example:
>, port] possible to make TCP connection to port number port. connect 1 -can connect address(default is 127.0.0.1) port -port number net.tcp.port[,80] can be used to test availability of WEB server running on port 80. Old naming: check_port[*]
net.tcp.service[ Check if 0 -service is service -one of ssh, Example:
service <,ip> <,port>] service is running and accepting TCP connections. down 1 -service is running 2 -timeout connecting to the service service.ntp, ldap, smtp, ftp, http, pop, nntp, imap, tcp ip -IP address (default is 127.0.0.1) port -port number (by default standard service port number is used) net.tcp.service[ftp,,45 ] can be used to test availability of FTP server on TCP port 45. Old naming: check_service[*]
net.tcp.service. Check 0 -service is service -one of ssh, Example:
perf[service performance down service.ntp, ldap, net.tcp.service.p
<,ip> <,port>] of service sec -number of seconds spent smtp, ftp, http, pop, nntp, imap, tcp erf[ssh] can be used to test speed of initial
while ip -IP address response from SSH
connecting to (default is 127.0.0.1) server.
the service port -port number (by default standard service port number Old naming:check_service[*]
is used)
proc.mem[<na me> <,user> <,mode><,cmdli ne>] Memory used by process name running under user Memory used by process. name -process name user -user name (default is all users) Example: proc.mem[,root] -memory used by all processes running
Key Description Return value Parameters Comments
user mode -one of avg, under user "root".
max, min, sum (default) proc.mem[zabbix_ser ver,zabbix] -memory
cmdline -filter by command line used by all processes zabbix_server running under user zabbix proc.mem[,oracle,ma x,oracleZABBIX] -memory used by most memory hungry process running under oracle having oracleZABBIX in its command line
proc.num[<nam Number of Number of name -process Example:
e> <,user> <,state><,cmdli ne>] processes name having state running under user user processes. name user -user name (default is all users) state -one of all proc.num[,mysql] -number of processes running under user mysql
(default), run, sleep, proc.num[apache2,w
zomb ww-data] -number of
cmdline -filter by command line apache2 running under user www-data
proc.num[,oracle,slee
p,oracleZABBIX] -
number of processes
in sleep state running
under oracle having
oracleZABBIX in its
command line
system.cpu.intr Device interrupts. Integer.
system.boottim e Timestamp of system boot. Integer. Time is seconds.
system.cpu.loa CPU(s) load. Processor load. cpu -CPU number Example:
d[<cpu> <,mode>] Float. (default is all CPUs) mode -one of avg1 system.cpu.load[]
(default),avg5
(average within 5
minutes), avg15 Note that returned
value is not
percentage.
Key Description Return value Parameters Comments
Old naming: system.cpu.loadX
system.cpu.nu m Number of CPUs. Number of available proccessors. Example: system.cpu.num
system.cpu.swi tches Context switches. Switches count. Old naming: system[switches]
system.cpu.util[ CPU(s) Processor load cpu -CPU number Old naming:
<cpu> <,type> utilisation. in percents (default is all CPUs) system.cpu.idleX,
<,mode>] type -one of idle, nice, user (default), system mode -one of avg1 (default),avg5 (average within 5 minutes), avg15 system.cpu.niceX, system.cpu.systemX, system.cpu.userX Example: system.cpu.util[0,user ,avg5]
system.run[co Run specified Text result of command - Example:
mmand<,mode> ] command on the host. the command command for execution system.run[ls -l /] -detailed file list of root
mode -one of wait (default, wait end of execution), nowait (do no wait) directory. Note: To enable this functionality, agent configuration file must have EnableRemoteComm ands=1 option.
system.hostna me Return host name. String value Example of returned value www.zabbix.com
system.localtim e System local time. Time in seconds.
system.swap.in Swap in. Swap statistics device -swap device Example:
[<device> <,type>] (default is all), type -one of count (default, number of swapins), pages (pages swapped in) system.swap.in[,byte s] Old naming:
Key Description Return value Parameters Comments
swap[in]
system.swap.o ut[<device> <,type>] Swap in. Swap statistics device -swap device (default is all), type -one of count (default, number of swapouts), pages (pages swapped out) Example: system.swap.out[,pag es] Old naming: swap[out]
system.swap.si ze[<device> <,mode>] Swap space. Number of bytes or percentage device -swap device (default is all), type one of free (default, free swap space), total (total swap space), pfree (free swap space, percentage), pused (used swap space, percentage) Example: system.swap.size[,pfr ee] -percentage of free swap space Old naming: system.swap.free, system.swap.total
system.uname Returns detailed host information. String value Example of returned value: FreeBSD localhost 4.4-RELEASE FreeBSD 4.4RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.Free BSD.org: /usr/src/sys/compile/ GENERIC i386
system.uptime System's uptime in seconds. Number of seconds Use Units s or uptime to get readable values.
system.users.n um Number of users connected. Number of users Command who is used on agent side.
vfs.dev.read[de vice <,type>] Disk read statistics. Numeric value device -disk device (default is all), type one of sectors (default), operations Example: vfs.dev.read[,operatio ns] Old naming: io[*]
vfs.dev.write[de vice <,type>] Disk write statistics. Numeric value device -disk device (default is all), type one of sectors (default), operations Example: vfs.dev.write[,operatio ns] Old naming: io[*]
vfs.file.cksum[fi le] Calculate file check sum File check sum calculated by algorithm used file -full path to file Example of returned value: 1938292000
Key Description Return value Parameters Comments
by UNIX cksum. Example: vfs.file.cksum[/etc/pa sswd]
vfs.file.exists[fil e] Check if file exists 0 -file does not exist 1 -file exists file -full path to file Example: vfs.file.exists[/tmp/ap plication.pid]
vfs.file.md5sum [file] File's MD5 check sum MD5 hash of the file. Can be used only for files less than 64MB, unsupported otherwise. Example of returned value: b5052decb577e0fffd 622d6ddc017e82 Example: vfs.file.md5sum[/etc/z abbix/zabbix_agentd. conf]
vfs.file.regexp[fi le, regexp] Find string in a file Matched string file -full path to file, regexp -GNU regular expression Example: vfs.file.regexp[/etc/pa sswd,zabbix]
vfs.file.regmatc h[file, regexp] Find string in a file 0 -expression not found 1 -found file -full path to file, regexp -GNU regular expression Example: vfs.file.regexp[/var/lo g/app.log,error]
vfs.file.size[file] File size Size in bytes. file -full path to file File must have read permissions for user zabbix Example: vfs.file.size[/var/log/s yslog]
vfs.file.time[file <, mode>] File time information. Number of seconds. file -full path to file mode -one of modify (default, modification time), access -last access time, change -last change time Example: vfs.file.time[/etc/pass wd,modify]
vfs.fs.inode[fs <,mode>] Number of inodes Numeric value fs -filesystem, mode -one of total (default), free, used, pfree (free, percentage), pused (used, percentage) Example: vfs.fs.inode[/,pfree] Old naming: vfs.fs.inode.free[*], vfs.fs.inode.pfree[*], vfs.fs.inode.total[*]
vfs.fs.size[fs <,mode>] Disk space Disk space in KB fs -filesystem, mode -one of total (default), free, used, pfree (free, percentage), pused (used, percentage) In case of a mounted volume, disk space for local file system is returned. Example: vfs.fs.size[/tmp,free]
Key Description Return value Parameters Comments
Old naming: vfs.fs.free[*], vfs.fs.total[*], vfs.fs.used[*], vfs.fs.pfree[*], vfs.fs.pused[*]
vm.memory.siz Memory size Memory size in mode -one of total Old naming:
e[<mode>] bytes (default), shared, free, buffers, cached vm.memory.buffers, vm.memory.cached, vm.memory.free, vm.memory.shared, vm.memory.total
web.page.get[h ost,<path>,<por t>] Get content of WEB page host hostname, path -path to HTML document (default is /), port -port number (default is 80) WEB page source as text Returns EOF on fail. Example: web.page.get[www.z abbix.com,index.php, 80]
web.page.perf[ host,<path>,<p ort>] Get timing of loading full WEB page Time in seconds host -hostname, path -path to HTML document (default is /), port -port number (default is 80) Example: web.page.perf[www.z abbix.com,index.php, 80]
web.page.regex p[host, <path>, <port>, <regexp>, <length>,] Get first occurence of regexp in WEB page Matched string host -hostname, path -path to HTML document (default is /), port -port number (default is 80), regexp -GNU regular expression, length -number of characters to return Returns EOF on fail. Example: web.page.get[www.z abbix.com, index.php, 80, OK, 2]

Linux-specific note. ZABBIX agent must have read-only access to filesystem /proc. Kernel patches from www.grsecurity.org limit access rights of non-privileged users.

WIN32-SPECIFIC PARAMETERS

This section contains description of parameter supported by ZABBIX WIN32 agent only.

Key Description Return value Comments
agent[avg_coll ector_time] Average time spent by collector Time in milliseconds
Key Description Return value Comments
thread on each sample processing for last minute.
agent[max_coll ector_time] Maximum time spent by collector thread on each sample processing for last minute. Time in milliseconds
agent[accepted _requests] Total number of requests accepted by agent for processing. Number of requests
agent[rejected_ requests] Total number of requests rejected by agent for processing. Number of requests
agent[timed_ou t_requests] Total number of requests timed out in processing. Number of requests
agent[accept_e rrors] Total number of accept() system call errors. Number of system calls
agent[processe d_requests] Total number of requests successfully processed by agent. Number of requests
agent[failed_re quests] Total number of requests with errors in processing. Number of requests These requests generated ZBX_ERROR return code
agent[unsuppo rted_requests] Total number of requests for unsupported parameters. Number of requests These requests generated ZBX_UNSUPPORTED return code
perf_counter[*] Value of any performance counter, where Value of the counter Performance Monitor can be used to obtain list of available counters. Note that this parameter will return correct value only for counters that require just one sample (like
Key Description Return value Comments
parameter is the counter path. \System\Threads). It will not work as expected for counters that require more that one sample -like CPU utilisation.
service_state[*] State of service. Parameter is service name. 0 – running 1 – paused 2 -start pending 3 -pause pending 4 -continue pending 5 -stop Parameter must be real service name as it seen in service properties under "Name:" or name of EXE file.
pending 6 – stopped 7 -unknown 255 – no such service
proc_info[<pro cess>,<attribut e>,<type>] Different information about specific process(es). <process> -process name (same as in proc_cnt[] parameter) <attribute> -requested The following attributes are currenty supported: vmsize -Size of process virtual memory in Kbytes wkset -Size of process working set (amount of physical memory used by process) in Kbytes pf -Number of page faults ktime -Process kernel time in milliseconds utime -Process user time in milliseconds io_read_b -Number of bytes read by process during I/O operations io_read_op -Number of read operation performed by process io_write_b -Number of bytes written by process during I/O operations io_write_op -Number of write operation performed by process io_other_b Number of bytes transferred by process during operations other than read and write operations io_other_op -Number of I/O
process attribute. operations performed by process, other than read and write operations gdiobj -Number of GDI objects used by process userobj -Number of USER objects used by process <type> -representation type (meaningful when more than one process with the same name exists). Valid values are: min -minimal value among all processes named <process> max -maximal value among all processes named <process> avg -average value for all processes named <process> sum -sum of values for all processes named
Key Description Return value Comments
<process> Examples: 1. In order to get the amount of physical memory taken by all Internet Explorer processes, use the following parameter: proc_info[iexplore.exe,wkset,sum] 2. In order to get the average number of page faults for Internet Explorer processes, use the following parameter: proc_info[iexplore.exe,pf,avg] Note: All io_xxx,gdiobj and userobj attributes available only on Windows 2000 and later versions of Windows, not on Windows NT 4.0.

4.10.4.SNMP Agent

ZABBIX must be configured with SNMP support in order to be able to retrieve data provided by SNMP agents.

The following steps have to be performed in order to add monitoring of SNMP parameters:

Step 1 Create a host for the SNMP device.

Enter an IP address and a port of 161. Set the host Status to NOT MONITORED. You can use the host.SNMP template which would automatically add set of items. However, the template may not be compatible with the host.

Step 2 Find out the SNMP string of the item you want to monitor.

After creating the host, use 'snmpwalk' (part of ucd-snmp/net-snmp software which you should have installed as part of the ZABBIX installation) or equivalent tool:

shell> snmpwalk <host or host IP> public

This will give you a list of SNMP strings and their last value. If it doesn't then it is possible that the SNMP 'community' is different to the standard public in which case you will need to find out what it is. You would then go through the list until you find the string you want to monitor, e.g. you wanted to monitor the bytes coming in to your switch on port 3 you would use:

interfaces.ifTable.ifEntry.ifOctetsIn.3 = Counter 32: 614794138 You should now use the snmpget command to find the OID for interfaces.ifTable.ifEntry.ifInOctets.3:

shell> snmpget -On 10.62.1.22 interfaces.ifTable.ifEntry.ifOctetsIn.3

where the last number in the string is the port number you are looking to monitor. This should give you something like the following:

.1.3.6.1.2.1.2.2.1.10.3 = Counter32: 614794138

again the last number in the OID is the port number.

3COM seem to use port numbers in the hundreds, e.g. port 1=port 101, port 3=port 103, but Cisco use regular numbers, e.g. port 3=3

Create an item for monitoring.

So, now go back to ZABBIX and click on Items, selecting the SNMP host you created earlier. Depending on whether you used a template or not when creating your host you will have either a list of SNMP items associated with your host or just a new item box. We will work on the assumption that you are going to create the item yourself using the information you have just gathered using snmpwalk and snmpget, so enter a plain English description in the 'Description' field of the new item box. Make sure the 'Host' field has your switch/router in it and change the 'Type' field to "SNMPv1 agent" (I had difficulty with SNMPv2 agent so I don't use it). Enter the community (usually public) and enter the numeric OID that you retrieved earlier in to the 'SNMP OID' field being sure to include the leading dot,

i.e. .1.3.6.1.2.1.2.2.1.10.3

Enter the 'SNMP port' as 161 and the 'Key' as something meaningful, e.g. SNMP-InOctets-Bps. Choose the Multiplier if you want one and enter an 'update interval' and 'keep history' if you want it to be different from the default. Set the 'Status' to MONITORED, the 'Type of information' to NUMERIC and the 'Store value' to DELTA (important otherwise you will get cumulative values from the SNMP device instead of the latest change).

Now ADD the item and go back to the hosts area of ZABBIX. From here set the SNMP device to be MONITORED and check in LATEST VALUES for your SNMP data!

General example Note that OID can be given in either numeric or string form. However, in some cases, string OID must be converted to numeric representation. Utility snmpget may be used for this purpose:

Parameter Description
Community public
Oid 1.2.3.45.6.7.8.0 (or .1.2.3.45.6.7.8.0)
Key <Unique string to be used as reference to triggers> For example, ‘my_param’.

shell> snmpget -On localhost public enterprises.ucdavis.memory.memTotalSwap.0

Monitoring of SNMP parameters is possible if either -with-net-snmp or -with-ucdsnmp flag was specified while configuring ZABBIX sources.

Monitoring of Uptime

Parameter Description
Community public
Oid MIB::sysUpTime.0
Key router.uptime
Value type Float
Units uptime
Multiplier 0.01

4.10.5.Simple checks

Simple checks Simple checks are normally used for agent-less monitoring or for remote checks of services. Note that ZABBIX Agent is not needed for simple checks. ZABBIX

Server is responsible for processing of simple checks (making external connections, etc). All simple check accepts two optional parameters: ip -IP address. Dafult value is 127.0.0.1 port -Port number. If missing, standard default service port is used. Examples of using simple checks:

ZABBIX Manual v1.6 ftp,127.0.0.1,155http,11.22.33.44http_perf,11.22.33.44,8080

List of supported simple checks:

Key Description Return value
icmpping Checks if server is accessible by ICMP ping 0 – ICMP ping fails 1 – ICMP ping successful
icmppingsec Return ICMP ping response time Number of seconds
ftp,<ip>,<port> Checks if FTP 0 – FTP server is down
server is running and 1 – FTP server is running
accepting connections 2 – timeout
http,<ip>,<port> Checks if HTTP 0 – HTTP server is down
server is running and 1 – HTTP server is running
accepting connections 2 – timeout
imap,<ip>,<port> Checks if IMAP 0 – IMAP server is down
server is running and 1 – IMAP server is running
accepting connections 2 – timeout
nntp,<ip>,<port> Checks if NNTP 0 – NNTP server is down
server is running and 1 – NNTP server is running
accepting connections 2 – timeout
pop,<ip>,<port> Checks if POP 0 – POP server is down
server is running and 1 – POP server is running
accepting connections 2 – timeout
smtp,<ip>,<port> Checks if SMTP 0 – SMTP server is down
server is running and 1 – SMTP server is running
accepting connections 2 – timeout
ssh,<ip>,<port> Checks if SSH 0 – SSH server is down
server is running and 1 – SSH server is running
accepting connections 2 – timeout

Return value

Checks if TCP

0 – TCP service is down service is

tcp,<ip>,<port>