Zabbbix can also be used for centralized monitoring and analysis of log files that support/do not support rollover. such as System log/var/log/message/var/log/secure and so on. When a log file contains a specific character or character pattern, Zabbix sends an alarm message to the user.
1. Select the Configuration-templates-template OS Linux template, or customize the template you are using, select Item-create item
650) this.width=650; "src=" http://www.linuxidc.com/upload/2014_06/140627202344962.jpg "width=" 581 "vspace=" 5 "style = "border:0px;"/>
There are several places to confirm:
Type: A top to select Zabbix Agent Active # #中文就是主动模式
key:log[file name format: Log file path,,,,]
As an example:
Log[/var/log/secure] etc.
Click Save after the configuration is complete. If the configuration is correct, you can see that the status is Enable.
Then you can see the log data in the Monitoring-lastdata.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/A6/wKioL1YlpVmSEUj-AAJdrhJETnM712.jpg "title=" 1.png " alt= "Wkiol1ylpvmseuj-aajdrhjetnm712.jpg"/>
Finally you can see the log
Of course, if you have other needs, you can add additional logging options.
Log monitoring is added here to complete, then how to set the alarm, and then look down
2, first find the item you just added, you will find a text-like symbol in front of it, click on the appearance of CREATE trigger
650) this.width=650; "src=" Http://www.linuxidc.com/upload/2014_06/14062720244956.png "alt=" Zabbix2.2 monitoring System and Application log monitoring alarm "width=" 581 "vspace=" 5 "style=" border:0px "/>
650) this.width=650; "src=" Http://www.linuxidc.com/upload/2014_06/14062720245265.png "alt=" Zabbix2.2 monitoring System and Application log monitoring alarm "style=" border:0px; "/>
Configure alarm options to suit your needs
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/AA/wKiom1YlphCQPP0TAAJtM-z2Bmo755.jpg "title=" 2.png " alt= "Wkiom1ylphcqpp0taajtm-z2bmo755.jpg"/>
When a specific character or character pattern appears in the log, Zabbix sends an alarm message to the user.
Zabbix monitoring System and application log monitoring alarm