Ad Widget

Collapse

Reading contents of a Log File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Umair
    Member
    • Feb 2007
    • 86

    #1

    Reading contents of a Log File

    Hello,
    Is it possible to perform intelligent search on the text in Log Files during monitoring them?

    I have been using
    vfs.file.regmatch[file,<regexp>]
    to perform the searching.

    But this search is not intelligent and returns the first line encountered(if matched) from the whole file.

    I need to do two things :

    1). Check if the String is found or not
    2). Return some String instead of the 1 or 0.
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    Answer / suggestion for improvement

    Hi,

    IMHO, you discovered another weak point in ZABBIX.

    You are right, this type of check just returns TRUE or FALSE,
    depending whether the strings was found in the complete file
    or not.
    Your result corresponds to my tests of earlier (beta) versions 1.3.x

    You should use the "log[file]" for that.
    However, this gives other problems, as you mentioned in a later post.

    I suggest implementing something like
    "logmatch[file,regexp]" where regexp contains all patterns
    of interest and returns the line containing exactly those patterns.

    In this way you can build very interesting pattern matching rules
    in ZABBIX (using the triggers).
    We use one of the "big four" in event management in a way the
    manufacturer never advertised but it saves a lot of load on CPU (server),
    DB (server) and network.

    I am not sure whether integrating logsurfer - which can do all of the above -
    will work or is easy.

    Regards,

    Norbert.

    Comment

    • Antras
      Junior Member
      • Oct 2007
      • 12

      #3
      Originally posted by Umair
      Hello,
      Is it possible to perform intelligent search on the text in Log Files during monitoring them?

      I have been using
      vfs.file.regmatch[file,<regexp>]
      to perform the searching.

      But this search is not intelligent and returns the first line encountered(if matched) from the whole file.

      I need to do two things :

      1). Check if the String is found or not
      2). Return some String instead of the 1 or 0.
      Did you found decision?

      Comment

      Working...