Add influxdb
This commit is contained in:
parent
33d39399b4
commit
81747da1da
5 changed files with 177 additions and 0 deletions
|
@ -51,6 +51,20 @@ services:
|
||||||
- 127.0.0.1:3002:3000
|
- 127.0.0.1:3002:3000
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/grafana:/var/lib/grafana
|
- ./volumes/grafana:/var/lib/grafana
|
||||||
|
depends_on:
|
||||||
|
- influxdb
|
||||||
|
|
||||||
|
influxdb:
|
||||||
|
image: influxdb:1.7
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:8086:8086
|
||||||
|
environment:
|
||||||
|
- INFLUXDB_WRITE_USER=telegraf
|
||||||
|
- INFLUXDB_WRITE_USER_PASSWORD=${INFLUXDB_WRITE_USER_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ./volumes/influxdb:/var/lib/influxdb
|
||||||
|
- ./influxdb.conf:/etc/influxdb/influxdb.conf:ro
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
|
|
155
files/influxdb.conf
Normal file
155
files/influxdb.conf
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
reporting-disabled = false
|
||||||
|
bind-address = "127.0.0.1:8088"
|
||||||
|
|
||||||
|
[meta]
|
||||||
|
dir = "/var/lib/influxdb/meta"
|
||||||
|
retention-autocreate = true
|
||||||
|
logging-enabled = true
|
||||||
|
|
||||||
|
[data]
|
||||||
|
dir = "/var/lib/influxdb/data"
|
||||||
|
index-version = "inmem"
|
||||||
|
wal-dir = "/var/lib/influxdb/wal"
|
||||||
|
wal-fsync-delay = "0s"
|
||||||
|
validate-keys = false
|
||||||
|
query-log-enabled = true
|
||||||
|
cache-max-memory-size = 1073741824
|
||||||
|
cache-snapshot-memory-size = 26214400
|
||||||
|
cache-snapshot-write-cold-duration = "10m0s"
|
||||||
|
compact-full-write-cold-duration = "4h0m0s"
|
||||||
|
compact-throughput = 50331648
|
||||||
|
compact-throughput-burst = 50331648
|
||||||
|
max-series-per-database = 1000000
|
||||||
|
max-values-per-tag = 100000
|
||||||
|
max-concurrent-compactions = 0
|
||||||
|
max-index-log-file-size = 1048576
|
||||||
|
series-id-set-cache-size = 100
|
||||||
|
series-file-max-concurrent-snapshot-compactions = 0
|
||||||
|
trace-logging-enabled = false
|
||||||
|
tsm-use-madv-willneed = false
|
||||||
|
|
||||||
|
[coordinator]
|
||||||
|
write-timeout = "10s"
|
||||||
|
max-concurrent-queries = 0
|
||||||
|
query-timeout = "0s"
|
||||||
|
log-queries-after = "0s"
|
||||||
|
max-select-point = 0
|
||||||
|
max-select-series = 0
|
||||||
|
max-select-buckets = 0
|
||||||
|
|
||||||
|
[retention]
|
||||||
|
enabled = true
|
||||||
|
check-interval = "30m0s"
|
||||||
|
|
||||||
|
[shard-precreation]
|
||||||
|
enabled = true
|
||||||
|
check-interval = "10m0s"
|
||||||
|
advance-period = "30m0s"
|
||||||
|
|
||||||
|
[monitor]
|
||||||
|
store-enabled = true
|
||||||
|
store-database = "_internal"
|
||||||
|
store-interval = "10s"
|
||||||
|
|
||||||
|
[subscriber]
|
||||||
|
enabled = true
|
||||||
|
http-timeout = "30s"
|
||||||
|
insecure-skip-verify = false
|
||||||
|
ca-certs = ""
|
||||||
|
write-concurrency = 40
|
||||||
|
write-buffer-size = 1000
|
||||||
|
|
||||||
|
[http]
|
||||||
|
enabled = true
|
||||||
|
bind-address = ":8086"
|
||||||
|
auth-enabled = false
|
||||||
|
log-enabled = true
|
||||||
|
suppress-write-log = false
|
||||||
|
write-tracing = false
|
||||||
|
flux-enabled = false
|
||||||
|
flux-log-enabled = false
|
||||||
|
pprof-enabled = true
|
||||||
|
pprof-auth-enabled = false
|
||||||
|
debug-pprof-enabled = false
|
||||||
|
ping-auth-enabled = false
|
||||||
|
https-enabled = false
|
||||||
|
https-certificate = "/etc/ssl/influxdb.pem"
|
||||||
|
https-private-key = ""
|
||||||
|
max-row-limit = 0
|
||||||
|
max-connection-limit = 0
|
||||||
|
shared-secret = ""
|
||||||
|
realm = "InfluxDB"
|
||||||
|
unix-socket-enabled = false
|
||||||
|
unix-socket-permissions = "0777"
|
||||||
|
bind-socket = "/var/run/influxdb.sock"
|
||||||
|
max-body-size = 25000000
|
||||||
|
access-log-path = ""
|
||||||
|
max-concurrent-write-limit = 0
|
||||||
|
max-enqueued-write-limit = 0
|
||||||
|
enqueued-write-timeout = 30000000000
|
||||||
|
|
||||||
|
[logging]
|
||||||
|
format = "auto"
|
||||||
|
level = "info"
|
||||||
|
suppress-logo = false
|
||||||
|
|
||||||
|
[[graphite]]
|
||||||
|
enabled = false
|
||||||
|
bind-address = ":2003"
|
||||||
|
database = "graphite"
|
||||||
|
retention-policy = ""
|
||||||
|
protocol = "tcp"
|
||||||
|
batch-size = 5000
|
||||||
|
batch-pending = 10
|
||||||
|
batch-timeout = "1s"
|
||||||
|
consistency-level = "one"
|
||||||
|
separator = "."
|
||||||
|
udp-read-buffer = 0
|
||||||
|
|
||||||
|
[[collectd]]
|
||||||
|
enabled = false
|
||||||
|
bind-address = ":25826"
|
||||||
|
database = "collectd"
|
||||||
|
retention-policy = ""
|
||||||
|
batch-size = 5000
|
||||||
|
batch-pending = 10
|
||||||
|
batch-timeout = "10s"
|
||||||
|
read-buffer = 0
|
||||||
|
typesdb = "/usr/share/collectd/types.db"
|
||||||
|
security-level = "none"
|
||||||
|
auth-file = "/etc/collectd/auth_file"
|
||||||
|
parse-multivalue-plugin = "split"
|
||||||
|
|
||||||
|
[[opentsdb]]
|
||||||
|
enabled = false
|
||||||
|
bind-address = ":4242"
|
||||||
|
database = "opentsdb"
|
||||||
|
retention-policy = ""
|
||||||
|
consistency-level = "one"
|
||||||
|
tls-enabled = false
|
||||||
|
certificate = "/etc/ssl/influxdb.pem"
|
||||||
|
batch-size = 1000
|
||||||
|
batch-pending = 5
|
||||||
|
batch-timeout = "1s"
|
||||||
|
log-point-errors = true
|
||||||
|
|
||||||
|
[[udp]]
|
||||||
|
enabled = false
|
||||||
|
bind-address = ":8089"
|
||||||
|
database = "udp"
|
||||||
|
retention-policy = ""
|
||||||
|
batch-size = 5000
|
||||||
|
batch-pending = 10
|
||||||
|
read-buffer = 0
|
||||||
|
batch-timeout = "1s"
|
||||||
|
precision = ""
|
||||||
|
|
||||||
|
[continuous_queries]
|
||||||
|
log-enabled = true
|
||||||
|
enabled = true
|
||||||
|
query-stats-enabled = false
|
||||||
|
run-interval = "1s"
|
||||||
|
|
||||||
|
[tls]
|
||||||
|
min-version = ""
|
||||||
|
max-version = ""
|
|
@ -25,6 +25,7 @@
|
||||||
- { path: '/gitea/volumes/weblate/', owner: '1000' }
|
- { path: '/gitea/volumes/weblate/', owner: '1000' }
|
||||||
- { path: '/gitea/volumes/grafana/', owner: '472' }
|
- { path: '/gitea/volumes/grafana/', owner: '472' }
|
||||||
- { path: '/gitea/volumes/postgres/', owner: '70' }
|
- { path: '/gitea/volumes/postgres/', owner: '70' }
|
||||||
|
- { path: '/gitea/volumes/influxdb/', owner: 'root' }
|
||||||
|
|
||||||
- name: add all templates
|
- name: add all templates
|
||||||
template: src={{item.src}} dest={{item.dest}} mode={{item.mode}}
|
template: src={{item.src}} dest={{item.dest}} mode={{item.mode}}
|
||||||
|
@ -36,11 +37,13 @@
|
||||||
vars:
|
vars:
|
||||||
weblate_admin_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/weblate_admin_password chars=ascii_letters,digits') }}"
|
weblate_admin_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/weblate_admin_password chars=ascii_letters,digits') }}"
|
||||||
weblate_postgres_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/weblate_postgres_password chars=ascii_letters,digits') }}"
|
weblate_postgres_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/weblate_postgres_password chars=ascii_letters,digits') }}"
|
||||||
|
influxdb_password: "{{ lookup('password', 'passwords/{{ inventory_hostname }}/influxdb_password chars=ascii_letters,digits') }}"
|
||||||
|
|
||||||
- name: copy all files
|
- name: copy all files
|
||||||
copy: src={{item.src}} dest={{item.dest}} mode={{item.mode}}
|
copy: src={{item.src}} dest={{item.dest}} mode={{item.mode}}
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'files/docker-compose.yml', dest: '/gitea/docker-compose.yml', mode: '0755' }
|
- { src: 'files/docker-compose.yml', dest: '/gitea/docker-compose.yml', mode: '0755' }
|
||||||
|
- { src: 'files/influxdb.conf', dest: '/gitea/influxdb.conf', mode: '0755' }
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
apt:
|
apt:
|
||||||
|
|
|
@ -2,3 +2,4 @@ GITEA_HOSTNAME={{ domain }}
|
||||||
WEBLATE_HOSTNAME=weblate.{{ domain }}
|
WEBLATE_HOSTNAME=weblate.{{ domain }}
|
||||||
WEBLATE_ADMIN_PASSWORD={{ weblate_admin_password }}
|
WEBLATE_ADMIN_PASSWORD={{ weblate_admin_password }}
|
||||||
WEBLATE_POSTGRES_PASSWORD={{ weblate_postgres_password }}
|
WEBLATE_POSTGRES_PASSWORD={{ weblate_postgres_password }}
|
||||||
|
INFLUXDB_WRITE_USER_PASSWORD={{ influxdb_password }}
|
||||||
|
|
|
@ -46,4 +46,8 @@ server {
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:3002;
|
proxy_pass http://127.0.0.1:3002;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /telegraf-input/ {
|
||||||
|
proxy_pass http://127.0.0.1:8086/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue