Defined Type: profile::prometheus::redis_exporter
- Defined in:
- modules/profile/manifests/prometheus/redis_exporter.pp
Overview
Define profile::prometheus::redis_exporter
Install an instance of prometheus-redis-exporter.
- title
-
The port redis server is listening on
- password
-
The password to be used to access redis.
- hostname
-
The hostname for redis-exporter to listen on.
- port
-
The port for redis-exporter to listen on.
- prometheus_nodes
-
A list of hosts to allow access to redis-exporter
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'modules/profile/manifests/prometheus/redis_exporter.pp', line 20
define profile::prometheus::redis_exporter (
String $password,
Array[Stdlib::Host] $prometheus_nodes,
Stdlib::Host $hostname = $::hostname,
Stdlib::Port $port = $title + 10000,
String $arguments = '',
){
::prometheus::redis_exporter { $title:
hostname => $hostname,
port => $port,
password => $password,
arguments => $arguments,
}
$prometheus_nodes_ferm = join($prometheus_nodes, ' ')
ferm::service { "redis_exporter_${title}":
proto => 'tcp',
port => $port,
srange => "(@resolve((${prometheus_nodes_ferm})) @resolve((${prometheus_nodes_ferm}), AAAA))",
}
}
|