Ad Widget

Collapse

checking for strings in log files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • voixd
    Junior Member
    • Sep 2008
    • 1

    #1

    checking for strings in log files

    Hello --

    I'd like to use zabbix to check for the string 'ERROR' in an application log file and then send an alert if it finds the string. In addition, I'd like the alert email that it sends to contain the error line *and the next ten lines*.

    Any suggestions how to accomplish this?

    Thanks!
  • sanlee
    Junior Member
    • Oct 2008
    • 9

    #2
    Let your log location be A
    Let your machine name be B

    Add the following item for your monitored machine (called Host)

    key: log[A,^.*Error.*$]
    type: active check
    type of information: log


    Add the following trigger

    {B:log[A,^.*Error.*$].str(^.*$)}=0

    Let your trigger's description be C

    Add following action
    Action condition: Trigger description like C
    Action Operation: Send message to a user

    Make sure you have the email address of the intended recipients configured in "Administration"->User

    Comment

    • sanlee
      Junior Member
      • Oct 2008
      • 9

      #3
      Oops, and you need to have your mail server configured in Administraton->Media

      Comment

      Working...