Skip to content

Commit daeffb6

Browse files
author
Arthur Wang
committed
Add Guide to Templating
1 parent eaffda7 commit daeffb6

File tree

8 files changed

+57
-19
lines changed

8 files changed

+57
-19
lines changed

content/guides/alerting.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- text: Alert conditions
1313
href: "#conditions"
1414
- text: No-data alerts
15-
href: "#nodata"
15+
href: "#nodata"
1616
- text: Autoresolving alerts
1717
href: "#autoresolve"
1818
- text: Notifying
@@ -27,12 +27,12 @@
2727
the ability to know when critical changes are occurring.
2828
Alerts within Datadog notify you when a metric crosses a threshold; they're flexible,
2929
appear in the event stream, and can be delivered to team members of your choice via email,
30-
Hipchat room, or whomever is 'oncall' in Pagerduty.
30+
Hipchat room, or whoever is 'oncall' in Pagerduty.
3131
To set up an alert, go to the 'Metrics' tab and select 'Manage Alerts'.</p>
3232

3333
<img src="/static/images/alert_1.png" style="width:100%; border:1px solid #777777"/>
3434

35-
<p>Two subtabs will appear, 'Triggered Alerts' and 'Manage Metric Alerts'.
35+
<p>Two subtabs will appear, 'Triggered Alerts' and 'Manage Metric Alerts'.
3636
'Triggered Alerts' are all alerts currently firing. Select 'Manage Metric Alerts' to
3737
create a new alert.</p>
3838

@@ -43,11 +43,11 @@ <h3 id="new">Creating a new alert</h3>
4343

4444
<p>There are 5 steps to creating an alert</p>
4545
<ol>
46-
<li>Choose the average, minimum, maximum, or sum of a metric over specific hosts,
46+
<li>Choose the average, minimum, maximum, or sum of a metric over specific hosts,
4747
tags, regions, devices, etc.</li>
48-
<li>Choose a simple or multi alert; <a href="#simple">multi-alerts</a> are flexible
48+
<li>Choose a simple or multi alert; <a href="#simple">multi-alerts</a> are flexible
4949
and can be across host, device, role, etc.</li>
50-
<li>Set the alert conditions; if the metric was above or below a threshold value on average,
50+
<li>Set the alert conditions; if the metric was above or below a threshold value on average,
5151
at least once, or at all times during a time span and to be alerted if the metric
5252
is receiving no data.</li>
5353
<li>Say what's happening in the alert and @ notify team members.</li>
@@ -76,7 +76,7 @@ <h4 id="simple">Simple and Multi Alerts</h4>
7676
This works best to monitor a metric from a single host, like avg of system.cpu.iowait
7777
over host:bits, or for an aggregate metric across many hosts, like
7878
sum of nginx.bytes.net over region:us-east.</p>
79-
79+
8080
<p>A multi alert applies the alert to each source, according to your group parameters.
8181
E.g. to alert on disk space you might group by host and device, creating the
8282
query: avg of system.disk.in_use over * by host,device. This will trigger a separate
@@ -86,9 +86,9 @@ <h4 id="simple">Simple and Multi Alerts</h4>
8686
<h4 id="conditions">Alert conditions</h4>
8787
<img src="/static/images/alert_5_1.png" style="width:100%; border:1px solid #777777"/>
8888

89-
<p>When setting the alert conditions, ensure that the threshold value you use correctly
90-
matches the unit that are showing in the graph (for example, bytes vs GB). The
91-
'on average' option updates each minute to include the most recent time and dropoff
89+
<p>When setting the alert conditions, ensure that the threshold value you use correctly
90+
matches the unit that are showing in the graph (for example, bytes vs GB). The
91+
'on average' option updates each minute to include the most recent time and dropoff
9292
what’s old (not a “moving average”, really a sliding timeframe). The options for
9393
the time frame are 5, 10, 15, 30, or 60 minutes.</p>
9494

@@ -109,8 +109,8 @@ <h4 id="nodata">No-data alerts</h4>
109109
alerted. We are working towards supporting this with Service Checks, a feature
110110
we hope to release in the near future.</p>
111111

112-
<h4 id="autoresolve">Autoresolving alerts</h4>
113-
<img src="/static/images/alert_auto.png" style="width:100%; border:1px solid #777777"/>
112+
<h4 id="autoresolve">Autoresolving alerts</h4>
113+
<img src="/static/images/alert_auto.png" style="width:100%; border:1px solid #777777"/>
114114

115115
<p>For some metrics that report periodically across different tags,
116116
it may make sense to have triggered alerts auto-resolve after a certain time
@@ -126,20 +126,20 @@ <h4 id="autoresolve">Autoresolving alerts</h4>
126126

