File tree 9 files changed +58
-681
lines changed
grafana/etc/provisioning/datasources
9 files changed +58
-681
lines changed Original file line number Diff line number Diff line change @@ -8,44 +8,29 @@ This is demonstration scripts for running Grafana with InfluxDB as datasource.
8
8
9
9
### Prerequisites
10
10
11
- - Docker-CE 18.06 +
12
- - Docker Compose v1.23 .1+
11
+ - Docker-CE 19.03 +
12
+ - Docker Compose v1.25 .1+
13
13
14
14
### Quick Start Guide
15
15
16
16
``` bash
17
- $ ./provision.sh
17
+ ./provision.sh
18
18
```
19
19
20
20
That's all, now you should be able to check your dashboard by visiting http://localhost:3000 :-)
21
21
22
22
### FAQ
23
23
24
- #### Where can I find my data?
25
-
26
- please find your data via ` $ docker volume ls `
27
-
28
- ``` bash
29
- $ docker volume ls
30
-
31
- DRIVER VOLUME NAME
32
- local demo_grafana-lib
33
- local demo_grafana-log
34
- local demo_influxdb-lib
35
- ```
36
-
37
24
#### I just messed up, how do I start over again?
38
25
39
- I know you will ask, here's the cleanup script for you :-)
40
-
41
26
``` bash
42
- $ ./cleanup.sh
27
+ ./cleanup.sh
43
28
```
44
29
45
30
### Docker Images
46
31
47
32
- [ Grafana v8.0.6] [ docker-image-grafana ]
48
- - [ InfluxDB 1.8.5 ] [ docker-image-influxdb ]
33
+ - [ InfluxDB 2.0.7 ] [ docker-image-influxdb ]
49
34
50
35
[ docker-image-influxdb ] : https://hub.docker.com/_/influxdb/
51
36
[ docker-image-grafana ] : https://hub.docker.com/r/grafana/grafana/
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
docker-compose down
4
-
5
- docker volume rm demo_grafana-lib
6
- docker volume rm demo_grafana-log
7
- docker volume rm demo_influxdb-lib
4
+ docker system prune --volumes --force
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- version : " 3"
1
+ version : " 3.7 "
2
2
3
3
services :
4
- influxdb :
5
- container_name : influxdb
6
- image : influxdb:1.8.5 -alpine
7
- volumes :
8
- - ./ influxdb/etc:/etc/influxdb
9
- - influxdb-lib:/var/lib/influxdb
10
- env_file :
11
- - ./demo .env
12
- ports :
13
- - 8083:8083
14
- - 8086:8086
15
- privileged : true
4
+ influxdb :
5
+ container_name : influxdb
6
+ image : influxdb:2.0.7 -alpine
7
+ volumes :
8
+ - influxdb-lib:/var/lib/influxdb2
9
+ env_file :
10
+ # BE SURE TO CHANGE THIS LINE BEFORE GOING TO PRODUCTION
11
+ - ./influx2 .env
12
+ ports :
13
+ - 8086:8086
14
+ restart : always
15
+ privileged : true
16
16
17
- grafana :
18
- container_name : grafana
19
- image : grafana/grafana:8.0.6
20
- volumes :
21
- - ./grafana/etc:/etc/grafana:ro
22
- - grafana-lib:/var/lib/grafana
23
- - grafana-log:/var/log/grafana
24
- links :
25
- - influxdb:influxdb
26
- env_file :
27
- - ./demo.env # BE SURE TO CHANGE THIS LINE BEFORE GOING TO PRODUCTION
28
- ports :
29
- - 3000:3000
30
- depends_on :
31
- - influxdb
32
- privileged : true
17
+ grafana :
18
+ container_name : grafana
19
+ image : grafana/grafana:8.0.6
20
+ volumes :
21
+ - ./grafana/etc:/etc/grafana:ro
22
+ - grafana-lib:/var/lib/grafana
23
+ - grafana-log:/var/log/grafana
24
+ links :
25
+ - influxdb:influxdb
26
+ env_file :
27
+ # BE SURE TO CHANGE THIS LINE BEFORE GOING TO PRODUCTION
28
+ - ./grafana.env
29
+ ports :
30
+ - 3000:3000
31
+ depends_on :
32
+ - influxdb
33
+ restart : always
34
+ privileged : true
33
35
34
36
volumes :
35
37
influxdb-lib :
Original file line number Diff line number Diff line change
1
+ GF_INSTALL_PLUGINS = grafana-clock-panel
Original file line number Diff line number Diff line change 1
1
apiVersion: 1
2
2
3
3
datasources:
4
- - name: InfluxDB
4
+ - name: InfluxDB_v2_Flux
5
5
type: influxdb
6
6
access: proxy
7
- database: %%INFLUXDB_DEMO_DATABASE%%
8
- user: %%INFLUXDB_ADMIN_USER%%
9
- password: %%INFLUXDB_ADMIN_PASSWORD%%
10
7
url: http://influxdb:8086
8
+ secureJsonData:
9
+ token: %%INFLUXDB_INIT_ADMIN_TOKEN%%
10
+ jsonData:
11
+ version: Flux
12
+ organization: %%INFLUXDB_INIT_ORG%%
13
+ defaultBucket: %%INFLUXDB_INIT_BUCKET%%
14
+ tlsSkipVerify: true
Original file line number Diff line number Diff line change
1
+ DOCKER_INFLUXDB_INIT_MODE = setup
2
+ DOCKER_INFLUXDB_INIT_USERNAME = root
3
+ DOCKER_INFLUXDB_INIT_PASSWORD = 5up3rS3cr3t
4
+ DOCKER_INFLUXDB_INIT_ORG = influxdata-org
5
+ DOCKER_INFLUXDB_INIT_BUCKET = default
6
+ DOCKER_INFLUXDB_INIT_RETENTION = 1w
7
+ DOCKER_INFLUXDB_INIT_ADMIN_TOKEN = 5up3r-S3cr3t-auth-t0k3n
You can’t perform that action at this time.
0 commit comments