Google Cloud alerting condition on missing infrequent event

Viewed 343

I'm trying to create an alert condition where if an infrequent event (e.g. cron job running once a week) does not occur, it will trigger.

The metric is log-based. I've had success with smaller windows by using the alignment period, but there is a limitation where the alignment period can not be longer than 1 day.

Alignment periods longer than 86400 seconds are not supported.

(Not working) sample of what I'm trying to do:

- conditionThreshold:
    aggregations:
    - alignmentPeriod: 604800s # 1 week NOT possible
      perSeriesAligner: ALIGN_SUM
    comparison: COMPARISON_LT
    thresholdValue: 1.0
    duration: 0s
    filter: metric.type="logging.googleapis.com/user/my_infrequent_event_count"
    trigger:
      count: 1
  displayName: Infrequent event did not occur

Any idea on how this is possible?

1 Answers
Related