Skip to content

Commit

Permalink
docs: Add Metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Lauhoff <[email protected]>
  • Loading branch information
Marcel Lauhoff committed Oct 11, 2023
1 parent f247d15 commit 3857a86
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docs/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[//]: <> (cSpell:ignoreRegExp /rgw[-_]\w+/)

# Metrics

S3GW metrics leverage the Ceph [Perf
Counters](https://docs.ceph.com/en/latest/dev/perf_counters/) system
already built into RGW.

On top of Perf Counters we export additional 1D Prometheus-style
histograms (Ceph's histograms are 2D) using a built in Prometheus
endpoint part of the status frontend.

The prometheus endpoint implementation is separate from [Ceph
Exporter](https://github.com/digitalocean/ceph_exporter) or the Ceph
Mgr [Prometheus
Module](https://docs.ceph.com/en/latest/mgr/prometheus/).

## Status Frontend

s3gw supports an additional RGW frontend *status* offering a read-only
view into the application's state. The frontend is optional and can be
activated aside the beast frontend doing the S3 HTTP.

Most status frontend pages are text-based and meant for human
consumption. An exception is the Prometheus endpoint exporting perf
counters as [Prometheus Exposition
Format](https://prometheus.io/docs/instrumenting/exposition_formats/)

To enable the status frontend including the Prometheus endpoint, add
the `status` frontend to
[`rgw_frontends`](https://docs.ceph.com/en/quincy/radosgw/config-ref/#confval-rgw_frontends)
. On the command line this may look like:

```sh
--rgw-frontends 'beast port=7480, status bind=127.0.0.1 port=9090'
```

## Dashboard

A S3GW dashboard is available on Grafana Hub with ID 19544.

- [Grafana Dashboard](https://grafana.com/grafana/dashboards/19544-s3gw/)

## Prometheus Scraping Setup

The Prometheus endpoint is available on the status frontend address at `/prometheus`

Example configuration:

```yaml
scrape_configs:
- job_name: 's3gw-status'
metrics_path: '/prometheus'
static_configs:
- targets:
- 127.0.0.1:9090
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ nav:
- Testing the s3gw: "testing.md"
- UI: "ui.md"
- S3 API compatibility table: "s3-compatibility-table.md"
- Metrics: "metrics.md"
- "Team Decisions":
- Use markdown any decision records: "decisions/0000-use-markdown-any-decision-records.md"
- Reorganize documentation: "decisions/0001-reorganize-documentation.md"
Expand Down

0 comments on commit 3857a86

Please sign in to comment.