Another option would be pushing the counts into statsd. AIUI pushing a huge number of metrics to statsd is not nice, but we could 1) use it as a temporary solution while there are only 4 target wikis, 2) instead of a separate metric for each of the 64 ORES topics, have some sort of buckets (topics with 500+ tasks, topics with 400-499 tasks etc). Instead of an API we'd have to use a cronjob, or maybe push the numbers whenever someone actually searches for them (although that is more fragile). Graphing/dashboarding options would be more constrained but less work (via Grafana), and we'd get alerts for free.
Prometheus supports multi-dimensional data points so maybe that could be a longer term option? I don't know anything about Prometheus though so that's just a blind guess.
- Check with Ops about feasibility of this approach
- implement server-side code
- set up dashboard