[
https://issues.apache.org/jira/browse/MESOS-6918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086917#comment-16086917
]
James Peach commented on MESOS-6918:
------------------------------------
Implementation notes:
* I'm proposing this only for the {{/metrics/snapshot}} endpoint
* Prometheus (at least v2) doesn't send an {{Accept}} header, so we can't mux
on that to produce Prometheus output. We need to require a separate endpoint or
query parameter.
* [~klueska] suggests using a query parameter to explicitly request Prometheus
output
* The standard endpoint for exporters is {{/metrics}} (this is the prometheus
configuration default)
* The mapping from {{Accept}} to exposition format is done in
[expfmt.Negotiate|https://github.com/prometheus/common/blob/9a94032291f2192936512bab367bc45e77990d6a/expfmt/encode.go#L41].
The text format is the default.
* As per [#2788|https://github.com/prometheus/prometheus/issues/2788],
Prometheus v2 doesn't support the protobuf exposition; {{text/html+gzip}} is
recommended.
* Prometheus does send a {{Accept-Encoding: gzip}} header.
* Prometheus will send the {{X-Prometheus-Scrape-Timeout-Seconds}} header with
the request timeout it is planning to use.
> Prometheus exporter endpoints for metrics
> -----------------------------------------
>
> Key: MESOS-6918
> URL: https://issues.apache.org/jira/browse/MESOS-6918
> Project: Mesos
> Issue Type: Bug
> Components: statistics
> Reporter: James Peach
> Assignee: James Peach
>
> There are a couple of [Prometheus|https://prometheus.io] metrics exporters
> for Mesos, of varying quality. Since the Mesos stats system actually knows
> about statistics data types and semantics, and Mesos has reasonable HTTP
> support we could add Prometheus metrics endpoints to directly expose
> statistics in [Prometheus wire
> format|https://prometheus.io/docs/instrumenting/exposition_formats/],
> removing the need for operators to run separate exporter processes.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)