Split the `mc admin prometheus` page into subpages and add missing docs for `mc admin prometheus metrics`. Staged http://192.241.195.202:9000/staging/DOCS-1255/linux/reference/minio-mc-admin/mc-admin-prometheus.html Fixes https://github.com/minio/docs/issues/1255 --------- Co-authored-by: Ravind Kumar <ravind@min.io>
2.9 KiB
mc admin prometheus generate
minio
Table of Contents
mc admin prometheus generate
Description
The mc admin prometheus generate
command generates a
metrics scraping configuration file for use with Prometheus.
For more complete documentation on using MinIO with Prometheus, see
How to monitor MinIO server with Prometheus <minio-metrics-collect-using-prometheus>
Use mc admin
on MinIO Deployments Only
EXAMPLE
The following command generates a Prometheus scrape configuration
that collects bucket metrics from the deployment at alias
myminio
:
mc admin prometheus generate myminio bucket
SYNTAX
The command has the following syntax:
mc [GLOBALFLAGS] admin prometheus generate \
ALIAS \
[TYPE]
Parameters
ALIAS
The alias <mc alias>
of a configured MinIO deployment
for which the command generates a Prometheus-compatible configuration
file.
TYPE
The type of metrics to scrape.
RELEASE.2023-10-07T15-07-38Z
resource
metrics addedValid values are:
bucket
cluster
node
resource
If not specified, the command returns cluster metrics. Cluster metrics also include node metrics.
Global Flags
Example
Generate a scrape config for bucket metrics
Use mc admin prometheus generate
to generate a scrape
configuration that collects bucket metrics for a MinIO deployment:
mc admin prometheus generate ALIAS bucket
- Replace
ALIAS
with thealias <mc alias>
of the MinIO deployment.
The output resembles the following:
scrape_configs:
- job_name: minio-job-bucket
bearer_token: [auth token]
metrics_path: /minio/v2/metrics/bucket
scheme: http
static_configs:
- targets: ['localhost:9000']