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 |
---|---|---|
--ca-file |
string |
CA certificate used to sign node_exporter certificate. |
--cert-file |
string |
Cert file presented to node_exporter to authenticate Prometheus as a client. |
--config |
string |
The path to the Redpanda config file. |
-h, --help |
- |
Help for prometheus-config. |
--internal-metrics |
- |
Include scrape config for internal metrics
|
--key-file |
string |
Key file presented to node_exporter to authenticate Prometheus as a client. |
--node-addrs |
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). |
--seed-addr |
string |
The URL of a Redpanda node with which to discover the rest. |
-v, --verbose |
- |
Enable verbose logging (default |