[
https://issues.apache.org/jira/browse/JAMES-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benoit Tellier updated JAMES-3405:
----------------------------------
Description:
= Why ?
I want to export James metrics to prometheus.
This modern metric stack relies on pulling (prometheus collects the metrics)
instead of pushing.
This need had been expressed by [~ieugen] here:
https://github.com/ieugen/james-self-hosting-sandbox/issues/20
= How ?
With the https://github.com/prometheus/client_java dependency expose that as
part of a `webadmin-metrics` Unauthentictated endpoint.
Adapt content at
https://github.com/prometheus/client_java/blob/master/simpleclient_servlet/src/main/java/io/prometheus/client/exporter/MetricsServlet.java
Be aware that there is some conversion format to be done here:
{code:java}
CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry;
new DropwizardExports(environment.metrics()).register(collectorRegistry);
new MetricsServlet(collectorRegistry)
{code}
Source
https://stackoverflow.com/questions/53408121/which-metrics-are-exported-by-dropwizardmetrics-prometheus-client
= Definition of done
{code:java}
As an admin,
I have an HTTP endpoint
Exposing metrics with the prometheus format
{code}
Scope: all guice products
This endpoint should require no authentication in order to be easily fetchable
by prometheus.
However as an admin, I need to explicitly enable it in the webadmin
configuration, it is disabled by default.
was:
= Why ?
I want to export James metrics to prometheus.
This modern metric stack relies on pulling (prometheus collects the metrics)
instead of pushing.
This need had been expressed by [~ieugen] here:
https://github.com/ieugen/james-self-hosting-sandbox/issues/20
= How ?
With the https://github.com/prometheus/client_java dependency expose that as
part of a `webadmin-metrics` Unauthentictated endpoint.
Adapt content at
https://github.com/prometheus/client_java/blob/master/simpleclient_servlet/src/main/java/io/prometheus/client/exporter/MetricsServlet.java
Be aware that there is some conversion format to be done here:
{code:java}
CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry;
new DropwizardExports(environment.metrics()).register(collectorRegistry);
new MetricsServlet(collectorRegistry)
{code}
Source
https://stackoverflow.com/questions/53408121/which-metrics-are-exported-by-dropwizardmetrics-prometheus-client
= Definition of done
{code:java}
As an admin,
I have an HTTP endpoint
Exposing metrics with the prometheus format
{code}
Scope: all guice products
> Expose metrics over HTTP
> ------------------------
>
> Key: JAMES-3405
> URL: https://issues.apache.org/jira/browse/JAMES-3405
> Project: James Server
> Issue Type: Improvement
> Components: guice, Metrics, webadmin
> Reporter: Benoit Tellier
> Priority: Major
> Fix For: 3.6.0
>
>
> = Why ?
> I want to export James metrics to prometheus.
> This modern metric stack relies on pulling (prometheus collects the metrics)
> instead of pushing.
> This need had been expressed by [~ieugen] here:
> https://github.com/ieugen/james-self-hosting-sandbox/issues/20
> = How ?
> With the https://github.com/prometheus/client_java dependency expose that as
> part of a `webadmin-metrics` Unauthentictated endpoint.
> Adapt content at
> https://github.com/prometheus/client_java/blob/master/simpleclient_servlet/src/main/java/io/prometheus/client/exporter/MetricsServlet.java
> Be aware that there is some conversion format to be done here:
> {code:java}
> CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry;
> new DropwizardExports(environment.metrics()).register(collectorRegistry);
> new MetricsServlet(collectorRegistry)
> {code}
> Source
> https://stackoverflow.com/questions/53408121/which-metrics-are-exported-by-dropwizardmetrics-prometheus-client
> = Definition of done
> {code:java}
> As an admin,
> I have an HTTP endpoint
> Exposing metrics with the prometheus format
> {code}
> Scope: all guice products
> This endpoint should require no authentication in order to be easily
> fetchable by prometheus.
> However as an admin, I need to explicitly enable it in the webadmin
> configuration, it is disabled by default.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]