Skip to main content
Version: 22.3

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.

Usage

rpk generate prometheus-config [flags]

Flags

Value Type Description
--ca-filestring CA certificate used to sign node_exporter certificate.
--cert-filestringCert file presented to node_exporter to authenticate Prometheus as a client.
--configstring The path to the Redpanda config file.
-h, --help- Help for prometheus-config.
--internal-metrics-Include scrape config for internal metrics /metrics
--key-filestringKey file presented to node_exporter to authenticate Prometheus as a client.
--node-addrsstringsA 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-addrstring The URL of a Redpanda node with which to discover the rest.
-v, --verbose-Enable verbose logging (default false).