Ad Widget

Collapse

Filter text from Windows Event Viewer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wagnerjs83
    Junior Member
    • Nov 2018
    • 15

    #1

    Filter text from Windows Event Viewer

    Hi,


    Is it possible to collect selected text in log?

    Item: Log (Event Viewer Windows)

    Key: eventlog[System,,"Warning"]


    is it possible to filter log content?

    Ex:
    Name: System
    Level: Warning
    General: The Software Protection service has completed licensing status check.
    Filter: service has completed


    Thanks

  • sancho
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2015
    • 301

    #2
    Hello wagnerjs83,

    In the item -> preprocessing -> regular expression


    This website can help you with the regular expression
    Test, debug and visualize regex with live matches, railroad diagrams, explanations and AI assistance. Supports PCRE2, JavaScript, Python and more.

    Comment

    • wagnerjs83
      Junior Member
      • Nov 2018
      • 15

      #3
      Hi Sancho,

      How's the expression? regexp to string "service has completed"?

      Comment

      • sancho
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2015
        • 301

        #4
        Hi wagnerjs83,

        Sorry, I think I did not understand you, what do you need, a trigger that alerts you when the text "service has completed" appears?

        Comment

        • wagnerjs83
          Junior Member
          • Nov 2018
          • 15

          #5
          Hi,

          I need an item that filters a string

          Item: Log (Event Viewer Windows)

          Key: eventlog[System,,"Warning"]

          String "abcd 123 abcd"

          Comment

          • sancho
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2015
            • 301

            #6
            wagnerjs83,
            In the web that I indicated, https://regex101.com/ you can look for the regexp that you need.
            I'm not very good with the regexp but it would be worth something like this "service + [a-z \ s] + completed"

            But surely there are more simple ones.

            The regexp tb you can use it in the key instead of the preprocessing

            Comment

            Working...