Description of Zabbix agent configuration

In this article I will describe the possible parameters of the configuration file of the Zabbix agent.
The symbol “#” means that the parameter is commented out and is the default, that is,
you can not specify it.

Path to store pid file:

PidFile=/var/run/zabbix/zabbix_agentd.pid

Where to save logs (system – in syslog, file – to file, console – normal output):

LogType=file

Log file path:

LogFile=/var/log/zabbix/zabbix_agentd.log

Maximum size of the log file in megabytes (0-1024, 0 – no limit):

LogFileSize=1

Logging level (0 – basic, 1 – critical messages, 2 – errors, 3 – warnings, 4 – for debugging, 5 – maximum for debugging):

DebugLevel=3

Local IP address for outgoing connections:

#SourceIP=

Are remote commands allowed from Zabbix server (1 – allowed, 0 – not allowed):

#EnableRemoteCommands=0

Whether to write shell commands to the log (1 – yes, 0 – no):

#LogRemoteCommands=0

Zabbix server address (you can specify several hosts or IP addresses separated by spaces, incoming connections will only be accepted from them):

Server=127.0.0.1

The port on which the Zabbix agent will be run (1024-32767):

#ListenPort=10050

A comma-separated list of IP addresses that the agent should listen on, the first IP address is sent to the Zabbix server when connected to it to get a list of active checks (by default 0.0.0.0 – all):

#ListenIP=0.0.0.0

The number of pre-forks of Zabbix agent instances that will process passive checks, if you specify 0, no checks will be performed and Zabbix agent will not listen to the TCP port (default 3):

#StartAgents=3

Zabbix server address:

ServerActive=127.0.0.1

The host name must necessarily coincide with the name “Host Name” specified on the Zabbix server (I usually specify the IP address of the Zabbix agent):

Hostname=TEXT

Host metadata (0-255 characters, UTF-8):

#HostMetadata=

Update frequency of the list of active checks (in seconds from 60 to 3600):

#RefreshActiveChecks=120

Do not store data in the buffer longer than the specified number of seconds (the possible range is 1-3600):

#BufferSend=5

Buffer size, data is sent after filling the buffer (2-65535):

#BufferSize=100

Number of processed lines when checking log files (1-1000):

#MaxLinesPerSecond=20

Maximum time in seconds to process (1-30):

#Timeout=3

Start Zabbix agent as root user:

AllowRoot=1

Specifying the user under which the zabbix agent will be launched, by default “zabbix” if not enabled “AllowRoot” (not for Windows systems):

#User=zabbix

Load also all configuration files from the specified directory:

Include=/etc/zabbix/zabbix_agentd.d/*.conf

User parameter for monitoring (where “key” is, for example, the key that is indicated in the data item on the server, and command is the command that should be executed in the system, on the second line I will give an example of viewing active connections to the server):

UserParameter=key,command
UserParameter=active_connections,netstat -an | wc -l

See also my articles:
Zabbix installation on Ubuntu from distribution packages
Examples of Items for Zabbix
Others in the Zabbix category

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a comment

Leave a Reply