Search code examples
monitoringzabbixlogfile

Display content of file in zabbix


I have zabbix server to monitor linux server, I am trying to read daily backup file and display all contents of file on zabbix, how can I do that.

I tried to do the following:

first item

TYPE: Zabbix_agent (Active) log[/var/opt/backup,]

second item

TYPE: Zabbix_agent (Active) vfs.file.contents[/var/opt/backup]

but there is no data retrieved, and should I do anything in trigger...


Solution

    1. Make sure that the EnableRemoteCommands parameter is set to 1 and uncommented in the respective zabbix_agentd.conf. Note: Remote commands do not work with active Zabbix agents.
    2. Create an item with that key: system.run[cat /var/opt/backup]. Don't forget to choose the appropriate "Type of information" when creating the item.