github.com/greysond/terraform@v0.8.5-0.20170124173113-439b5507bbe9/website/source/docs/providers/datadog/r/timeboard.html.markdown (about) 1 --- 2 layout: "datadog" 3 page_title: "Datadog: datadog_timeboard" 4 sidebar_current: "docs-datadog-resource-timeboard" 5 description: |- 6 Provides a Datadog timeboard resource. This can be used to create and manage timeboards. 7 --- 8 9 # datadog\_timeboard 10 11 Provides a Datadog timeboard resource. This can be used to create and manage Datadog timeboards. 12 13 ## Example Usage 14 15 ``` 16 # Create a new Datadog timeboard 17 resource "datadog_timeboard" "redis" { 18 19 title = "Redis Timeboard (created via Terraform)" 20 description = "created using the Datadog provider in Terraform" 21 read_only = true 22 23 graph { 24 title = "Redis latency (ms)" 25 viz = "timeseries" 26 request { 27 q = "avg:redis.info.latency_ms{$host}" 28 type = "bars" 29 } 30 } 31 32 graph { 33 title = "Redis memory usage" 34 viz = "timeseries" 35 request { 36 q = "avg:redis.mem.used{$host} - avg:redis.mem.lua{$host}, avg:redis.mem.lua{$host}" 37 stacked = true 38 } 39 request { 40 q = "avg:redis.mem.rss{$host}" 41 style { 42 palette = "warm" 43 } 44 } 45 } 46 47 graph { 48 title = "Top System CPU by Docker container" 49 viz = "toplist" 50 request { 51 q = "top(avg:docker.cpu.system{*} by {container_name}, 10, 'mean', 'desc')" 52 } 53 } 54 55 template_variable { 56 name = "host" 57 prefix = "host" 58 } 59 } 60 ``` 61 62 ## Argument Reference 63 64 The following arguments are supported: 65 66 * `title` - (Required) The name of the dashboard. 67 * `description` - (Required) A description of the dashboard's content. 68 * `read_only` - (Optional) The read-only status of the timeboard. Default is false. 69 * `graph` - (Required) Nested block describing a graph definition. The structure of this block is described below. Multiple graph blocks are allowed within a datadog_timeboard resource. 70 * `template_variable` - (Optional) Nested block describing a template variable. The structure of this block is described below. Multiple template_variable blocks are allowed within a datadog_timeboard resource. 71 72 ### Nested `graph` blocks 73 74 Nested `graph` blocks have the following structure: 75 76 * `title` - (Required) The name of the graph. 77 * `viz` - (Required) The type of visualization to use for the graph. Valid choices are "change", "distribution", "heatmap", "hostmap", "query_value", timeseries", and "toplist". 78 * `request` - Nested block describing a graph definition request (a metric query to plot on the graph). The structure of this block is described below. Multiple request blocks are allowed within a graph block. 79 * `events` - (Optional) A list of event filter strings. Note that, while supported by the Datadog API, the Datadog UI does not (currently) support multiple event filters very well, so use at your own risk. 80 * `autoscale` - (Optional) Boolean that determines whether to autoscale graphs. 81 * `precision` - (Optional) Number of digits displayed, use `*` for full precision. 82 * `custom_unit` - (Optional) Display a custom unit on the graph (such as 'hertz') 83 * `text_align` - (Optional) How to align text in the graph, can be one of 'left', 'center', or 'right'. 84 * `style` - (Optional) Nested block describing hostmaps. The structure of this block is described below. 85 * `group` - (Optional) List of groups for hostmaps (shown as 'group by' in the UI). 86 * `include_no_metric_hosts` - (Optional) If set to true, will display hosts on hostmap that have no reported metrics. 87 * `include_ungrouped_hosts` - (Optional) If set to true, will display hosts without groups on hostmaps. 88 * `scope` - (Optional) List of scopes for hostmaps (shown as 'filter by' in the UI). 89 * `yaxis` - (Optional) Nested block describing modifications to the yaxis rendering. The structure of this block is described below. 90 * `marker` - (Optional) Nested block describing lines / ranges added to graph for formatting. The structure of this block is described below. Multiple marker blocks are allowed within a graph block. 91 92 #### Nested `graph` `marker` blocks 93 94 Nested `graph` `marker` blocks have the following structure: 95 96 * `type` - (Required) How the marker lines will look. Possible values are {"error", "warning", "info", "ok"} {"dashed", "solid", "bold"}. Example: "error dashed". 97 * `value` - (Required) Mathematical expression describing the marker. Examples: "y > 1", "-5 < y < 0", "y = 19". 98 * `label` - (Optional) A label for the line or range. 99 100 {error, warning, info, ok} {dashed, solid, bold} 101 102 #### Nested `graph` `yaxis` block 103 * `min` - (Optional) Minimum bound for the graph's yaxis, a string. 104 * `max` - (Optional) Maximum bound for the graph's yaxis, a string. 105 * `scale` - (Optional) How to scale the yaxis. Possible values are: "linear", "log", "sqrt", "pow##" (eg. pow2, pow0.5, 2 is used if only "pow" was provided). Default: "linear". 106 107 #### Nested `graph` `request` blocks 108 109 Nested `graph` `request` blocks have the following structure: 110 111 * `q` - (Required) The query of the request. Pro tip: Use the JSON tab inside the Datadog UI to help build you query strings. 112 * `aggregator` - (Optional) The aggregation method used when the number of data points outnumbers the max that can be shown. 113 * `stacked` - (Optional) Boolean value to determine if this is this a stacked area graph. Default: false (line chart). 114 * `type` - (Optional) Choose how to draw the graph. For example: "lines", "bars" or "areas". Default: "lines". 115 * `style` - (Optional) Nested block to customize the graph style. 116 117 ### Nested `graph` `style` block 118 The nested `style` block is used specifically for styling `hostmap` graphs, and has the following structure: 119 120 * `palette` - (Optional) Spectrum of colors to use when styling a hostmap. For example: "green_to_orange", "yellow_to_green", "YlOrRd", or "hostmap_blues". Default: "green_to_orange". 121 * `palette_flip` - (Optional) Flip how the hostmap is rendered. For example, with the default palette, low values are represented as green, with high values as orange. If palette_flip is "true", then low values will be orange, and high values will be green. 122 123 ### Nested `graph` `request` `style` block 124 125 The nested `style` blocks has the following structure: 126 127 * `palette` - (Optional) Color of the line drawn. For example: "classic", "cool", "warm", "purple", "orange" or "gray". Default: "classic". 128 * `width` - (Optional) Line width. Possible values: "thin", "normal", "thick". Default: "normal". 129 * `type` - (Optional) Type of line drawn. Possible values: "dashed", "solid", "dotted". Default: "solid". 130 131 ### Nested `template_variable` blocks 132 133 Nested `template_variable` blocks have the following structure: 134 135 * `name` - (Required) The variable name. Can be referenced as $name in `graph` `request` `q` query strings. 136 * `prefix` - (Optional) The tag group. Default: no tag group. 137 * `default` - (Required) The default tag. Default: "*" (match all).