0

I want to create a Stackdriver alert that trips when a certain logging metric occurs less than 20 times in the previous 30 minutes. I don't really need history over long periods of time for graphs or anything, i.e., I don't want to store data for a long time. I just want the alert over the prior 30 minutes.

I've created the logging metric, but need help configuring the Stackdriver Alerting condition. I'm not sure what to see for Group By, Aggregation, etc.

6
  • 1
    You can use aggregation of different time series together. cloud.google.com/monitoring/api/v3/… GCP’s logging supports aggregation of time series using the project timeseries api. cloud.google.com/monitoring/api/v3/metrics If you have already considered this, is there a reason why it won’t work for you? Commented Feb 19, 2019 at 17:58
  • @AshikMahbub Thanks for the reply. As far as I understand, it's one time series to start with. Please correct me if I'm wrong. I ended up doing Aligner:sum, Reducer:sum, Alignment Period:30 minutes, and trigger if below 20 for most recent value. It seems to work. Commented Feb 19, 2019 at 19:06
  • 1
    I’m glad your report seems to be logging the activity you are trying to track. The Google Doc does recommend summing the time series together. This page gives a bit more context for those who may also be playing with these filters in the UI. (cloud.google.com/monitoring/alerts/…) Commented Feb 20, 2019 at 14:06
  • Thanks @AshikMahbub! Commented Feb 20, 2019 at 14:11
  • No problem! You did all the hard work. Would you mind posting your fix as an answer so the whole community can benefit? Commented Feb 20, 2019 at 17:01

1 Answer 1

1

I'm not sure if this is the best answer, but I ended up doing Aligner:sum, Reducer:sum, Alignment Period:30 minutes, and trigger if below 20 for most recent value. It seems to work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.