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.


rpk generate prometheus-config [flags]


Value Type Description



The path to the Redpanda config file.

-h, --help


Help for prometheus-config.



Include scrape config for internal metrics (/metrics).



The Prometheus job name by which to identify the Redpanda nodes (default "redpanda").



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).



The URL of a Redpanda node with which to discover the rest.



The certificate to be used for TLS authentication with the broker.



Enable TLS for the Kafka API (not necessary if specifying custom certs).



The certificate key to be used for TLS authentication with the broker.



The truststore to be used for TLS communication with the broker.

-v, --verbose


Enable verbose logging (default: false).