[ 
https://issues.apache.org/jira/browse/HDDS-16019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100486#comment-18100486
 ] 

Ethan Rose commented on HDDS-16019:
-----------------------------------

Looks like we're discussing [this 
block|https://github.com/apache/ozone/blob/dc1fd833496be950a9b58a869172c33f40252440/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java#L157].
 Moving that to a shared helper that adds prom support to an existing 
HttpServer2 instance looks good. The httpfs gateway should also follow the 
[hdds.prometheus.endpoint.enabled|https://github.com/apache/ozone/blob/15216f2c7d578ceb69a55e8071e0f3925d0c38e0/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java#L138]
 config key.

> Publish httpfs gateway metrics to Prometheus via /prom endpoint
> ---------------------------------------------------------------
>
>                 Key: HDDS-16019
>                 URL: https://issues.apache.org/jira/browse/HDDS-16019
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: arun kumar
>            Assignee: arun kumar
>            Priority: Major
>
> HttpFSServerWebServer builds an HttpServer2 directly rather than
> extending BaseHttpServer, so unlike OM, SCM, Datanode, S3 Gateway,
> and Recon it does not expose a /prom endpoint. As a result the
> metrics already registered on the httpfs JVM (e.g. HttpFSServerMetrics)
> cannot be scraped by Prometheus, and httpfs is absent from
> compose/ozone/prometheus.yml and from component-grouped Grafana
> dashboards.
>  
> {{Proposed change:}}
>  * Register a PrometheusMetricsSink and add the PrometheusServlet at
> /prom in HttpFSServerWebServer, following the pattern in
> BaseHttpServer (guarded by hdds.prometheus.endpoint.enabled). 
>  * Register the sink with DefaultMetricsSystem on start(), unregister
> on stop().
>  * Ensure /prom respects the same authentication guarantees as the
> other services in secure mode (not exposed unauthenticated).
>  
> Note: BaseHttpServer.PROMETHEUS_SINK is currently package-private;
> exposing /prom from the httpfs package needs either that constant
> made public or the wiring extracted into a shared helper. Open to
> either – will confirm on review.
>  
> This is a prerequisite for HDDS-15858 (build info metrics + ZDU
> dashboard), which will add the httpfs scrape target and build info
> on top once /prom exists.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to