Filippo Giunchedi has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/393605 )
Change subject: redis: use hostname not fqdn in redis_exporter
......................................................................
redis: use hostname not fqdn in redis_exporter
For consistency mostly with other Prometheus targets.
Bug: T148637
Change-Id: Ie674e68145729872a383a37c9144b00123f4a375
---
M modules/profile/manifests/prometheus/redis_exporter.pp
M modules/prometheus/manifests/redis_exporter.pp
M modules/prometheus/templates/redis_exporter_config.erb
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Filippo Giunchedi: Looks good to me, approved
diff --git a/modules/profile/manifests/prometheus/redis_exporter.pp
b/modules/profile/manifests/prometheus/redis_exporter.pp
index 9eb3af7..92f6b3b 100644
--- a/modules/profile/manifests/prometheus/redis_exporter.pp
+++ b/modules/profile/manifests/prometheus/redis_exporter.pp
@@ -20,7 +20,7 @@
define profile::prometheus::redis_exporter (
$password,
$prometheus_nodes,
- $hostname = $::fqdn,
+ $hostname = $::hostname,
$port = $title + 10000,
) {
::prometheus::redis_exporter { $title:
diff --git a/modules/prometheus/manifests/redis_exporter.pp
b/modules/prometheus/manifests/redis_exporter.pp
index 482a1f0..c5bc470 100644
--- a/modules/prometheus/manifests/redis_exporter.pp
+++ b/modules/prometheus/manifests/redis_exporter.pp
@@ -22,7 +22,7 @@
$instance = $title,
$arguments = '',
$password = '',
- $hostname = $::fqdn,
+ $hostname = $::hostname,
$port = '9121'
) {
require_package('prometheus-redis-exporter')
diff --git a/modules/prometheus/templates/redis_exporter_config.erb
b/modules/prometheus/templates/redis_exporter_config.erb
index ecb84f5..23ef7b4 100644
--- a/modules/prometheus/templates/redis_exporter_config.erb
+++ b/modules/prometheus/templates/redis_exporter_config.erb
@@ -8,7 +8,7 @@
cluster_hosts = val[@site].select { |host| @resources.include?(host) }
if cluster_hosts.length > 0
# For each host found, accumulate the resources we found for it into
- # targets in the title:port form.
+ # targets in the host:port form.
targets = []
cluster_hosts.each{ |host|
@resources[host].each{ |instance|
--
To view, visit https://gerrit.wikimedia.org/r/393605
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie674e68145729872a383a37c9144b00123f4a375
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits