Difference between revisions of "Terraform resource: datadog monitor"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <code>datadog_monitor</code> [https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/monitor doc] | ||
+ | [[no_data_timeframe]] | ||
+ | [[notification_preset_name]] | ||
+ | == Example == | ||
resource "datadog_monitor" "foo" { | resource "datadog_monitor" "foo" { | ||
name = "Name for monitor foo" | name = "Name for monitor foo" | ||
type = "metric alert" | type = "metric alert" | ||
message = "Monitor triggered. Notify: @hipchat-channel" | message = "Monitor triggered. Notify: @hipchat-channel" | ||
− | escalation_message = "Escalation message @pagerduty" | + | escalation_message = "Escalation message [[@pagerduty]]" |
− | + | ||
query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4" | query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4" | ||
− | + | ||
monitor_thresholds { | monitor_thresholds { | ||
warning = 2 | warning = 2 | ||
critical = 4 | critical = 4 | ||
} | } | ||
− | + | ||
include_tags = true | include_tags = true | ||
− | + | ||
tags = ["foo:bar", "team:fooBar"] | tags = ["foo:bar", "team:fooBar"] | ||
} | } | ||
+ | |||
+ | == Related == | ||
+ | * [[Terraform resource]]: <code>[[Terraform resource: datadog_monitor_json|datadog_monitor_json]]</code> | ||
== See also == | == See also == | ||
+ | * {{datadog_monitor_json}} | ||
* {{tf datadog}} | * {{tf datadog}} | ||
* {{Datadog monitor}} | * {{Datadog monitor}} | ||
[[Category:TF]] | [[Category:TF]] |
Latest revision as of 13:14, 22 October 2024
datadog_monitor
doc
no_data_timeframe notification_preset_name
Example[edit]
resource "datadog_monitor" "foo" { name = "Name for monitor foo" type = "metric alert" message = "Monitor triggered. Notify: @hipchat-channel" escalation_message = "Escalation message @pagerduty" query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4" monitor_thresholds { warning = 2 critical = 4 } include_tags = true tags = ["foo:bar", "team:fooBar"] }
Related[edit]
See also[edit]
datadog_monitor_json
:type
- Terraform datadog, provider,
datadog_user, datadog_monitor_json, datadog_logs_custom_pipeline, datadog_integration_aws, datadog_security_monitoring_rule, datadog_integration_slack_channel, datadog_dashboard_json, datadog_logs_index
- Datadog monitor:
Terraform resource: datadog_monitor
Advertising: