Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: LogMonitoring with addMaxIncomingLogsAlarm and a Pattern #579

Open
sndpl opened this issue Oct 8, 2024 · 0 comments
Open

Question: LogMonitoring with addMaxIncomingLogsAlarm and a Pattern #579

sndpl opened this issue Oct 8, 2024 · 0 comments

Comments

@sndpl
Copy link

sndpl commented Oct 8, 2024

Hi,

since 22 march it's possible to add an addMaxIncomingLogsAlarm to the LogMonitoring (#504). But I was wondering, if you set a pattern like:

.monitorLog({
  logGroupName: ".....",
  pattern: "ERROR",
  addMaxIncomingLogsAlarm: {
	  Critical: {
		  maxCount: 5,
		  period: Duration.minutes(5),
		  treatMissingDataOverride: TreatMissingData.NOT_BREACHING,
		  actionOverride: new SnsAlarmActionStrategy({
			  onAlarmTopic: criticalTopic,
			  onOkTopic: criticalTopic,
		  }),
	  },
  },
});

It shows the log lines which contain the pattern (very nice), but it also shows the incoming logs on which it creates the alarm:

image

But those incoming logs are not filtered with the given pattern? Also the alarm is not using the pattern.

I would expect that it creates an alarm that count's the log lines with the pattern and if there are more then 5 in a period of 5 min it goes into the alarm state. So is it a bug or do I just not understand where this addMaxIncomingLogsAlarm feature is for? because It now just creates a sample count alarm that goes in alarm state if the lambda is called more then 5 times in 5 min.

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

No branches or pull requests

1 participant