Ad Widget

Collapse

special monitoring of logfiles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pinguin123
    Member
    • Apr 2015
    • 52

    #1

    special monitoring of logfiles

    Hi,

    is there a possibility to get a trigger when a certain line or a certain message in a logfile occurs (not when a logfile was created)? If yes, is there a good tutorial?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    Yes there is such possibility.
    This would be one example of such trigger:
    Code:
    {Template_name:log[/path/to/the/log].str("line or message you are looking for)}=1 and {Template_name:log[/path/to/the/log].nodata(600)}=0
    In the first part of the trigger Zabbix checks for the message pattern you provided in .str function.
    The second part is (starting from "and") clears the trigger automatically after specified time (600 seconds in example) if no new matching lines are added to the log. It is useful because there is no other way how to nicely set the trigger back to OK state after the message pattern has been found.

    This is only a simple example. For more advanced data collection you can search for your patterns already in the log item key. Check the documentation how to do that.


    Best Regards,
    Ingus

    Comment

    Working...