container: add switch for hcloud
This commit is contained in:
@@ -4,6 +4,7 @@ prometheus_scrape_interval: 5s
|
||||
prometheus_evaluation_interval: 15s
|
||||
prometheus_storage_retention: 3650d
|
||||
prometheus_install_grafana: false
|
||||
prometheus_hcloud_enabled: false
|
||||
prometheus_hcloud_relabel_configs: []
|
||||
|
||||
prometheus_install_alertmanager: true
|
||||
|
||||
@@ -19,10 +19,15 @@ argument_specs:
|
||||
type: str
|
||||
required: false
|
||||
default: 3650d
|
||||
prometheus_hcloud_token:
|
||||
description: Access token for hetzner cloud service discovery. It will be enabled if this variable is defined
|
||||
type: str
|
||||
prometheus_hcloud_enabled:
|
||||
description: Whether to use hcloud discovery
|
||||
type: bool
|
||||
required: false
|
||||
default: false
|
||||
prometheus_hcloud_token:
|
||||
description: Access token for hetzner cloud service discovery.
|
||||
type: str
|
||||
required: "{{ prometheus_hcloud_enabled }}"
|
||||
prometheus_hcloud_relabel_configs:
|
||||
description: Relabel configs for hcloud
|
||||
type: list
|
||||
|
||||
@@ -26,11 +26,11 @@ scrape_configs:
|
||||
static_configs:
|
||||
- targets: ["localhost:9090"]
|
||||
|
||||
{% if prometheus_hcloud_token is defined %}
|
||||
{% if prometheus_hcloud_enabled %}
|
||||
- job_name: hcloud
|
||||
hetzner_sd_configs:
|
||||
- role: hcloud
|
||||
authorization:
|
||||
credentials: {{ prometheus_hcloud_token }}
|
||||
relabel_configs: {{ prometheus_hcloud_relabel_configs }}
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
|
||||
Reference in New Issue
Block a user