Update to latest InfluxDB config style

And make changes consistent
This commit is contained in:
Greg Cymbalski
2024-08-01 21:08:24 -07:00
parent 75cd2977f9
commit 40ccebce6b
9 changed files with 40 additions and 30 deletions

4
aws_env_setup.sh Normal file
View 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

View File

@@ -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:

View File

@@ -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
View File

0
influxdb_data/.keep Normal file
View File

View File

View 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'

View File

@@ -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
View 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