Refactor telegraf prometheus input
This commit is contained in:
parent
05014af744
commit
8a861e080b
2 changed files with 15 additions and 5 deletions
roles/telegraf/templates
|
@ -18,12 +18,19 @@
|
|||
|
||||
[[inputs.prometheus]]
|
||||
urls = [
|
||||
{%- for url in svc.prometheus.urls -%}
|
||||
{%- for url in svc.prometheus_unprotected.urls -%}
|
||||
"{{ url }}",
|
||||
{%- endfor -%}
|
||||
]
|
||||
|
||||
bearer_token_string = "{{ svc.prometheus.bearer_token }}"
|
||||
[[inputs.prometheus]]
|
||||
urls = [
|
||||
{%- for url in svc.prometheus_protected.urls -%}
|
||||
"{{ url }}",
|
||||
{%- endfor -%}
|
||||
]
|
||||
|
||||
bearer_token_string = "{{ svc.prometheus_protected.bearer_token }}"
|
||||
|
||||
[[inputs.postgresql]]
|
||||
address = "postgres://{{ svc.postgresql.user }}:{{ svc.postgresql.pass }}@{{ svc.postgresql.host }}:{{ svc.postgresql.port }}/{{ svc.postgresql.database }}?sslmode=verify-full"
|
||||
|
|
Reference in a new issue