-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from gdashboard/logs-panel
Support `Logs` panel
- Loading branch information
Showing
14 changed files
with
562 additions
and
15 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
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,118 @@ | ||
--- | ||
page_title: "gdashboard_logs Data Source - terraform-provider-gdashboard" | ||
subcategory: "" | ||
description: |- | ||
Logs panel data source. See Grafana documentation https://grafana.com/docs/grafana/latest/panels-visualizations/visualizations/logs/ for more details. | ||
--- | ||
|
||
# gdashboard_logs (Data Source) | ||
|
||
Logs panel data source. See Grafana [documentation](https://grafana.com/docs/grafana/latest/panels-visualizations/visualizations/logs/) for more details. | ||
|
||
## Example | ||
|
||
```terraform | ||
data "gdashboard_logs" "logs" { | ||
title = "Logs example" | ||
description = "Text description" | ||
graph { | ||
show_time = true | ||
show_unique_labels = true | ||
show_common_labels = true | ||
wrap_lines = true | ||
prettify_json = true | ||
enable_log_details = false | ||
deduplication = "exact" | ||
order = "oldest_first" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `title` (String) The title of this panel. | ||
|
||
### Optional | ||
|
||
- `compact_json` (Boolean) Whether to use compat JSON encoding or not. | ||
- `description` (String) The description of this panel. | ||
- `graph` (Block List) The visualization options. (see [below for nested schema](#nestedblock--graph)) | ||
- `queries` (Block List) The queries to collect values from data sources. (see [below for nested schema](#nestedblock--queries)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `json` (String) The Grafana-API-compatible JSON of this panel. | ||
|
||
<a id="nestedblock--graph"></a> | ||
### Nested Schema for `graph` | ||
|
||
Optional: | ||
|
||
- `deduplication` (String) The layout orientation. The choices are: `none`, `exact`, `numbers`, `signature`. | ||
- `enable_log_details` (Boolean) Whether to show log details view for each log row. | ||
- `order` (String) The order in which to show logs first. The choices are: `newest_first`, `oldest_first`. | ||
- `prettify_json` (Boolean) Set this to true to pretty print all JSON logs. This setting does not affect logs in any format other than JSON. | ||
- `show_common_labels` (Boolean) Whether to show the common labels. | ||
- `show_time` (Boolean) Whether to show the time column. This is the timestamp associated with the log line as reported from the data source. | ||
- `show_unique_labels` (Boolean) Whether to show the unique labels column, which shows only non-common labels. | ||
- `wrap_lines` (Boolean) Whether to wrap the lines. | ||
|
||
|
||
<a id="nestedblock--queries"></a> | ||
### Nested Schema for `queries` | ||
|
||
Optional: | ||
|
||
- `cloudwatch` (Block List) The CloudWatch query. (see [below for nested schema](#nestedblock--queries--cloudwatch)) | ||
- `prometheus` (Block List) The Prometheus query. (see [below for nested schema](#nestedblock--queries--prometheus)) | ||
|
||
<a id="nestedblock--queries--cloudwatch"></a> | ||
### Nested Schema for `queries.cloudwatch` | ||
|
||
Required: | ||
|
||
- `metric_name` (String) The name of the metric to query. Example: `CPUUtilization` | ||
- `namespace` (String) The namespace to query the metrics from. | ||
- `statistic` (String) The calculation to apply to the time series. | ||
- `uid` (String) The UID of a CloudWatch DataSource to use in this query. | ||
|
||
Optional: | ||
|
||
- `dimension` (Block List) The dimension to filter the metric with. (see [below for nested schema](#nestedblock--queries--cloudwatch--dimension)) | ||
- `label` (String) The legend name. | ||
- `match_exact` (Boolean) If enabled you also need to specify **all** the dimensions of the metric you’re querying. | ||
- `period` (String) The minimum interval between points in seconds. | ||
- `ref_id` (String) The ID of the query. The ID can be used to reference queries in math expressions. | ||
- `region` (String) The AWS region to query the metrics from. | ||
|
||
<a id="nestedblock--queries--cloudwatch--dimension"></a> | ||
### Nested Schema for `queries.cloudwatch.dimension` | ||
|
||
Required: | ||
|
||
- `name` (String) The name of the dimension. | ||
- `value` (String) The value of the dimension. | ||
|
||
|
||
|
||
<a id="nestedblock--queries--prometheus"></a> | ||
### Nested Schema for `queries.prometheus` | ||
|
||
Required: | ||
|
||
- `expr` (String) The query expression. | ||
- `uid` (String) The UID of a Prometheus DataSource to use in this query. | ||
|
||
Optional: | ||
|
||
- `format` (String) The query format. The choices are: `time_series`, `table`, `heatmap`. | ||
- `instant` (Boolean) Whether to return the latest value from the time series or not. | ||
- `legend_format` (String) The legend name. | ||
- `min_interval` (String) The lower bounds on the interval between data points. | ||
- `ref_id` (String) The ID of the query. The ID can be used to reference queries in math expressions. |
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,16 @@ | ||
data "gdashboard_logs" "logs" { | ||
title = "Logs example" | ||
description = "Text description" | ||
|
||
graph { | ||
show_time = true | ||
show_unique_labels = true | ||
show_common_labels = true | ||
wrap_lines = true | ||
prettify_json = true | ||
enable_log_details = false | ||
deduplication = "exact" | ||
order = "oldest_first" | ||
} | ||
|
||
} |
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
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
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
Oops, something went wrong.