DX Unified Infrastructure Management

  • 1.  Nimsoft logmon match expression query

    Posted Nov 15, 2016 10:30 AM

    Hey there,

    I have question regarding nimsoft logmon probe pattern match (matching expression)

     

    basically I need to capture ERROR in log file but not when following happens

     

    bla bla bla ERROR bla.xyz bla bla bla

    or

    bla bla bla ERROR bla abc bla bla bla

     

    Note : bla = anything

     

    So my patter matching works for individual cases

     

    i.e.  /.*ERROR.*\.(?!xyz).*/ 


    /.*ERROR.*(?!abc).*/

     

    however /.*ERROR.*\.(?!xyz).*/ |/.*ERROR.*(?!abc).*/ do nto work.

    How do OR '|' work in nimsoft logmon pattern matching?

     

    many thanks

    Sumit



  • 2.  Re: Nimsoft logmon match expression query

    Posted Nov 16, 2016 09:43 AM

    Have you tried using regexpal.com? It's very useful for picking apart regex. 

     

    The thing to keep in mind with patterns is that they match the longest part of the string.

    So if you have the string ababababa and match it with /.*/ the result is ababababa. If your pattern is /.*b/ it will match abababab. Most people I run into would have answered that as ab instead.

     

    When it runs into a conflict in the pattern, it backs up one step and uses the next shortest matching string and starts working through the pattern again.

     

    -Garin.



  • 3.  Re: Nimsoft logmon match expression query