]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/doc/prometheus.md
import quincy beta 17.1.0
[ceph.git] / ceph / src / seastar / doc / prometheus.md
1 # The Prometheus Protocol
2
3 Seastar supports the Prometheus protocol for metrics reporting.
4 Supported exposition formats are the 0.0.4 text and protocol buffer formats.
5
6 More on the formats can be found at the [Prometheus documentations](https://prometheus.io/docs/instrumenting/exposition_formats/)
7
8 By default, Seastar would listen on port `9180` and the `localhost`.
9
10 See the Seastar configuration documentation on how to change the default configuration.
11
12 Seastar would reply based on the content type header, so pointing your browser to:
13 `http://localhost:9180/metrics/` will return a text representation of the metrics with their documentation.
14
15 ## Querying sub set of the metrics
16 Seastar supports specifying querying a specific metric or a metrics group that share the same prefix.
17
18 This is support by both protocols versions.
19
20 For example to get all the http metrics in a text format, point your browser to:
21 `http://localhost:9180/metrics?name=http*` note the asterisk symbol following the http. The Seastar Prometheus API only supports prefix matching.
22
23 To query for only the http requests served metric, point your browser to `http://localhost:9180/metrics?name=httpd_requests_served`
24
25 ### Configuring the Prometheus server for picking specific metrics
26 The [Prometheus configuration](https://prometheus.io/docs/prometheus/1.8/configuration/configuration/) describes the general Prometheus configuration.
27
28 To specify a specific metric or metrics add a `metrics_path` to the scrap config in the prometheue.yml file
29
30 For example, the following scrap config, will query for all the http metrics:
31
32 ```
33 scrape_configs:
34 - job_name: http
35 honor_labels: true
36 metrics_path: /metrics
37 params:
38 name: 'http*'
39 ```
40