Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

Swatchdog::Threshold - Perl extension for thresholding in swatchdog(1)

Author

Description

         SWID is swatchdog's internal ID number for the watchfor block

         TYPE can be limit, threshold, or both

               Limit - Alert on the 1st COUNT events during the time interval,
                  then ignore events for the rest of the time interval.

               Threshold - Alert every COUNT times we see this event during the
                  time interval.

               Both
                  Alert once per time interval after seeing COUNT occurrences of the
                  event, then ignore any additional events during the time interval.

         SECONDS is the time interval

Name

         Swatchdog::Threshold - Perl extension for thresholding in swatchdog(1)

See Also

perl(1), swatchdog(1).

perl v5.36.0                                       2023-01-20                          Swatchdog::Threshold(3pm)

Swatch Syntax

         threshold track_by=<key>,
            type=<limit|threshold|both>,
            count=<int>,
            seconds=<int>

Synopsis

         use Swatchdog::Threshold;

         &Swatchdog::threshold(        SWID => <int>,
                               TYPE => <limit|threshold|both>,
                               TRACK_BY => <key>, # like an IP addr
                               COUNT => <int>,
                               SECONDS => <int>
                               );

See Also