Ad Widget

Collapse

Counting regex matches in log monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • p__
    Junior Member
    • Oct 2011
    • 7

    #1

    Counting regex matches in log monitoring

    Hi!

    I've added two functions for trigger expressions: mregexp and imregexp which work similarly to regexp and iregexp except instead of returning 0 or 1 they provide the number of times a log item matched a given regexp in given time.

    I find them useful for monitoring non-critical errors: a single timeout in the log is no big problem but if they start piling up in a short interval I know that something is misbehaving.

    Coded and tested on 1.8.5.
    Attached Files
Working...