Alexandros Kosiaris has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/344343 )
Change subject: osm: Specify the prometheus_path variable correctly
......................................................................
osm: Specify the prometheus_path variable correctly
The textfile exporter directory is node.d as it turns out. Change it
throughout and use it correctly in the osm::prometheus class
Change-Id: Iee48bffab48163701c8b09fe072d2cc12f910152
---
M modules/osm/files/osm_sync_lag.sh
M modules/osm/manifests/prometheus.pp
M modules/role/manifests/osm/master.pp
3 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/osm/files/osm_sync_lag.sh
b/modules/osm/files/osm_sync_lag.sh
index e5a2a6c..23085da 100644
--- a/modules/osm/files/osm_sync_lag.sh
+++ b/modules/osm/files/osm_sync_lag.sh
@@ -4,7 +4,7 @@
set -u
state_path=${1:-"/srv/osmosis/state.txt"}
-prometheus_path=${2:-"/var/lib/prometheus/node-exporter/osm_sync_lag.prom"}
+prometheus_path=${2:-"/var/lib/prometheus/node.d/osm_sync_lag.prom"}
timestamp=$(awk -F= '/^timestamp=/ { print $2 }' $state_path | tr -d \\\\)
lag=$(date "+%s" --date=${timestamp})
diff --git a/modules/osm/manifests/prometheus.pp
b/modules/osm/manifests/prometheus.pp
index 5306ff2..052c9bc 100644
--- a/modules/osm/manifests/prometheus.pp
+++ b/modules/osm/manifests/prometheus.pp
@@ -16,6 +16,6 @@
cron { 'osm_sync_lag':
ensure => $ensure,
- command => "/usr/bin/osm_sync_lag ${state_path} >/dev/null 2>&1",
+ command => "/usr/bin/osm_sync_lag ${state_path} ${prometheus_path}
>/dev/null 2>&1",
}
}
diff --git a/modules/role/manifests/osm/master.pp
b/modules/role/manifests/osm/master.pp
index 36cf9d6..74d1b4c 100644
--- a/modules/role/manifests/osm/master.pp
+++ b/modules/role/manifests/osm/master.pp
@@ -38,7 +38,7 @@
}
class { 'osm::prometheus':
state_path => '/srv/osmosis/state.txt',
- prometheus_path =>
'/var/lib/prometheus/node-exporter/osm_sync_lag.prom',
+ prometheus_path => '/var/lib/prometheus/node.d/osm_sync_lag.prom',
}
system::role { 'role::osm::master':
--
To view, visit https://gerrit.wikimedia.org/r/344343
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iee48bffab48163701c8b09fe072d2cc12f910152
Gerrit-PatchSet: 2
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