rpk generate prometheus-config
Generate the Prometheus configuration to scrape Redpanda nodes. This command’s output should be added to the scrape_configs
array in your Prometheus instance’s YAML config file.
If --seed-addr
is passed, it will be used to discover the rest of the cluster
hosts via Redpanda’s Kafka API. If --node-addrs
is passed, they will be used directly. Otherwise, rpk generate prometheus-conf
will read the Redpanda
config file and use the node IP configured there. --config
may be passed to
specify an arbitrary config file.
You can include tls_config to the job by using the flags --ca-file
, --cert-file
and --key-file
.
Flags
Value | Type | Description |
---|---|---|
|
string |
The path to the Redpanda config file. |
|
- |
Help for prometheus-config. |
|
- |
Include scrape config for internal metrics (/metrics). |
|
string |
The Prometheus job name by which to identify the
Redpanda nodes (default |
|
strings |
A comma-delimited list of the addresses (<host>:<port>) of all the Redpanda nodes in a cluster. The port must be the one configured for the nodes' admin API (9644 by default). |
|
string |
The URL of a Redpanda node with which to discover the rest. |
|
string |
The certificate to be used for TLS authentication with the broker. |
|
- |
Enable TLS for the Kafka API (not necessary if specifying custom certs). |
|
string |
The certificate key to be used for TLS authentication with the broker. |
|
string |
The truststore to be used for TLS communication with the broker. |
|
- |
Enable verbose logging (default: false). |