Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples section to docs #220

Merged
merged 6 commits into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions website/datadog.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@
</li>
</ul>
</li>

<li<%= sidebar_current("docs-datadog-examples") %>>
<a href="#">Examples</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-datadog-monitor-examples") %>>
<a href="/docs/providers/datadog/r/examples/monitors.html">monitors</a>
</li>
</ul>
</li>


</ul>
</div>
<% end %>
Expand Down
29 changes: 29 additions & 0 deletions website/docs/r/examples/monitors.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: "datadog"
page_title: "Datadog: monitor_examples"
sidebar_current: "docs-datadog-monitor-examples"
description: |-
Provides examples for the different types of Datadog monitors. This list isn't exhaustive but serves as a reference for some examples.
---

## Watchdog Monitors

```
resource "datadog_monitor" "Watchdog_Monitor" {
name = "Watchdog Monitor TF"
type = "event alert"
message = "Check out this Watchdog Service Monitor"
escalation_message = "Escalation message"

query = "events('priority:all sources:watchdog tags:story_type:service,env:test_env,service:test_service:_aggregate').by('service,resource_name').rollup('count').last('30m') > 0"

notify_no_data = false
renotify_interval = 60

notify_audit = false
timeout_h = 60
include_tags = true

tags = ["foo:bar", "baz"]
}
```