Skip to content

Commit

Permalink
Re-organized grafana dashboards (minio#19157)
Browse files Browse the repository at this point in the history
Moved different dashboards to their specific directories. Also
mentioned that these dashbards are examples of how to create
graphs using MinIO provided and metrics and customers should
change / add graphs on their specific need basis.

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
  • Loading branch information
shtripat authored Feb 29, 2024
1 parent d7520f0 commit f46bee2
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 5 deletions.
6 changes: 6 additions & 0 deletions docs/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ MinIO allows reading metrics for the entire cluster from any single node. This a
The additional node specific metrics which include additional go metrics or process metrics are exposed at
`<Address for MinIO Node>/minio/v2/metrics/node`.

The additional bucket specific metrics which include additional go metrics or process metrics are exposed at
`<Address for MinIO Node>/minio/v2/metrics/bucket`.

The additional resource specific metrics which include additional go metrics or process metrics are exposed at
`<Address for MinIO Node>/minio/v2/metrics/resource`.

To use this endpoint, setup Prometheus to scrape data from this endpoint. Read more on how to configure and use Prometheus to monitor MinIO server in [How to monitor MinIO server with Prometheus](https://github.com/minio/minio/blob/master/docs/metrics/prometheus/README.md).

### **Deprecated metrics monitoring**
Expand Down
39 changes: 38 additions & 1 deletion docs/metrics/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ minio server ~/test

> If MinIO is configured to expose metrics without authentication, you don't need to use `mc` to generate prometheus config. You can skip reading further and move to 3.2 section.
The Prometheus endpoint in MinIO requires authentication by default. Prometheus supports a bearer token approach to authenticate prometheus scrape requests, override the default Prometheus config with the one generated using mc. To generate a Prometheus config for an alias, use [mc](https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart) as follows `mc admin prometheus generate <alias>`.
The Prometheus endpoint in MinIO requires authentication by default. Prometheus supports a bearer token approach to authenticate prometheus scrape requests, override the default Prometheus config with the one generated using mc. To generate a Prometheus config for an alias, use [mc](https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart) as follows `mc admin prometheus generate <alias> [METRIC-TYPE]`. The valid values for METRIC-TYPE are `cluster`, `node`, `bucket` and `resource` and if not mentioned, it defaults to `cluster`.

The command will generate the `scrape_configs` section of the prometheus.yml as follows:

Expand All @@ -76,6 +76,28 @@ scrape_configs:
- targets: ['localhost:9000']
```
##### Node centric (optional)
```yaml
- job_name: minio-job-node
bearer_token: <secret>
metrics_path: /minio/v2/metrics/node
scheme: http
static_configs:
- targets: ['localhost:9000']
```
##### Resource centric (optional)
```yaml
- job_name: minio-job-resource
bearer_token: <secret>
metrics_path: /minio/v2/metrics/resource
scheme: http
static_configs:
- targets: ['localhost:9000']
```
#### 3.2 Public Prometheus config
If Prometheus endpoint authentication type is set to `public`. Following prometheus config is sufficient to start scraping metrics data from MinIO.
Expand Down Expand Up @@ -116,6 +138,19 @@ scrape_configs:
- targets: ['localhost:9000']
```

##### Resource (optional)

Optionally you can also collect resource metrics.

```yaml
scrape_configs:
- job_name: minio-job
metrics_path: /minio/v2/metrics/resource
scheme: http
static_configs:
- targets: ['localhost:9000']
```

### 4. Update `scrape_configs` section in prometheus.yml

To authorize every scrape request, copy and paste the generated `scrape_configs` section in the prometheus.yml and restart the Prometheus service.
Expand All @@ -140,6 +175,8 @@ After Prometheus is configured, you can use Grafana to visualize MinIO metrics.

- MinIO exports Prometheus compatible data by default as an authorized endpoint at `/minio/v2/metrics/cluster`.
- MinIO exports Prometheus compatible data by default which is bucket centric as an authorized endpoint at `/minio/v2/metrics/bucket`.
- MinIO exports Prometheus compatible data by default which is node centric as an authorized endpoint at `/minio/v2/metrics/node`.
- MinIO exports Prometheus compatible data by default which is resource centric as an authorized endpoint at `/minio/v2/metrics/resource`.

All of these can be accessed via Prometheus dashboard. A sample list of exposed metrics along with their definition is available on our public demo server at

Expand Down
10 changes: 6 additions & 4 deletions docs/metrics/prometheus/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ Refer to the dashboard [json file here](https://raw.githubusercontent.com/minio/

![Grafana](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/grafana-minio.png)

Replication metrics can be viewed in the Grafana dashboard using [json file here](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/minio-replication.json)
Replication metrics can be viewed in the Grafana dashboard using [json file here](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/replication/minio-replication.json)

![Grafana](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/grafana-replication.png)
![Grafana](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/replication/grafana-replication.png)

Bucket metrics can be viewed in the Grafana dashboard using [json file here](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/minio-bucket.json)
Bucket metrics can be viewed in the Grafana dashboard using [json file here](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/bubcket/minio-bucket.json)

![Grafana](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/grafana-bucket.png)
![Grafana](https://raw.githubusercontent.com/minio/minio/master/docs/metrics/prometheus/grafana/bucket/grafana-bucket.png)

Note: All these dashboards are provided as an example and need basis they should be customized as well as new graphs should be added.

0 comments on commit f46bee2

Please sign in to comment.