This tutorial provides step-by-step instructions how to setup monitoring of log files. It is assumed that a host is configured already in Zabbix frontend.
Configure Zabbix agent.
Follow standard instructions in order to install and configure agent on monitored host. Make sure that parameter Hostname matches host name of the host configured in Zabbix frontend.
Also make sure that parameter DisableActive is not set in zabbix_agentd.conf
Add a new item for monitoring of a log file.
Pay attention to the following parameters of the item:
|Type||Must be set to 'Zabbix agent (active)'.|
|Key||Must be set to 'log[file<,regexp>]'. For example: log[/var/log/syslog], log[/var/log/syslog,error]. Make sure that the file has read permissions for user 'zabbix' otherwise the item status will be set to 'unsupported'. Zabbix agent will filter entries of log file by the regexp if present.|
|Type of information||Must be set to 'log'.|
|Update interval (in sec)||The parameter defines how often Zabbix agent will check for any changes in the log file. Normally must be set to 1 second in order to get new records as soon as possible.|