ZABBIX 2.4 – 3 Agent

Please Like Us!!!

3 Agent

Overview

Zabbix agent is deployed on a monitoring target to actively monitor local resources and applications (hard drives, memory, processor statistics etc).

The agent gathers operational information locally and reports data to Zabbix server for further processing. In case of failures (such as a hard disk running full or a crashed service process), Zabbix server can actively alert the administrators of the particular machine that reported the failure.

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

Passive and active checks

Zabbix agents can perform passive and active checks.

In a passive check the agent responds to a data request. Zabbix server (or proxy) asks for data, for example, CPU load, and Zabbix agent sends back the result.

Active checks require more complex processing. The agent must first retrieve a list of items from Zabbix server for independent processing. Then it will periodically send new values to the server.

Whether to perform passive or active checks is configured by selecting the respective monitoring item type. Zabbix agent processes items of type 'Zabbix agent' or 'Zabbix agent (active)'.

Supported platforms

Zabbix agent is supported for:

  • Linux
  • IBM AIX
  • FreeBSD
  • NetBSD
  • OpenBSD
  • HP-UX
  • Mac OS X
  • Solaris: 9, 10, 11
  • Windows: 2000, Server 2003, XP, Vista, Server 2008, 7
Installation

See installation instructions for Zabbix agent.

In general, 32bit Zabbix agents will work on 64bit systems, but may fail in some cases.

Agent process for UNIX (standalone daemon)

Zabbix agent is run on the host being monitored. Zabbix agent runs as a daemon process.

To start the agent, execute:

shell> cd sbin
shell> ./zabbix_agentd

The following command line parameters can be used with Zabbix agent:

  -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 known items and exit
  -t --test <item key> test specified item and exit

For example, to get this help, run:

shell> zabbix_agentd -h

Other examples 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]"
Process user

Zabbix agent is designed to run as a non-root user. It will run as whatever non-root user it is started as. So you can run agent as any non-root user without any issues.

If you will try to run it as 'root', it will switch to a hardcoded 'zabbix' user, which must be present on your system. You can only run agent as 'root' if you modify the 'AllowRoot' parameter in the agent configuration file accordingly.

Configuration file

See the configuration file options for details on configuring zabbix_agentd.

Running agent for Windows

See Zabbix Windows agent installation for the installation information.

To start the agent service you can use Control Panel or run:

zabbix_agentd.exe --start

Command line syntax:

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

The following command line parameters can be used with Zabbix Windows agent.

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 known items and exit.
  -t --test <item key> Test single item 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.
Configuration file

See the configuration file options for details on configuring Zabbix Windows agent.

Exit code

Before version 2.2 Zabbix agent returned 0 in case of successful exit and 255 in case of failure. Starting from version 2.2 and higher Zabbix agent returns 0 in case of successful exit and 1 in case of failure.

Data source: Zabbix

Reviews & Comments

Enjoy!