DX Unified Infrastructure Management

  • 1.  logmon, exclude files

    Posted Sep 12, 2017 06:12 AM

    Is posibble to exclude files using wildcards in logmon filename?
    I need find messajes in *.log files but I need to exclude _*.log files



  • 2.  Re: logmon, exclude files

    Broadcom Employee
    Posted Sep 12, 2017 09:25 AM

    Hi Pedro,

    Have you tried a regex pattern for the location of the log file?

    For example:

    /tmp/[a-z|0-9]*.log

    The above example will match any log with letters or numbers in the log file name (not the underscore).



  • 3.  Re: logmon, exclude files

    Posted Sep 12, 2017 09:35 AM

    Hi,

     

    yes, I have tried, but it does not work.

     

    Thanks



  • 4.  Re: logmon, exclude files

    Broadcom Employee
    Posted Sep 12, 2017 09:57 AM

    Please share a screenshot of the logmon cfg profile.  I tested the regex here and it works



  • 5.  Re: logmon, exclude files

    Posted Sep 12, 2017 10:03 AM

     



  • 6.  Re: logmon, exclude files

    Broadcom Employee
    Posted Sep 12, 2017 01:28 PM

    Hi Pedro,

    Please try this:

    /opt/nimsoft/probes/application/*/[a-z]\.log

    We need to escape the "."



  • 7.  Re: logmon, exclude files

    Posted Sep 13, 2017 09:23 AM

    Hello,

     

    I have tried the /opt/nimbus/probes/application/*/[a-z]\.log expression and it does not work. As you can see in the log file, continue analyzing files beginning with _

     

     

     

    Sep 13 13:46:39:929 [140396743091968] logmon: lgm: Read File
    Sep 13 13:46:39:929 [140396743091968] logmon: lgm: read returned null
    Sep 13 13:46:39:929 [140396743091968] logmon: lgm: p->format: 0 format: 0 mode 0x208
    Sep 13 13:46:39:929 [140396743091968] logmon: [Busqueda_Masiva_de_Mensajes] used 2 ms scanning 0 bytes
    Sep 13 13:46:39:929 [140396743091968] logmon: [Busqueda_Masiva_de_Mensajes] start scanning '/opt/nimbus/probes/application/estado_db2_di0a/estado_db2_di0a.log'
    Sep 13 13:46:39:932 [140396743091968] logmon: lgm: Read File
    Sep 13 13:46:39:932 [140396743091968] logmon: lgm: read returned null
    Sep 13 13:46:39:932 [140396743091968] logmon: lgm: p->format: 0 format: 0 mode 0x208
    Sep 13 13:46:39:932 [140396743091968] logmon: [Busqueda_Masiva_de_Mensajes] used 2 ms scanning 0 bytes
    Sep 13 13:46:39:932 [140396743091968] logmon: [Busqueda_Masiva_de_Mensajes] start scanning '/opt/nimbus/probes/application/estado_db2_di0a/_estado_db2_di0a.log'
    Sep 13 13:46:39:934 [140396743091968] logmon: lgm: Read File
    Sep 13 13:46:39:934 [140396743091968] logmon: lgm: read returned null
    Sep 13 13:46:39:934 [140396743091968] logmon: lgm: p->format: 0 format: 0 mode 0x208
    Sep 13 13:46:39:934 [140396743091968] logmon: [Busqueda_Masiva_de_Mensajes] used 2 ms scanning 0 bytes
    Sep 13 13:49:39:212 [140397649512224] logmon: _restart from 172.22.33.177/60898

     

     

    Thanks for all



  • 8.  Re: logmon, exclude files

    Broadcom Employee
    Posted Sep 13, 2017 04:53 PM

    I would suggest you open a support case.

    it looks like the logmon probe is not properly handling the regex in the file name as it should.