Skip to content

Commit

Permalink
Add aggregation to example alerting policy
Browse files Browse the repository at this point in the history
To aggregate away opencensus_task.
  • Loading branch information
knyar committed Jul 12, 2019
1 parent 05550cd commit 0707c57
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion examples/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ combiner: OR
conditions:
- conditionThreshold:
comparison: COMPARISON_GT
duration: 0s
duration: 300s
filter: metric.type="custom.googleapis.com/opencensus/ts_bridge/oldest_metric_age"
AND resource.type="global"
aggregations:
- alignmentPeriod: 60s
perSeriesAligner: ALIGN_MAX
crossSeriesReducer: REDUCE_MAX
groupByFields: ["resource.label.project_id"]
thresholdValue: 1800000.0
trigger:
count: 1
Expand All @@ -14,6 +19,11 @@ conditions:
duration: 1800s
filter: metric.type="custom.googleapis.com/opencensus/ts_bridge/oldest_metric_age"
AND resource.type="global"
aggregations:
- alignmentPeriod: 60s
perSeriesAligner: ALIGN_MAX
crossSeriesReducer: REDUCE_MAX
groupByFields: ["resource.label.project_id"]
trigger:
count: 1
displayName: No metrics reported by ts-bridge for 30 minutes.
Expand Down

0 comments on commit 0707c57

Please sign in to comment.