map file into container

This commit is contained in:
m0duspwnens
2021-07-06 17:12:21 -04:00
parent 03066c4674
commit 35f10518b2
2 changed files with 4 additions and 1 deletions

View File

@@ -839,7 +839,7 @@
{% endif %}
{% if grains.role in ['so-manager', 'so-managersearch', 'so-standalone', 'so-eval'] %}
[[inputs.file]]
files = ["/host/opt/so/conf/telegraf/nodes_config.json"]
files = ["/etc/telegraf/nodes_config.json"]
name_override = "nodes_config"
data_format = "json"
interval = "5m"

View File

@@ -66,6 +66,9 @@ so-telegraf:
- binds:
- /opt/so/log/telegraf:/var/log/telegraf:rw
- /opt/so/conf/telegraf/etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro
{% if grains.role in ['so-manager', 'so-managersearch', 'so-standalone', 'so-eval'] %}
- /opt/so/conf/telegraf/nodes_config.json:/etc/telegraf/nodes_config.json:ro
{% endif %}
- /var/run/utmp:/var/run/utmp:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/host/root:ro