add redis
This commit is contained in:
10
templates/conf/prometheus-redis-exporter.j2
Normal file
10
templates/conf/prometheus-redis-exporter.j2
Normal file
@ -0,0 +1,10 @@
|
||||
# {{ ansible_managed }}
|
||||
{% if (prometheus_redis_exporter_addr is defined) %}
|
||||
REDIS_ADDR={{ prometheus_redis_exporter_addr }}
|
||||
{% endif %}
|
||||
{% if (prometheus_redis_exporter_addr is defined) %}
|
||||
REDIS_USER={{ prometheus_redis_exporter_user }}
|
||||
{% endif %}
|
||||
{% if (prometheus_redis_exporter_addr is defined) %}
|
||||
REDIS_PASSWORD={{ prometheus_redis_exporter_password }}
|
||||
{% endif %}
|
@ -149,6 +149,7 @@ scrape_configs:
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_varnish_exporter_targets is defined %}
|
||||
# Varnish exporter #
|
||||
- job_name: varnish
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
@ -204,3 +205,14 @@ scrape_configs:
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_redis_exporter_targets is defined %}
|
||||
# Redis exporter #
|
||||
- job_name: redis
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_redis_exporter_targets %}
|
||||
- {{ target }}:9121
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
@ -1,10 +1,11 @@
|
||||
[Unit]
|
||||
Description=Prometheus Redis Exporter
|
||||
After=network.target
|
||||
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/prometheus-redis-exporter
|
||||
|
||||
EnvironmentFile=/etc/default/prometheus-redis-exporter
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user