127127
<h4 id="notify">Notifying</h4>
128128
<img src="/static/images/alert_6.png" style="width:100%; border:1px solid #777777"/>
129-
<p>In the final step of setting up an alert, you can give any necessary commentary
130-
for the alert so if it triggers it will alert the correct people with the most context possible.
131-
Each graph delivered via email or in the event stream when an alert triggers is a hyperlink
132-
to that graph at that exact timeframe. In the body of the message you can <a href="/faq/#notify">@notify</a>
133-
members of the team to have it specifically call out to them. You can also do this in
129+
<p>In the final step of setting up an alert, you can give any necessary commentary
130+
for the alert so if it triggers it will alert the correct people with the most context possible.
131+
Each graph delivered via email or in the event stream when an alert triggers is a hyperlink
132+
to that graph at that exact timeframe. In the body of the message you can <a href="/faq/#notify">@notify</a>
133+
members of the team to have it specifically call out to them. You can also do this in
134134
part 5, 'Notify your team'.</p>
135135

136136

137137

138138
<h3 id="faqs">Alerting FAQs</h3>
139139
<ul>
140140
<li>Can you alert on a function? Not currently, but we're working towards this!</li>
141-
<li>Can you alert on an event? Not currently, but we're discussing how we'd like to implement this.
142-
As an alternative you can set up an @ notification in the body of the event which would deliver the
141+
<li>Can you alert on an event? Not currently, but we're discussing how we'd like to implement this.
142+
As an alternative you can set up an @ notification in the body of the event which would deliver the
143143
event via email whenever it occurred.</li>
144144

145145
</ul>

content/guides/templating.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Guide to Dashboard Templating
3+
sidebar:
4+
nav:
5+
- header: Guide to Templating
6+
- text: Enabling dashboard templating
7+
href: "#new"
8+
- text: Defining template variables
9+
href: "#def"
10+
- text: Using template variables in graph editors
11+
href: "#graph"
12+
13+
---
14+
15+
<p>Dashboard templating allows you to create dashboards that use variables like <code>$scope</code> or <code>$redis</code> in place of specific tags or hosts. Dynamically explore the same metrics across different sets of tags by selecting new variable values, without switching through multiple dashboards or changing graph and widget definitions.</p>
16+
17+
<h3 id="new">Enabling dashboard templating</h3>
18+
<p>To create a new templated dashboard, select the 'Use templated sources for metrics'
19+
checkbox in the dashboard creation menu.</p>
20+
21+
<img src="/static/images/template_new_dash.png" style="width:100%; border:1px solid #777777" />
22+
23+
<p>To add templating to an existing dashboard, click the 'Toggle Templating' icon in an existing dashboard.</p>
24+
25+
<img src="/static/images/toggle_templating.png" style="width:100%; border:1px solid #777777" />
26+
27+
<h3 id="def">Defining new template variables</h3>
28+
<img src="/static/images/redis-tpl-panel.png" style="width:100%; border:1px solid #777777" />
29+
<p>A template variable is defined by a name and optional parameters for 'Tag Group' and 'Default Tag.' A tag group is a prefix shared among several tags, like <code>redis_port</code> for the tags <code>redis_port:6379</code> and <code>redis_port:6280</code>. Setting a tag group eliminates irrelevant tags from the variable's scope selector.
30+
The 'Default Tag' option determines the initial value for the variable on dashboard load.</p>
31+
32+
<h3 id="graph">Using template variables in graph editors</h3>
33+
<img src="/static/images/redis-tpl-graph-editor.png" style="width:70%; border:1px solid #777777" />
34+
<p>Once defined, template variables appear alongside normal tag and host options in graph editors. If you set <code>redis_port:6379</code> as the value of <code>$redis</code>, all graphs defined with <code>$redis</code> will be scoped to <code>redis_port:6379</code>.
35+
</p>
36+
<img src="/static/images/redis-tpl-selector.png" style="width:70%; border:1px solid #777777" />
37+
29.4 KB
Loading
61.1 KB
Loading
53 KB
Loading
167 KB
Loading
11.1 KB
Loading

layouts/_header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<li><a href="/guides/services_checks/">Setting up Service Checks</a></li>
2020
<li><a href="/guides/chef/">Deploying the Agent with Chef</a></li>
2121
<li><a href="/guides/alerting/">Guide to Alerting</a></li>
22+
<li><a href="/guides/templating/">Guide to Dashboard Templating</a></li>
2223
</ul>
2324
</li>
2425
<li class="dropdown">

0 commit comments

Comments
 (0)