Alexandros Kosiaris has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334367 )

Change subject: osm prometheus: Fix bug with hardcoded state file
......................................................................


osm prometheus: Fix bug with hardcoded state file

Use the variable instead.

Change-Id: Ib318d88049affd883cad8468346852f4466aaeca
---
M modules/osm/files/osm_sync_lag.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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 d27e475..e5a2a6c 100644
--- a/modules/osm/files/osm_sync_lag.sh
+++ b/modules/osm/files/osm_sync_lag.sh
@@ -6,7 +6,7 @@
 state_path=${1:-"/srv/osmosis/state.txt"}
 prometheus_path=${2:-"/var/lib/prometheus/node-exporter/osm_sync_lag.prom"}
 
-timestamp=$(awk -F= '/^timestamp=/ { print $2 }' state.txt | tr -d \\\\)
+timestamp=$(awk -F= '/^timestamp=/ { print $2 }' $state_path | tr -d \\\\)
 lag=$(date "+%s" --date=${timestamp})
 echo "osm_sync_timestamp" $lag > $prometheus_path.$$
 mv $prometheus_path.$$ $prometheus_path

-- 
To view, visit https://gerrit.wikimedia.org/r/334367
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib318d88049affd883cad8468346852f4466aaeca
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

Reply via email to