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

--config

string

The path to the Redpanda config file.

-h, --help

-

Help for prometheus-config.

--internal-metrics

-

Include scrape config for internal metrics (/metrics).

--job-name

string

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

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

--tls-cert

string

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

--tls-enabled

-

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

--tls-key

string

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

--tls-truststore

string

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

-v, --verbose

-

Enable verbose logging (default: false).