[GH-ISSUE #62] Add metrics exposition #13

Closed
opened 2026-02-26 18:32:57 +03:00 by kerem · 4 comments
Owner

Originally created by @pomverte on GitHub (Feb 25, 2022).
Original GitHub issue: https://github.com/decke/smtprelay/issues/62

Hello,

Do you have any plan to support metrics expostion in openmetrics format ?

Are you open to contribution ?

That would allow monitoring services like Prometheus to scrape metrics

Reference : https://prometheus.io/docs/guides/go-application/

Originally created by @pomverte on GitHub (Feb 25, 2022). Original GitHub issue: https://github.com/decke/smtprelay/issues/62 Hello, Do you have any plan to support metrics expostion in openmetrics format ? Are you open to contribution ? That would allow monitoring services like Prometheus to scrape metrics Reference : https://prometheus.io/docs/guides/go-application/
kerem closed this issue 2026-02-26 18:32:57 +03:00
Author
Owner

@JonathonReinhart commented on GitHub (Feb 25, 2022):

@grafana has a fork where they added metrics for prometheus: https://github.com/grafana/smtprelay/pull/9/. They attempted to upstream all of their changes in #13, but it wasn't organized in a way we were willing to accept. In this comment I explained how I fixed up most of their work into individual PRs, but the Prometheus exporter was not included.

I'll let @decke confirm that he is willing to accept this feature. You may want to look at https://github.com/grafana/smtprelay/pull/9/ to avoid unnecessary work, and increase coherency within the network of forks.

cc @electron0zero @dannykopping

<!-- gh-comment-id:1051048425 --> @JonathonReinhart commented on GitHub (Feb 25, 2022): @grafana has [a fork](https://github.com/grafana/smtprelay) where they added metrics for prometheus: https://github.com/grafana/smtprelay/pull/9/. They attempted to upstream all of their changes in #13, but it wasn't organized in a way we were willing to accept. In [this comment](https://github.com/decke/smtprelay/pull/13#issuecomment-797957014) I explained how I fixed up most of their work into individual PRs, but the Prometheus exporter was not included. I'll let @decke confirm that he is willing to accept this feature. You may want to look at https://github.com/grafana/smtprelay/pull/9/ to avoid unnecessary work, and increase coherency within the network of forks. cc @electron0zero @dannykopping
Author
Owner

@decke commented on GitHub (Feb 26, 2022):

It's fine for me but since I don't use prometheus myself I likely won't notice if we break it one day.

<!-- gh-comment-id:1052119377 --> @decke commented on GitHub (Feb 26, 2022): It's fine for me but since I don't use prometheus myself I likely won't notice if we break it one day.
Author
Owner

@pomverte commented on GitHub (Feb 26, 2022):

Thank you for the answers !

Given that it's not your use case and this has already been done in grafana/smtprelay, I will take a look at thee fork and see if it suits my needs

I have another question concerning the project, does it support retry ?

I'm trying to evaluate if smtprelay can be setup between my service and another SMTP server (why ? It's not available as much as I'd like)


 ┌─────────┐      ┌───────────┐      ┌─────────────┐
 │ service ├─────►│ smtprelay ├──x──►│ smtp server │
 └─────────┘      └───────────┘      └─────────────┘

<!-- gh-comment-id:1052158762 --> @pomverte commented on GitHub (Feb 26, 2022): Thank you for the answers ! Given that it's not your use case and this has already been done in [grafana/smtprelay](https://github.com/grafana/smtprelay), I will take a look at thee fork and see if it suits my needs I have another question concerning the project, does it support retry ? I'm trying to evaluate if smtprelay can be setup between my service and another SMTP server (why ? It's not available as much as I'd like) ``` ┌─────────┐ ┌───────────┐ ┌─────────────┐ │ service ├─────►│ smtprelay ├──x──►│ smtp server │ └─────────┘ └───────────┘ └─────────────┘ ```
Author
Owner

@decke commented on GitHub (Feb 26, 2022):

smtprelay does not store and forward if that is your question. It forwards directly so retry is needed on the sending side.

<!-- gh-comment-id:1052235248 --> @decke commented on GitHub (Feb 26, 2022): smtprelay does not store and forward if that is your question. It forwards directly so retry is needed on the sending side.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/smtprelay#13
No description provided.