-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/librato: Add Librato provider
- Loading branch information
0 parents
commit bd93641
Showing
3 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: "librato" | ||
page_title: "Provider: Librato" | ||
sidebar_current: "docs-librato-index" | ||
description: |- | ||
The Librato provider is used to interact with the resources supported by Librato. The provider needs to be configured with the proper credentials before it can be used. | ||
--- | ||
|
||
# Librato Provider | ||
|
||
The Librato provider is used to interact with the | ||
resources supported by Librato. The provider needs to be configured | ||
with the proper credentials before it can be used. | ||
|
||
Use the navigation to the left to read about the available resources. | ||
|
||
## Example Usage | ||
|
||
``` | ||
# Configure the Librato provider | ||
provider "librato" { | ||
email = "[email protected]" | ||
token = "${var.librato_token}" | ||
} | ||
# Create a new space | ||
resource "librato_space" "default" { | ||
... | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `token` - (Required) Librato API token. It must be provided, but it can also | ||
be sourced from the `LIBRATO_TOKEN` environment variable. | ||
* `email` - (Required) Librato email address. It must be provided, but it can | ||
also be sourced from the `LIBRATO_EMAIL` environment variable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
layout: "librato" | ||
page_title: "Librato: librato_space" | ||
sidebar_current: "docs-librato-resource-space" | ||
description: |- | ||
Provides a Librato Space resource. This can be used to create and manage spaces on Librato. | ||
--- | ||
|
||
# librato\_space | ||
|
||
Provides a Librato Space resource. This can be used to | ||
create and manage spaces on Librato. | ||
|
||
## Example Usage | ||
|
||
``` | ||
# Create a new Librato space | ||
resource "librato_space" "default" { | ||
name = "My New Space" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The name of the space. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the space. | ||
* `name` - The name of the space. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
layout: "librato" | ||
page_title: "Librato: librato_space_chart" | ||
sidebar_current: "docs-librato-resource-space-chart" | ||
description: |- | ||
Provides a Librato Space Chart resource. This can be used to create and manage charts in Librato Spaces. | ||
--- | ||
|
||
# librato\_space\_chart | ||
|
||
Provides a Librato Space Chart resource. This can be used to | ||
create and manage charts in Librato Spaces. | ||
|
||
## Example Usage | ||
|
||
``` | ||
# Create a new Librato space | ||
resource "librato_space" "my_space" { | ||
name = "My New Space" | ||
} | ||
# Create a new chart | ||
resource "librato_space_chart" "server_temperature" { | ||
name = "Server Temperature" | ||
space_id = "${librato_space.my_space.id}" | ||
stream { | ||
metric = "server_temp" | ||
source = "app1" | ||
} | ||
stream { | ||
metric = "environmental_temp" | ||
source = "*" | ||
group_function = "breakout" | ||
summary_function = "average" | ||
} | ||
stream { | ||
metric = "server_temp" | ||
source = "%" | ||
group_function = "average" | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `space_id` - (Required) The ID of the space this chart should be in. | ||
* `name` - (Required) The title of the chart when it is displayed. | ||
* `type` - (Optional) Indicates the type of chart. Must be one of line or | ||
stacked (default to line). | ||
* `min` - (Optional) The minimum display value of the chart's Y-axis. | ||
* `max` - (Optional) The maximum display value of the chart's Y-axis. | ||
* `label` - (Optional) The Y-axis label. | ||
* `related_space` - (Optional) The ID of another space to which this chart is | ||
related. | ||
* `stream` - (Optional) Nested block describing a metric to use for data in the | ||
chart. The structure of this block is described below. | ||
|
||
The `stream` block supports: | ||
|
||
* `metric` - (Required) The name of the metric. May not be specified if | ||
`composite` is specified. | ||
* `source` - (Required) The name of a source, or `*` to include all sources. | ||
This field will also accept specific wildcard entries. For example | ||
us-west-\*-app will match us-west-21-app but not us-west-12-db. Use % to | ||
specify a dynamic source that will be provided after the instrument or | ||
dashboard has loaded, or in the URL. May not be specified if `composite` is | ||
specified. | ||
* `group_function` - (Required) How to process the results when multiple sources | ||
will be returned. Value must be one of average, sum, breakout. If average or | ||
sum, a single line will be drawn representing the average or sum | ||
(respectively) of all sources. If the group_function is breakout, a separate | ||
line will be drawn for each source. If this property is not supplied, the | ||
behavior will default to average. May not be specified if `composite` is | ||
specified. | ||
* `composite` - (Required) A composite metric query string to execute when this | ||
stream is displayed. May not be specified if `metric`, `source` or | ||
`group_function` is specified. | ||
* `summary_function` - (Optional) When visualizing complex measurements or a | ||
rolled-up measurement, this allows you to choose which statistic to use. | ||
Defaults to "average". Valid options are: "max", "min", "average", "sum" or | ||
"count". | ||
* `name` - (Optional) A display name to use for the stream when generating the | ||
tooltip. | ||
* `color` - (Optional) Sets a color to use when rendering the stream. Must be a | ||
seven character string that represents the hex code of the color e.g. | ||
"#52D74C". | ||
* `units_short` - (Optional) Unit value string to use as the tooltip label. | ||
* `units_long` - (Optional) String value to set as they Y-axis label. All | ||
streams that share the same units_long value will be plotted on the same | ||
Y-axis. | ||
* `min` - (Optional) Theoretical minimum Y-axis value. | ||
* `max` - (Optional) Theoretical maximum Y-axis value. | ||
* `transform_function` - (Optional) Linear formula to run on each measurement | ||
prior to visualizaton. | ||
* `period` - (Optional) An integer value of seconds that defines the period this | ||
stream reports at. This aids in the display of the stream and allows the | ||
period to be used in stream display transforms. | ||
|
||
## Attributes Reference | ||
|
||
The following attributes are exported: | ||
|
||
* `id` - The ID of the chart. | ||
* `space_id` - The ID of the space this chart should be in. | ||
* `title` - The title of the chart when it is displayed. |