Gergő Tisza has uploaded a new change for review.
https://gerrit.wikimedia.org/r/230263
Change subject: Fix script example in stats role documentation
......................................................................
Fix script example in stats role documentation
As it turns our tail -f is not a very good way to monitor a
file that gets regularly updated via truncation, because it tries
to be clever and find the point to continue and so the beginning
of the file gets cut off.
Change-Id: Id2e1a8f8002b4b8d81d6feeef8a1870e51fcbcdb
---
M puppet/modules/statsd/manifests/init.pp
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant
refs/changes/63/230263/1
diff --git a/puppet/modules/statsd/manifests/init.pp
b/puppet/modules/statsd/manifests/init.pp
index faf9f8c..9ee7171 100644
--- a/puppet/modules/statsd/manifests/init.pp
+++ b/puppet/modules/statsd/manifests/init.pp
@@ -4,8 +4,12 @@
#
# logs/statsd.log will contain the last flush (10 sec worth of data)
# in JSON format; you can process it with something like
-# tail -fn0 /vagrant/logs/statsd.json 2> /dev/null | \
-# jq '.counters | with_entries(select(.value!=0)) | select(.!=null)'
+# while inotifywait -qqe modify /vagrant/logs/statsd.json; do
+# cat /vagrant/logs/statsd.json | \
+# jq '.counters
+# | with_entries(select(.value!=0 and (.key|contains("MediaWiki"))))
+# | select(.!=null)'
+# done
# (this will output any counters that have been updated)
#
# === Parameters
--
To view, visit https://gerrit.wikimedia.org/r/230263
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2e1a8f8002b4b8d81d6feeef8a1870e51fcbcdb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits