Prometheus mailman_exporter
Folks,
I have recently been playing with Prometheus metrics, and having now coded a mailman3 Prometheus exporter in python I thought I'd mention here that it exists. It's not fancy and there is more to do. It works using the rest api.
Source available at https://github.com/rivimey/mailman3_exporter
Metrics exposed: 'mailman_up' (does the API /system/versions return http 200) and 'mailman_queues' (queue lengths for each queue, plus 'status' for the http status code of that query)
Suggestions for other metrics would be interesting if accompanied with info on how to extract it. I'm currently contemplating including the number of 'to be moderated' messages. It would be possible to include the number of lists or domains but not sure it's useful enough to be worth the cost of fetching it.
It is passed the api auth data separately. It would be better to read it from mm config: is there existing code I can call?
Regards, Ruth
-- Software Manager & Engineer Tel: 01223 414180 Blog: http://www.ivimey.org/blog LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/
On 19-Apr-22 06:41, Ruth Ivimey-Cook wrote:
I'm currently contemplating including the number of 'to be moderated' messages.
FWIW: This is likely to be most useful per-list (or per-moderator if a mod covers multiple lists). As a global stat, except where there's only one person, it doesn't seem particularly helpful - The point would seem to be to push a neglectful moderator or invoke anti-spambot measures.
possible to include the number of lists or domains but not sure it's useful enough to be worth the cost of fetching it. This seems like the kind of information that could be profitably cached
- especially if there were a cheap configuration serial number (or even last configuration modification time) maintained by mm3. If there isn't a cheap way to detect a configuration change, it might be a reasonable feature request. Configuration data typically doesn't change frequently. And besides statistics, configuration changes could be used to trigger security events, backups, or...
It is unfortunate that the REST API has been performance-challenged since its inception...
participants (2)
-
Ruth Ivimey-Cook
-
tlhackque