Il 01/05/25 20:17, Roy Smith ha scritto:
I want a graph vs time.. Which is what statsd/graphite was good at, so I assumed Prometheus would also be good at it. Why is this silly?
It's not silly at all! If you use standard Prometheus metrics and some labels, you can later also get some basic statistical analysis for free on Grafana.
What you described is called a Prometheus exporter. It would take the raw data (from the MediaWiki API?) and output the metrics in Prometheus format. You can hand-craft the metrics even in bash, but probably something like Python or Rust where you have both MediaWiki and Prometheus libraries will be easiest.
The pushgateway is the traditional solution for a batch job like this. I don't know how authentication etc. is handled in WMF though.
The metrics you described are mostly gauges. For things like the time spent sitting in queues, you may want a histogram (so you can calculate e.g. the 75th percentile or the longest-waiting proposal). This is definitely best done with a Prometheus library (but make sure to manually set the buckets to some reasonable intervals, probably in terms of hours and days, otherwise you might get some unhelpful defaults starting from ms).
https://www.robustperception.io/how-does-a-prometheus-histogram-work/ https://prometheus.io/docs/practices/histograms/ Best, Federico _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/