-
Notifications
You must be signed in to change notification settings - Fork 1
/
alerts.yml
181 lines (166 loc) · 7.06 KB
/
alerts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
groups:
- name: aggregations
rules:
- record: googleads:ad_groups:ad_count
expr: count without(ad_id) (googleads_mapping_info)
- record: googleads:campaigns:ad_count
expr: count without(ad_group_id, ad_group_name, ad_id) (googleads_mapping_info)
- record: googleads:accounts:ad_count
expr: |
count without(
campaign_name, campaign_id, campaign_type, campaign_sub_type,
bidding_strategy_type, ad_group_id, ad_group_name, ad_id)
(googleads_mapping_info)
- record: googleads:campaigns:ad_group_count
expr: |
count without(ad_group_id, ad_group_name)
(googleads:ad_groups:ad_count)
- record: googleads:account:campaign_count
expr: |
count without(
campaign_name, campaign_id, campaign_type, campaign_sub_type,
bidding_strategy_type) (googleads:campaigns:ad_group_count)
- record: googleads:ads:new
expr: |
googleads_mapping_info * 0 + 1
unless
max_over_time(googleads_mapping_info[3h] offset 1h) * 0 + 1
- record: googleads:ad_groups:new
expr: |
max without (ad_id) (googleads:ads:new)
unless
max without (ad_id) (max_over_time(googleads:ads:new[3h] offset 30m) * 0 + 1)
- record: googleads:campaigns:new
expr: |
max without (ad_group_id, ad_group_name) (googleads:ad_groups:new)
unless
max without (ad_group_id, ad_group_name) (max_over_time(googleads:ad_groups:new[3h] offset 30m) * 0 + 1)
- record: googleads:ads:disabled
expr: |
max_over_time(googleads_mapping_info[3h] offset 1h) * 0 + 1
unless googleads_mapping_info * 0 + 1
- record: googleads:ad_groups:disabled
expr: |
max without (ad_id) (max_over_time(googleads:ads:disabled[3h] offset 30m) * 0 + 1)
unless
max without (ad_id) (googleads:ads:disabled)
- record: googleads:campaigns:disabled
expr: |
max without (ad_group_id, ad_group_name) (max_over_time(googleads:ad_groups:disabled[3h] offset 30m) * 0 + 1)
unless
max without (ad_group_id, ad_group_name) (googleads:ad_groups:disabled)
- name: groupings
rules:
- record: googleads:clicks
expr: |
googleads_clicks
* on (ad_group_id) group_left (account_name, campaign_name, ad_group_name)
googleads:ad_groups:ad_count
- record: googleads:impressions
expr: |
googleads_impressions
* on (ad_group_id) group_left (account_name, campaign_name, ad_group_name)
googleads:ad_groups:ad_count
- record: googleads:cost
expr: |
googleads_cost
* on (ad_group_id) group_left (account_name, campaign_name, ad_group_name)
googleads:ad_groups:ad_count
- record: googleads:conversions
expr: |
googleads_conversions
* on (ad_group_id) group_left (account_name, campaign_name, ad_group_name)
googleads:ad_groups:ad_count
- record: googleads:campaigns:budgets
expr: |
googleads_bid_budgets_budget
* on (campaign_id)
group_left (account_name, account_id, campaign_name, campaign_type, campaign_sub_type)
(googleads:campaigns:ad_group_count * 0 + 1)
- record: googleads:ads:disapprovals
expr: |
googleads_disapprovals_ad_count
* on (ad_group_id, ad_id) group_left (account_name, campaign_name, ad_group_name, campaign_type)
googleads_mapping_info
- name: googleads
rules:
- record: campaign_spend_threshold
expr: 200
- record: campaign_spend_increase_threshold
expr: 2.0
- record: search_term_clicks_threshold
expr: 200
- record: search_term_clicks_increase_threshold
expr: 2.0
- record: googleads:impressions:overall
expr: sum(googleads_impressions)
- record: googleads:conversions:overall
expr: sum(googleads_conversions)
- record: googleads:impressions:account
expr: sum by(customer_id) (googleads_impressions)
- record: googleads:conversions:account
expr: sum by(customer_id) (googleads_conversions)
- record: googleads:all_conversions:account_conversionid
expr: sum by(customer_id, conversion_id) (googleads_conversion_action_all_conversions)
- alert: NoConversionsForConversionId
expr: deriv(googleads:all_conversions:account_conversionid[30m]) == 0
for: 1h
labels:
severity: crucial
- alert: NoAdsImpressions
expr: deriv(googleads:impressions:overall[30m]) == 0
for: 30m
labels:
severity: crucial
annotations:
summary: No Ads Impressions for the last 30 minutes
- alert: NoAdsConversions
expr: deriv(googleads:conversions:overall[30m]) == 0
for: 1h
labels:
severity: crucial
annotations:
summary: No Ads Conversions for the last hour
- alert: IncreaseGDNCostCampaign
expr: |
sum by(campaign_id) (googleads_cost{network="CONTENT"}) / sum by(campaign_id) (googleads_cost{network="CONTENT"} offset 30m) > on() group_left() (campaign_spend_increase_threshold)
and (sum by(campaign_id) (googleads_cost) > on() group_left() (campaign_spend_threshold))
for: 1h
labels:
severity: high
team: display
- alert: IncreaseSearchCostCampaign
expr: |
sum by(campaign_id) (googleads_cost{network="SEARCH"}) / sum by(campaign_id) (googleads_cost{network="SEARCH"} offset 30m) > on() group_left() (campaign_spend_increase_threshold)
and (sum by(campaign_id) (googleads_cost) > on() group_left() (campaign_spend_threshold))
for: 1h
labels:
severity: high
team: search
- alert: AdsNotReviewedForMoreThanOneDay
expr: googleads_approvals_ad_count{review_status!="REVIEWED"} and on() hour() >= 3 <=15
for: 1d
labels:
severity: medium
domain: approvals
annotations:
summary: Some ads haven't been reviewed for more than 24 hours
description: >
Campaigns with unreviewed ads: {{ range query "googleads_approvals_ad_count{review_status!='REVIEWED'}" }}
{{ .Labels.campaign_id }}
{{ end }}
- alert: RecentlyDisapprovedAds
expr: |
googleads_approvals_ad_count{approval_status="DISAPPROVED"}
and (googleads_approvals_ad_count{approval_status="APPROVED"} offset 1d)
and on() hour() >= 3 <=15
for: 1h
labels:
severity: medium
domain: approvals
annotations:
summary: Some of approved ads haven't been recently disapproved
description: >
Campaigns with disapproved ads: {{ range query "googleads_approvals_ad_count{approval_status='DISAPPROVED'} and (googleads_approvals_ad_count{approval_status='APPROVED'} offset 1d)" }}
{{ .Labels.campaign_id }}
{{ end }}