Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Fixed misleading Metric Log Filters code example #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slangeder
Copy link

Changed statistic from "Minimum" to "Sum" so that the alarm is triggered as explained when the log contains a line with the pattern "exception Bar".

Changed statistic from "Minimum" to "Sum" so that the alarm is triggered as explained when the log contains a line with the pattern "exception Bar".
@@ -277,7 +277,7 @@ custom:
barExceptions:
metric: barExceptions
threshold: 0
statistic: Minimum
statistic: Sum

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that Minimum is an incorrect statistic to use here, but i would argue that Maximum is more appropriate by definition:
Maximum is the highest value observed during the specified period.

So if we want to trigger an alert when there are more pattern matches than a given threshold, we need to look at the Maximum number of matches observed during the specified period.

Its counter-intuitive, but thats what i arrived at by trial and error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants