docs: adds provisioning examples for all datasources

closes #11363
This commit is contained in:
bergquist 2018-03-28 17:39:00 +02:00
parent df89be4de9
commit d95eabfeec
8 changed files with 157 additions and 0 deletions

View File

@ -173,3 +173,36 @@ Amazon provides 1 million CloudWatch API requests each month at no additional ch
it costs $0.01 per 1,000 GetMetricStatistics or ListMetrics requests. For each query Grafana will
issue a GetMetricStatistics request and every time you pick a dimension in the query editor
Grafana will issue a ListMetrics request.
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here is an example of how you can configure the Cloudwatch datasource using configuration.
Using a credentials file
```yaml
apiVersion: 1
datasources:
- name: Cloudwatch
type: cloudwatch
jsonData:
authType: credentials
defaultRegion: eu-west-2
```
Using `accessKey` and `secretKey`
```yaml
apiVersion: 1
datasources:
- name: Cloudwatch
type: cloudwatch
jsonData:
authType: keys
defaultRegion: eu-west-2
secureJsonData:
accessKey: "<your access key>"
secretKey: "<your secret key>"
```

View File

@ -137,3 +137,22 @@ Query | You can leave the search query blank or specify a lucene query
Time | The name of the time field, needs to be date field.
Text | Event description field.
Tags | Optional field name to use for event tags (can be an array or a CSV string).
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: Elastic
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:9200
jsonData:
interval: Daily
timeField: "@timestamp"
```

View File

@ -120,3 +120,20 @@ queries via the Dashboard menu / Annotations view.
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
specify a tag or wildcard (leave empty should also work)
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: Graphite
type: graphite
access: proxy
url: http://localhost:8080
jsonData:
graphiteVersion: "1.1"
```

View File

@ -174,3 +174,21 @@ SELECT title, description from events WHERE $timeFilter order asc
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
part. If you only select one column you will not need to enter anything in the column mapping fields. The
Tags field can be a comma separated string.
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: InfluxDB
type: influxdb
access: proxy
database: site
user: grafana
password: grafana
url: http://localhost:8086
```

View File

@ -225,3 +225,20 @@ tags | Optional field name to use for event tags as a comma separated string.
## Alerting
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule conditions.
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: MySQL
type: mysql
url: localhost:3306
database: grafana
user: grafana
password: password
```

View File

@ -88,3 +88,21 @@ Query | Description
*tag_values(cpu, hostanme, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
For details on OpenTSDB metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: OpenTsdb
type: opentsdb
access: proxy
url: http://localhost:4242
jsonData:
tsdbResolution: 1
tsdbVersion: 1
```

View File

@ -217,3 +217,23 @@ tags | Optional field name to use for event tags as a comma separated string.
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
conditions.
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources).
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: Postgres
type: postgres
url: localhost:5432
database: grafana
user: grafana
password: password
jsonData:
sslmode: "disable" # disable/require/verify-ca/verify-full
```

View File

@ -100,3 +100,18 @@ The step option is useful to limit the number of events returned from your query
## Getting Grafana metrics into Prometheus
Since 4.6.0 Grafana exposes metrics for Prometheus on the `/metrics` endpoint. We also bundle a dashboard within Grafana so you can get started viewing your metrics faster. You can import the bundled dashboard by going to the data source edit page and click the dashboard tab. There you can find a dashboard for Grafana and one for Prometheus. Import and start viewing all the metrics!
## Configure datasource with provisioning
Its now possible to configure datasources using config files with Grafanas [provisioning system](/administration/provisioning/#datasources
Here are some examples of how you can configure the Cloudwatch datasource using configuration.
```yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://localhost:9090
```