How to monitor the size of the "Held" message queue? #3473
Unanswered
zdeneksvarc
asked this question in
Help with using Postal
Replies: 1 comment
-
|
I'm sure a PR would be welcomed, I can't move this to Feature Suggestions because github is a delight You could source the information yourself from the database but not as cleanly as the way you're suggesting. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I’m setting up Prometheus and Grafana monitoring for Postal and need to monitor how many messages are currently in the “Held” state.
Current situation
/metricson ports 9090 and 9091 provide worker and SMTP statistics.ExpireHeldMessagesScheduledTaskmetric shows cleanup runs, but not how many messages are held.?state=Heldin/api/v1/messages(checked in the official API docs)./org/.../messages/heldadmin page lists held messages, but it’s not an API endpoint.Why this matters
Monitoring the size of the held queue is important for:
Suggested improvements
Expose a Prometheus metric, for example:
postal_messages_held_total
showing
Message.where(status: 'Held').count.Add an API filter parameter, e.g.:
/api/v1/messages?state=HeldCurrent workaround
/messages/held, orSELECT COUNT(*) FROM messages WHERE status = 'Held';Would you consider adding or documenting a supported way to retrieve the current “Held” queue size for monitoring purposes?
Beta Was this translation helpful? Give feedback.
All reactions