mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 00:03:29 +03:00
c46b16ec62
The transitional references land in one commit, because they are only correct together: the repository is pgsty/silo, its default branch is main, and nothing in the tree should point a user at the old names. Changed: - Workflow branch filters. go.yml and vulncheck.yml gated on `branches: master` for both push and pull_request, so renaming the default branch would have taken automatic CI offline with no error and no signal - the workflows would simply never trigger again. They now name main. - Release target. goreleaser's `release.github.name` becomes silo, which is what actually decides where a tagged build publishes. sign-release-rpms.sh's GH_REPO default follows. - The OCI `image.source` label, the Helm chart `sources` entry, the security advisory link in the issue-template config, and the go.mod comment citing the LDAP TLS fix. - 115 occurrences across README, README_ZH, SECURITY, CONTRIBUTING and 30 docs pages, including 72 links that also carried the master branch in their path. Those matter most: GitHub redirects clone, fetch, push and web URLs after a rename, but raw.githubusercontent.com does not, and neither follows a branch rename - every one of those links would 404 twice over. - Three error strings in cmd/erasure-sets.go, cmd/storage-errors.go and internal/config/errors.go that print an issue URL to operators. These are Go string literals inside rebrand-guard's brand allowlist, so the baseline is regenerated. The regeneration removes exactly those three entries and adds none; all twelve other protected sets, including the 9014 exported symbols, are byte-identical. - The transitional-naming disclaimers in README, README_ZH, SECURITY and CONTRIBUTING are dropped, since they no longer describe anything. Deliberately unchanged, all three because they exist to reject or freeze the old name rather than to point at it: - buildscripts/minio-upgrade.sh pins pgsty/minio@sha256:b6bfe72... - the frozen pre-rebrand image is the control group for the MinIO-to-Silo upgrade test. - helm-migration-guard rejects any rendered container still pulling pgsty/minio. - verify-rebrand.sh rejects the same in the delivery surfaces. Also unchanged: docs/config/README.md links to pgsty/mc/blob/master, and that repository's default branch really is still master. It moves when mc does. verify-rebrand.sh gains three assertions so this cannot silently regress: no source reference may name pgsty/minio outside the three allowlisted guards, no link may target pgsty/silo's master branch, and go.yml and vulncheck.yml must filter on main. Both new rejections were negative-tested - reintroducing a master branch filter and adding a pgsty/minio URL each fail the gate with the specific message. This commit assumes the rename actually happens. Until the GitHub branch and repository renames are executed, the links it introduces do not resolve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
197 lines
6.9 KiB
Markdown
197 lines
6.9 KiB
Markdown
# How to monitor Silo server with Prometheus?
|
|
|
|
[Prometheus](https://prometheus.io) is a cloud-native monitoring platform. Prometheus offers a multi-dimensional data model with time series data identified by metric name and key/value pairs. The data collection happens via a pull model over HTTP/HTTPS. Users looking to monitor their Silo instances can point Prometheus configuration to scrape data from following endpoints.
|
|
|
|
- Silo exports Prometheus compatible data by default as an authorized endpoint at `/minio/v2/metrics/cluster`.
|
|
- Silo exports Prometheus compatible data by default which is bucket centric as an authorized endpoint at `/minio/v2/metrics/bucket`.
|
|
|
|
This document explains how to setup Prometheus and configure it to scrape data from Silo servers.
|
|
|
|
## Prerequisites
|
|
|
|
To get started with Silo, refer [Silo QuickStart Document](https://silo.pgsty.com/operations/deployments/baremetal-deploy-minio-on-redhat-linux/).
|
|
Follow below steps to get started with Silo monitoring using Prometheus.
|
|
|
|
### 1. Download Prometheus
|
|
|
|
[Download the latest release](https://prometheus.io/download) of Prometheus for your platform, then extract it
|
|
|
|
```sh
|
|
tar xvfz prometheus-*.tar.gz
|
|
cd prometheus-*
|
|
```
|
|
|
|
Prometheus server is a single binary called `prometheus` (or `prometheus.exe` on Microsoft Windows). Run the binary and pass `--help` flag to see available options
|
|
|
|
```sh
|
|
./prometheus --help
|
|
usage: prometheus [<flags>]
|
|
|
|
The Prometheus monitoring server
|
|
|
|
. . .
|
|
```
|
|
|
|
Refer [Prometheus documentation](https://prometheus.io/docs/introduction/first_steps/) for more details.
|
|
|
|
### 2. Configure authentication type for Prometheus metrics
|
|
|
|
Silo supports two authentication modes for Prometheus either `jwt` or `public`, by default Silo runs in `jwt` mode. To allow public access without authentication for prometheus metrics set environment as follows.
|
|
|
|
```
|
|
export MINIO_PROMETHEUS_AUTH_TYPE="public"
|
|
silo server ~/test
|
|
```
|
|
|
|
### 3. Configuring Prometheus
|
|
|
|
#### 3.1 Authenticated Prometheus config
|
|
|
|
> If Silo 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 Silo 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://silo.pgsty.com/reference/minio-mc/#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:
|
|
|
|
##### Cluster
|
|
|
|
```yaml
|
|
scrape_configs:
|
|
- job_name: silo-job
|
|
bearer_token: <secret>
|
|
metrics_path: /minio/v2/metrics/cluster
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['localhost:9000']
|
|
```
|
|
|
|
##### Bucket centric
|
|
|
|
```yaml
|
|
- job_name: silo-job-bucket
|
|
bearer_token: <secret>
|
|
metrics_path: /minio/v2/metrics/bucket
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['localhost:9000']
|
|
```
|
|
|
|
##### Node centric (optional)
|
|
|
|
```yaml
|
|
- job_name: silo-job-node
|
|
bearer_token: <secret>
|
|
metrics_path: /minio/v2/metrics/node
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['localhost:9000']
|
|
```
|
|
|
|
##### Resource centric (optional)
|
|
|
|
```yaml
|
|
- job_name: silo-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 Silo.
|
|
This can be collected from any server once per collection.
|
|
|
|
##### Cluster
|
|
|
|
```yaml
|
|
scrape_configs:
|
|
- job_name: silo-job
|
|
metrics_path: /minio/v2/metrics/cluster
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['localhost:9000']
|
|
```
|
|
|
|
#### Bucket centric
|
|
|
|
```yaml
|
|
scrape_configs:
|
|
- job_name: silo-job-bucket
|
|
metrics_path: /minio/v2/metrics/bucket
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['localhost:9000']
|
|
```
|
|
|
|
##### Node (optional)
|
|
|
|
Optionally you can also collect per node metrics. This needs to be done on a per server instance.
|
|
The scrape configurations should use all the servers under `targets` so that graphing systems like
|
|
grafana can visualize them for all the nodes
|
|
|
|
```yaml
|
|
scrape_configs:
|
|
- job_name: silo-job
|
|
metrics_path: /minio/v2/metrics/node
|
|
scheme: http
|
|
static_configs:
|
|
- targets: ['server1:9000','server2:9000','server3:9000','server4:9000']
|
|
```
|
|
|
|
##### Resource (optional)
|
|
|
|
Optionally you can also collect resource metrics.
|
|
|
|
```yaml
|
|
scrape_configs:
|
|
- job_name: silo-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.
|
|
|
|
### 5. Start Prometheus
|
|
|
|
Start (or) Restart Prometheus service by running
|
|
|
|
```sh
|
|
./prometheus --config.file=prometheus.yml
|
|
```
|
|
|
|
Here `prometheus.yml` is the name of configuration file. You can now see Silo metrics in Prometheus dashboard. By default Prometheus dashboard is accessible at `http://localhost:9090`.
|
|
|
|
Prometheus sets the `Host` header to `domain:port` as part of HTTP operations against the Silo metrics endpoint. For Silo deployments behind a load balancer, reverse proxy, or other control plane (HAProxy, nginx, pfsense, opnsense, etc.), ensure the network service supports routing these requests to the deployment.
|
|
|
|
### 6. Configure Grafana
|
|
|
|
After Prometheus is configured, you can use Grafana to visualize Silo metrics. Refer the [document here to setup Grafana with Silo prometheus metrics](https://github.com/pgsty/silo/blob/main/docs/metrics/prometheus/grafana/README.md).
|
|
|
|
## List of metrics exposed by Silo
|
|
|
|
- Silo exports Prometheus compatible data by default as an authorized endpoint at `/minio/v2/metrics/cluster`.
|
|
- Silo exports Prometheus compatible data by default which is bucket centric as an authorized endpoint at `/minio/v2/metrics/bucket`.
|
|
- Silo exports Prometheus compatible data by default which is node centric as an authorized endpoint at `/minio/v2/metrics/node`.
|
|
- Silo 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. For a local deployment configured
|
|
with public metrics, inspect the compatibility route directly:
|
|
|
|
```sh
|
|
curl http://127.0.0.1:9000/minio/v2/metrics/cluster
|
|
```
|
|
|
|
### List of metrics reported Cluster and Bucket level
|
|
|
|
[The list of metrics reported can be here](https://github.com/pgsty/silo/blob/main/docs/metrics/prometheus/list.md)
|
|
|
|
### Configure Alerts for Prometheus
|
|
|
|
[The Prometheus AlertManager and alerts can be configured following this](https://github.com/pgsty/silo/blob/main/docs/metrics/prometheus/alerts.md)
|