github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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 80 #### Nested `graph` `request` blocks 81 82 Nested `graph` `request` blocks have the following structure: 83 84 * `q` - (Required) The query of the request. Pro tip: Use the JSON tab inside the Datadog UI to help build you query strings. 85 * `stacked` - (Optional) Boolean value to determin if this is this a stacked area graph. Default: false (line chart). 86 * `type` - (Optional) Choose how to draw the graph. For example: "lines", "bars" or "areas". Default: "lines". 87 * `style` - (Optional) Nested block to customize the graph style. 88 89 ### Nested `style` block 90 91 The nested `style` blocks has the following structure (only `palette` is supported right now): 92 93 * `palette` - (Optional) Color of the line drawn. For example: "classic", "cool", "warm", "purple", "orange" or "gray". Default: "classic". 94 95 ### Nested `template_variable` blocks 96 97 Nested `template_variable` blocks have the following structure: 98 99 * `name` - (Required) The variable name. Can be referenced as $name in `graph` `request` `q` query strings. 100 * `prefix` - (Optional) The tag group. Default: no tag group. 101 * `default` - (Required) The default tag. Default: "*" (match all).