Alexandros Kosiaris has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/399397 )
Change subject: prometheus: Define $postgresql_jobs and use it
......................................................................
prometheus: Define $postgresql_jobs and use it
Forgotten as an entry before. Also fix the missing underscore issue
Change-Id: I8951decedd0b71330e6408cd3a5951d59c4985e1
---
M modules/role/manifests/prometheus/ops.pp
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Alexandros Kosiaris: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/role/manifests/prometheus/ops.pp
b/modules/role/manifests/prometheus/ops.pp
index 07e2cbe..1373e1e 100644
--- a/modules/role/manifests/prometheus/ops.pp
+++ b/modules/role/manifests/prometheus/ops.pp
@@ -777,8 +777,17 @@
# Gather postgresql metrics from hosts having the
# prometheus::postgres_exporter class defined
+ $postgresql_jobs = [
+ {
+ 'job_name' => 'postgresql',
+ 'scheme' => 'http',
+ 'file_sd_configs' => [
+ { 'files' => [ "${targets_path}/postgresql_*.yaml" ]}
+ ],
+ },
+ ]
prometheus::class_config{ "postgresql_${::site}":
- dest => "${targets_path}/postgresql${::site}.yaml",
+ dest => "${targets_path}/postgresql_${::site}.yaml",
site => $::site,
class_name => 'prometheus::postgres_exporter',
port => '9187',
@@ -796,7 +805,7 @@
$nginx_jobs, $pybal_jobs, $blackbox_jobs, $jmx_exporter_jobs,
$redis_jobs, $mtail_jobs, $ldap_jobs, $ircd_jobs, $pdns_rec_jobs,
$etherpad_jobs, $elasticsearch_jobs, $wdqs_updater_jobs,
- $blazegraph_jobs, $nutcracker_jobs,
+ $blazegraph_jobs, $nutcracker_jobs, $postgresql_jobs
),
global_config_extra => $config_extra,
}
--
To view, visit https://gerrit.wikimedia.org/r/399397
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8951decedd0b71330e6408cd3a5951d59c4985e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits