Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/302904
Change subject: prometheus: add mysql job configuration ...................................................................... prometheus: add mysql job configuration The idea being that since each mysql 'group' has a related function, each gets its own job. Aggregation can still be performed across jobs by e.g. selecting all jobs prefixed with 'mysql-'. Bug: T126757 Change-Id: Id59d8b19eb986210514fa7ded4f716d202da8d46 --- M modules/role/manifests/prometheus/ops.pp 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/302904/1 diff --git a/modules/role/manifests/prometheus/ops.pp b/modules/role/manifests/prometheus/ops.pp index 698f4ba..a934b98 100644 --- a/modules/role/manifests/prometheus/ops.pp +++ b/modules/role/manifests/prometheus/ops.pp @@ -1,8 +1,45 @@ class role::prometheus::ops { include base::firewall + $targets_path = '/srv/prometheus/ops/targets' + + # Add one job for each of mysql 'group' (i.e. their broad function) + $mysql_jobs = [ + { + 'job_name' => 'mysql-core', + 'file_sd_configs' => [ + { 'names' => [ "${targets_path}/mysql-core_*.yaml"] }, + ] + }, + { + 'job_name' => 'mysql-dbstore', + 'file_sd_configs' => [ + { 'names' => [ "${targets_path}/mysql-dbstore_*.yaml"] }, + ] + }, + { + 'job_name' => 'mysql-labs', + 'file_sd_configs' => [ + { 'names' => [ "${targets_path}/mysql-labs_*.yaml"] }, + ] + }, + { + 'job_name' => 'mysql-misc', + 'file_sd_configs' => [ + { 'names' => [ "${targets_path}/mysql-misc_*.yaml"] }, + ] + }, + { + 'job_name' => 'mysql-parsercache', + 'file_sd_configs' => [ + { 'names' => [ "${targets_path}/mysql-parsercache_*.yaml"] }, + ] + }, + ] + prometheus::server { 'ops': listen_address => '127.0.0.1:9900', + scrape_configs_extra => $mysql_jobs, } prometheus::web { 'ops': -- To view, visit https://gerrit.wikimedia.org/r/302904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id59d8b19eb986210514fa7ded4f716d202da8d46 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits