Skip to content

Question: LogMonitoring with addMaxIncomingLogsAlarm and a Pattern #579

Open
@sndpl

Description

@sndpl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions