Friday, September 11, 2020

Log file Monitoring in Zabbix

 Description: Zabbix can be used for centralized monitoring and analyzed of log files with/without log rotation support.

To monitor log file you must have:

  • Zabbix agent running on the host 
  • log monitoring item setup
Procedure: 
  • The first step is to configure zabbix agent in client machine and configure below things


Hostname=WindowsWeb1         ==================[Name defined in zabbix console as hostname]
LogFile=/tmp/zabbix_agentd.log ================[Log file of zabbix agent]
Server=127.0.0.1, 192.168.10.10 ===============[DNS name or IP Address of Zabbix Server]
ServerActive=192.168.10.10 ====================[DNS name or IP address of Zabbix Server]
Timeout=10 ====================================[Timeout need to set more than 5]
  • Need to restart zabbix-agent service 
  • Now we need to configure log application and item in Zabbix console 
  • Login to zabbix console http://192.168.10.10/zabbix
  • Navigate to Configuration ---Hosts and select your host [In example WindowsWeb1] then create one Application Named LOG
  • Once you add Application navigate to items and create log item under LOG application 
On the Item creation screen, you need to configure the following items:
• Name: Enter an identification to the Windows log file.
• Type: Zabbix Agent (Active)
• Key: log[E:\Log\Application.log,,,,skip]
• Type of Information: Log
• Update interval: 1 Second
• Application: LOG
  • Once you add item restart zabbix- agent from client machine and wait for 5 minutes to update file and reflect it.
  • To verify it Navigate to Monitoring Tab --- Latest data ---- under server name use WindowWeb1 and verify log file
  • You can also filter expression and other options in Log files like expression, MaxLine, Output etc.. in Key 

No comments:

Post a Comment