Update to latest InfluxDB config style
And make changes consistent
This commit is contained in:
4
aws_env_setup.sh
Normal file
4
aws_env_setup.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export AWS_SECRET_ACCESS_KEY=password
|
||||||
|
export AWS_ACCESS_KEY_ID=user
|
||||||
|
export AWS_ENDPOINT_URL=http://127.0.0.1:7070
|
||||||
|
export AWS_REGION=us-east-1
|
||||||
@@ -5,22 +5,24 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- influxdb
|
- influxdb
|
||||||
links:
|
links:
|
||||||
- influxdb
|
- influxdb
|
||||||
ports:
|
ports:
|
||||||
- '8125:8125'
|
- '8125:8125/udp'
|
||||||
|
|
||||||
influxdb:
|
influxdb:
|
||||||
image: influxdb:1.8.10
|
image: influxdb
|
||||||
container_name: influxdb
|
container_name: influxdb
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB_DB=influx
|
- DOCKER_INFLUXDB_INIT_MODE=setup
|
||||||
- INFLUXDB_ADMIN_USER=admin
|
- DOCKER_INFLUXDB_INIT_USERNAME=admin
|
||||||
- INFLUXDB_ADMIN_PASSWORD=admin
|
- DOCKER_INFLUXDB_INIT_PASSWORD=adminpass
|
||||||
|
- DOCKER_INFLUXDB_INIT_ORG=myorg
|
||||||
|
- DOCKER_INFLUXDB_INIT_BUCKET=metrics
|
||||||
|
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token
|
||||||
ports:
|
ports:
|
||||||
- '8086:8086'
|
- '8086:8086'
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
cat provisioning/datasources/influxdb.yml
|
|
||||||
apiVersion: 1
|
|
||||||
|
|
||||||
datasources:
|
|
||||||
- name: InfluxDB
|
|
||||||
type: influxdb
|
|
||||||
access: proxy
|
|
||||||
url: http://influxdb:8086
|
|
||||||
isDefault: true
|
|
||||||
database: mydb
|
|
||||||
user: admin
|
|
||||||
password: adminpass
|
|
||||||
jsonData:
|
|
||||||
httpMode: POST
|
|
||||||
0
grafana_data/.keep
Normal file
0
grafana_data/.keep
Normal file
0
influxdb_data/.keep
Normal file
0
influxdb_data/.keep
Normal file
0
provisioning/dashboards/.keep
Normal file
0
provisioning/dashboards/.keep
Normal file
13
provisioning/datasources/influxdb.yml
Normal file
13
provisioning/datasources/influxdb.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: influxdb
|
||||||
|
type: influxdb
|
||||||
|
isDefault: true
|
||||||
|
access: proxy
|
||||||
|
url: http://influxdb:8086
|
||||||
|
jsonData:
|
||||||
|
dbName: 'metrics'
|
||||||
|
httpHeaderName1: 'Authorization'
|
||||||
|
secureJsonData:
|
||||||
|
httpHeaderValue1: 'Token my-super-secret-auth-token'
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
[global_tags]
|
[global_tags]
|
||||||
|
|
||||||
[agent]
|
[agent]
|
||||||
interval = "60s"
|
debug = true
|
||||||
|
quiet = false
|
||||||
|
interval = "60s"
|
||||||
round_interval = true
|
round_interval = true
|
||||||
metric_batch_size = 1000
|
metric_batch_size = 1000
|
||||||
metric_buffer_limit = 10000
|
metric_buffer_limit = 10000
|
||||||
@@ -9,17 +11,21 @@
|
|||||||
flush_interval = "10s"
|
flush_interval = "10s"
|
||||||
flush_jitter = "0s"
|
flush_jitter = "0s"
|
||||||
precision = ""
|
precision = ""
|
||||||
hostname = "127.0.0.1"
|
hostname = "versitygw"
|
||||||
omit_hostname = false
|
omit_hostname = false
|
||||||
|
|
||||||
[[outputs.influxdb]]
|
[[outputs.file]]
|
||||||
|
files = ["stdout"]
|
||||||
|
|
||||||
|
[[outputs.influxdb_v2]]
|
||||||
urls = ["http://influxdb:8086"]
|
urls = ["http://influxdb:8086"]
|
||||||
database = "influx"
|
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
username = "telegraf"
|
token = "my-super-secret-auth-token"
|
||||||
password = "metricsmetricsmetricsmetrics"
|
organization = "myorg"
|
||||||
|
bucket = "metrics"
|
||||||
|
|
||||||
[[inputs.statsd]]
|
[[inputs.statsd]]
|
||||||
|
protocol = "udp4"
|
||||||
service_address = ":8125"
|
service_address = ":8125"
|
||||||
delete_gauges = false
|
delete_gauges = false
|
||||||
delete_counters = false
|
delete_counters = false
|
||||||
7
test.sh
Normal file → Executable file
7
test.sh
Normal file → Executable file
@@ -1,7 +1,6 @@
|
|||||||
export AWS_SECRET_ACCESS_KEY=password
|
#!/usr/bin/env bash
|
||||||
export AWS_ACCESS_KEY_ID=user
|
|
||||||
export AWS_ENDPOINT_URL=http://127.0.0.1:7070
|
. ./aws_env_setup.sh
|
||||||
export AWS_REGION=us-east-1
|
|
||||||
|
|
||||||
aws s3 mb s3://test
|
aws s3 mb s3://test
|
||||||
aws s3 cp docker-compose.yml s3://test/test.yaml
|
aws s3 cp docker-compose.yml s3://test/test.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user