mirror of https://github.com/grafana/grafana
devenv: influxdb data sources and blocks cleanup (#32894)
* devenv: influxdb cleanup * devenv: influxdb: auto-delete now-unused gdev-data-sourcespull/32918/head^2
parent
a0c38e243c
commit
31a6d12d34
@ -1 +0,0 @@ |
||||
influxdb_version=1.8.1-alpine |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@ |
||||
influxdb1: |
||||
image: influxdb:1.8.4-alpine |
||||
container_name: influxdb1 |
||||
ports: |
||||
- '2004:2004' |
||||
- '8083:8083' |
||||
- '8087:8086' |
||||
environment: |
||||
INFLUXDB_ADMIN_USER: grafana |
||||
INFLUXDB_ADMIN_PASSWORD: grafana |
||||
INFLUXDB_DB: site |
||||
volumes: |
||||
- ./docker/blocks/influxdb1/influxdb.conf:/etc/influxdb/influxdb.conf |
||||
|
||||
fake-influxdb1-data: |
||||
image: grafana/fake-data-gen |
||||
links: |
||||
- influxdb1 |
||||
environment: |
||||
FD_SERVER: influxdb1 |
||||
FD_DATASOURCE: influxdb |
||||
FD_PORT: 8086 |
||||
|
||||
telegraf-influxdb1: |
||||
image: telegraf:1.10.4 |
||||
links: |
||||
- influxdb1 |
||||
volumes: |
||||
- ./docker/blocks/influxdb1/telegraf.conf:/etc/telegraf/telegraf.conf:ro |
||||
- /var/log:/var/log |
||||
- ../data/log:/var/log/grafana |
||||
|
@ -0,0 +1,60 @@ |
||||
[global_tags] |
||||
|
||||
[agent] |
||||
interval = "10s" |
||||
round_interval = true |
||||
metric_batch_size = 1000 |
||||
metric_buffer_limit = 10000 |
||||
collection_jitter = "0s" |
||||
flush_interval = "10s" |
||||
flush_jitter = "0s" |
||||
precision = "" |
||||
debug = false |
||||
quiet = false |
||||
logfile = "" |
||||
hostname = "" |
||||
omit_hostname = false |
||||
|
||||
[[outputs.influxdb]] |
||||
urls = ["http://influxdb1:8086"] |
||||
username = "grafana" |
||||
password = "grafana" |
||||
database = "site" |
||||
|
||||
[[inputs.cpu]] |
||||
percpu = true |
||||
totalcpu = true |
||||
collect_cpu_time = false |
||||
report_active = false |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.disk]] |
||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.diskio]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.kernel]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.mem]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.processes]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.swap]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.system]] |
||||
name_prefix = "t_" |
||||
|
||||
[[inputs.logparser]] |
||||
files = [ |
||||
"/var/log/*.log", |
||||
"/var/log/grafana/*.log" |
||||
] |
||||
[inputs.logparser.grok] |
||||
measurement = "t_logs" |
||||
patterns = ['^%{GREEDYDATA:message:string}'] |
@ -1,44 +0,0 @@ |
||||
influxdb2: |
||||
image: influxdb:2.0.4 |
||||
container_name: influxdb2 |
||||
ports: |
||||
- '8087:8086' |
||||
environment: |
||||
INFLUXD_REPORTING_DISABLED: 'true' |
||||
volumes: |
||||
- ./docker/blocks/influxdb2/config.yaml:/etc/influxdb2/config.yaml |
||||
|
||||
# Use the influx cli to set up an influxdb instance. |
||||
influxdb2_cli: |
||||
links: |
||||
- influxdb2 |
||||
image: influxdb:2.0.4 |
||||
# The following long command does 2 things: |
||||
# 1. It initializes the bucket |
||||
# 2. Maps bucket to database to enable backward-compatible access (influxql queries) |
||||
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf. |
||||
entrypoint: bash -c "influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb2:8086 -f && influx -t mytoken -o myorg --host=http://influxdb2:8086 bucket list -n mybucket --hide-headers | cut -f 1 | xargs influx -t mytoken -o myorg --host=http://influxdb2:8086 v1 dbrp create --db site --rp default --default --bucket-id" |
||||
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service. |
||||
restart: on-failure:10 |
||||
depends_on: |
||||
- influxdb2 |
||||
|
||||
fake-influxdb2-data: |
||||
image: grafana/fake-data-gen |
||||
links: |
||||
- influxdb2 |
||||
environment: |
||||
FD_SERVER: influxdb2 |
||||
FD_DATASOURCE: influxdb |
||||
FD_PORT: 8086 |
||||
|
||||
telegraf2: |
||||
image: telegraf |
||||
links: |
||||
- influxdb2 |
||||
depends_on: |
||||
- influxdb2_cli |
||||
volumes: |
||||
- ./docker/blocks/influxdb2/telegraf.conf:/etc/telegraf/telegraf.conf:ro |
||||
- /var/log:/var/log |
||||
- ../data/log:/var/log/grafana |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue