DX Unified Infrastructure Management

  • 1.  Logmon regexp

    Posted Aug 31, 2017 12:06 PM

    Hi

     

    Sorry but i'm in trouble with the regexp expression on logmon probe.

    I've test on all site that check regular expression and it work.

    But in logmon no way

    What i do wrong ?

     

    My test string :

    ARCHIVE_LINK_CONTENT 290815,891 116105 40 !ARCHIVE_LINK_CONTENT_SECURE 555008 351646 63 !ARCHIVE_LINK_INDEX 217087,984 187143 86

     

    I want to match only ARCHIVE_LINK_CONTENT 290815,891 116105 40

     

    I've try ^([^\!]+)

    but no result.

    Really i'm lost



  • 2.  Re: Logmon regexp

    Broadcom Employee
    Posted Aug 31, 2017 12:55 PM

    Is your test string on a single line in the log file?

    Your expressions matches almost everything.

    if you could attach your log file or more of it which what exactly you want to mach and do not want to match that would help.

    Do the numbers 290815,891 116105 40 change?

    are there always this many?

     

    Something like this might work

    /ARCHIVE_LINK_CONTENT[^!]*/

     

    Do not forget in logon when using regex must bracket it with //



  • 3.  Re: Logmon regexp

    Posted Aug 31, 2017 01:17 PM

    Did you put the /… / around your expression?  Like this:  /^(+)/

     

    Just starting with the little thing that gets me often!  ☺

     

    Chris



  • 4.  Re: Logmon regexp

    Posted Sep 01, 2017 03:58 AM

    Thaks for your help.

    But it doesn't work whith this try :

    /ARCHIVE_LINK_CONTENT[^!]*/

     

    I've try the both method, form file, and from a direct string.

    The number of my string don't change, no problem on this

     

    I can make an easy example if you want to help me :

     

    toto 1 2 3 4 ! tata 5 6 7 8 ! titi 1 9 3 !

     

    And i want to match only the first pather member :

     

    toto 1 2 3 4 !

     

    Is it more clearly ?

     

    One more time, thanks for your time and help



  • 5.  Re: Logmon regexp

    Broadcom Employee
    Posted Sep 01, 2017 10:26 AM

    HI so for the new example

    the below should work

    /toto[^!]*/

     

    This will look for toto then take everything up to the first ! it finds.

     

    if this does not seem to work you will probably need to engage support so they can look at your source log files and you can provide loglevel 5 logs and .cfg for them to review



  • 6.  Re: Logmon regexp

    Broadcom Employee
    Posted Sep 01, 2017 01:20 PM

    Your second example is different because the starting string is not repeated in the line like it is in the first sample string.  Have you tried the following regex to match your original sample string:

     

     

    /^ARCHIVE_LINK_CONTENT[^!]*/

     

    This assumes that there is no space or tab at the beginning of the line in the log file.  If there is then you would adjust the string to the following:

     

     

    /^[  ]*ARCHIVE_LINK_CONTENT[^!]*/

     

    The first set of square brackets would contain the space and tab characters.