Refactor telegraf prometheus input
This commit is contained in:
parent
05014af744
commit
8a861e080b
2 changed files with 15 additions and 5 deletions
|
@ -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"
|
||||
|
|
|
@ -6,12 +6,15 @@ telegraf_svc:
|
|||
token: "{{ vault_telegraf.influxdb_token }}"
|
||||
organization: serguzim.net
|
||||
bucket: metrics
|
||||
prometheus:
|
||||
prometheus_unprotected:
|
||||
urls:
|
||||
- https://matrix.msrg.cc/_synapse/metrics
|
||||
- https://push.serguzim.me/metrics
|
||||
- https://tick.serguzim.me/metrics
|
||||
prometheus_protected:
|
||||
urls:
|
||||
- https://ci.serguzim.me/metrics
|
||||
- https://git.serguzim.me/metrics
|
||||
- https://matrix.msrg.cc/_synapse/metrics
|
||||
- https://tick.serguzim.me/metrics
|
||||
bearer_token: "{{ vault_metrics_token }}"
|
||||
postgresql:
|
||||
user: "{{ vault_telegraf.db.user }}"
|
||||
|
|
Reference in a new issue