DX Unified Infrastructure Management

  • 1.  logmon Probe: howto for a rated QoS/metric

    Posted Feb 01, 2018 05:22 AM

    I need a rated QoS in a logmon Probe. In logmon words I need counted matches of a word/regex per second - in real I get a sawtooth cycle showing the growth until a max I never defined - very useless result. The concrete usecase is to monitor Connecions/s based on a SAPRouter logfile. How does it work with the logmon probe?



  • 2.  Re: logmon Probe: howto for a rated QoS/metric

    Broadcom Employee
    Posted Feb 06, 2018 04:46 PM

    Logmon will not provide #/second for you.

    When logmon runs it will scan through the file since the last save point and count the matches found.

    you can set the check interval but I would not suggest setting for every 1 second the minimum I would suggest would be every 2 minutes

    make sure mode is update



  • 3.  Re: logmon Probe: howto for a rated QoS/metric

    Posted Feb 07, 2018 08:30 AM

    I think that there's opportunity here for some new function - either in logmon or as an additional piece of processing similar to the Time to Threshold QoS. Regardless the logmon probe poses some issues with getting a #/time measure in that it is really designed to be run relatively infrequently and in a batch mode. So presumably it would be easy to create something that did a count per logmon cycle but the measure would be based on that period and subject to all those things that affect it.

     

    Consider the simple case of startup - what does logmon do the first time it touches the log file you are counting out of - do you count all since the last time logmon was stopped? Do you create a way to mark the file into chunks of time - similar to a format block but instead of the format identifying a line, the format identifies the time period to count? But then that gets into a big mess about the many ways log files get time stamps (or don't get them).

     

    Were I in your shoes, I'd script this - you could still use logmon to execute the script and capture the number, but put all your counting and averaging logic in a script you supply. Something like:

     

    if curr line file not exist

       echo 0 > cur_line file

       echo 0 (for logmon to read)

    else

        read creation date of curr line file

       period = now - creation date

       read x = contents of curr line file

       count = result of tail +x log.file | grep -c "pattern" > /dev/null 2>&1

       wc -l log.file > curr line file

       echo count/period

     

    This has some really obvious issues - especially if lines go into your file rapidly. But if you are just looking for something rough and +/- 1 or 2 in the result doesn't matter (or execution cost) this is the approach I'd take.