Skip to content

Commit 50fdaa1

Browse files
authored
feat: add lambda monitors to datadog-monitor (#686)
1 parent 4b8d96f commit 50fdaa1

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# The official Datadog API documentation with available query parameters & alert types:
2+
# https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor
3+
4+
datadog-lambda-forwarder-config-modification:
5+
name: "(Lambda) ${ stage } - Datadog Lambda Forwarder Config Changed"
6+
type: event-v2 alert
7+
query: |
8+
events("source:amazon_lambda functionname:${tenant}-${environment}-${ stage }-datadog-lambda-forwarder-logs").rollup("count").last("15m") >= 1
9+
message: |
10+
Configuration has been changed for the datadog lambda forwarder in
11+
({{tenant.name}}-{{environment.name}}-{{stage.name}})
12+
by {{ event.tags.username }}.
13+
Event title: {{ event.title }}
14+
Lambda function name: {{ event.tags.functionname }}
15+
Event ID: {{ event.id }}
16+
17+
escalation_message: ""
18+
tags:
19+
managed-by: Terraform
20+
notify_no_data: false
21+
notify_audit: true
22+
require_full_window: true
23+
enable_logs_sample: false
24+
force_delete: true
25+
include_tags: true
26+
locked: false
27+
renotify_interval: 60
28+
timeout_h: 1
29+
evaluation_delay: 60
30+
new_host_delay: 300
31+
no_data_timeframe: 10
32+
threshold_windows: { }
33+
thresholds:
34+
critical: 1
35+
#warning:
36+
#unknown:
37+
#ok:
38+
#critical_recovery:
39+
#warning_recovery:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# The official Datadog API documentation with available query parameters & alert types:
2+
# https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor
3+
4+
lambda-errors:
5+
name: AWS Lambda [{{functionname.name}}] has errors
6+
type: query alert
7+
query: sum(last_5m):sum:aws.lambda.errors{*} by {stage,tenant,environment,functionname}.as_count() > 0
8+
message: |
9+
Lambda {{functionname.name}} in
10+
({{tenant.name}}-{{environment.name}}-{{stage.name}})
11+
has {{value}} errors over the last 5 minutes.
12+
tags: []
13+
threshold_windows: { }
14+
thresholds:
15+
critical: 0
16+
notify_audit: false
17+
require_full_window: false
18+
notify_no_data: false
19+
renotify_interval: 0
20+
include_tags: true
21+
evaluation_delay: 900
22+
new_group_delay: 60

0 commit comments

Comments
 (0)