Prometheus Config Mode Command Reference

prometheus

Configures Prometheus-related parameters.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus { scrape-interval scrape_interval | volume volume_size | query-mode query_mode} 

query-mode query_mode

Specify the query mode.

Must be one of the following:

  • client

  • server

scrape-interval scrape_interval_frequency

Specify the frequency at which Prometheus fetches metrics in seconds.

Must be an integer in the range of 10-900.

Default Value: 10.

volume volume_size

Specify the volume size in GB to be used if useVolumeClaims is true.

Must be an integer in the range of 20-1024.

Default Value: 100.

Usage Guidelines

Use this command to configure Prometheus-related parameters.

prometheus federation

Configures scraping metrics from other cluster.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus federation [ subordinates ip_address/host_name ] 

subordinates ip_address/host_name

Specify the other cluster metrics server in the format ip_address/host_name .

Must be a string.

Usage Guidelines

Use this command to scrape metrics from other cluster.

prometheus federation exported-query-nodes

Configures the exported query nodes.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus federation exported-query-nodes [ address ip_address | port port_number ] 

address ip_address

Specify the IP address.

Must be an IPv4 address.

-Or-

Must be an IPv6 address.

port port_number

Specify the port number.

Must be an integer in the range of 0-65535.

Usage Guidelines

Use this command to configure the exported query nodes.

prometheus federation remote-cluster-certs

Configures cluster-specific TLS/SSL certificate configuration.

Command Mode

Exec > Global Configuration (config)

Syntax

remote-cluster-certs remote_cluster_name { address remote_cluster_ip_address | ssl-key ssl_key_certificate | ssl-crt ssl_crt_certificate | ssl-ca ssl_certificate_authority | alert-rx-port port_number} 

address remote_cluster_ip_address

Specify the remote cluster's IP address.

Must be an IPv4 address.

-Or-

Must be an IPv6 address.

alert-rx-port port_number

Specify the web port number to receive the alerts.

Must be an integer in the range of 8700-8750.

ssl-ca ssl_certificate_authority

Specify the SSL certificate authority.

Must be a string.

ssl-crt ssl_crt_certificate

Specify the SSL certificate.

Must be a string.

ssl-key ssl_key_certificate

Specify the SSL Key certificate.

Must be a string.

remote_cluster_name

Specify the remote cluster's name.

Must be a string.

Usage Guidelines

Use this command to configure cluster-specific TLS/SSL certificate configuration.

You can configure a maximum of 10 elements with this command.

prometheus kvm-metrics defaults

Configures default values used by all connections.

Command Mode

Exec > Global Configuration (config)

Syntax

kvm-metrics defaults private-key default_private_key user default_user 

private-key default_private_key

Specify the default private key for connections.

Must be a string.

user default_user

Specify the default user for connections.

Must be a string.

Usage Guidelines

Use this command to enable monitoring of KVM-only machines, and to configure default values used by all connections.

prometheus kvm-metrics monitor-server

Configures monitor server targets.

Command Mode

Exec > Global Configuration (config)

Syntax

kvm-metrics monitor-server { address ip_address | hostname host_name | user user | private-key private_key} 

address ip_address

Specify the IP address to monitor.

Must be an IPv4 address.

-Or-

Must be an IPv6 address.

hostname host_name

Specify the host name.

Must be a string.

private-key private_key

Specify the private key for connections.

Must be a string.

user user

Specify the user for connections.

Must be a string.

Usage Guidelines

Use this command to enable monitoring of KVM-only machines, and configure monitor server targets.

prometheus prometheus-operator

Configure Prometheus installation using Prometheus Operator.

The Prometheus Operator provides Kubernetes native deployment and management of Prometheus and related monitoring components. This operator simplifies and automate the configuration of a Prometheus based monitoring stack for Kubernetes clusters.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus prometheus-operator { enabled | disabled} 

prometheus-operator { enabled | disabled}

Specify to enable or disable the Prometheus operator.

Default value: Disabled

Usage Guidelines

Use this command to install Prometheus using the Prometheus operator.

prometheus pushgateway

Configure Prometheus Pushgateway support.

The Pushgateway is an intermediary service which allows you to push metrics from jobs which cannot be scraped.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus pushgateway { enabled | disabled} 

pushgateway { enabled | disabled}

Specify to enable or disable the Prometheus Pushgateway.

Default value: Disabled

Usage Guidelines

Use this command to enable Prometheus Pushgateway.

prometheus pushgateway port

Specify the Prometheus Pushgateway port.

The Pushgateway is an intermediary service which allows you to push metrics from jobs which cannot be scraped.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus pushgateway port port_number 

pushgateway port port_number

Specify the port number of the Pushgateway port. port_number must be an integer in the range of 0 to 65535.

Default value: 9091

Usage Guidelines

Use this command to enable Prometheus Pushgateway.

prometheus recording-rules group

Configures Prometheus record rule group.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus recording-rules group record_rule_group_name { interval-seconds evaluation_interval} 

interval-seconds evaluation_interval

Specify the evaluation interval of the rule group in seconds.

Must be an integer.

record_rule_group_name

Specify name of the record rule group.

Must be a string.

Usage Guidelines

Use this command to configure Prometheus record rule group.

prometheus recording-rules group rule

Configures record rule definition.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus recording-rules group record_rule_group_name rule record_name { expression rule_expression} 

expression rule_expression

Specify PromQL record rule expression.

Must be a string.

record record_name

Specify the record name.

Must be a string.

Usage Guidelines

Use this command to configure record rule definition.

prometheus recording-rules group rule label

Configures labels to attach to the record rule time series.

Command Mode

Exec > Global Configuration (config)

Syntax

prometheus recording-rules group record_rule_group_name rule record_name { label label_name value label_value} 

value label_value

Specify the label value.

Must be a string.

label_name

Specify the label name.

Must be a string.

Usage Guidelines

Use this command to configure labels to attach to the record rule time series.

prometheus server-settings

Configures local cluster settings to enable scraping from remote manager.

Command Mode

Exec > Global Configuration (config)

Syntax

server-settings { external-ip ip_address | ssl-key ssl_key_certificate | ssl-crt ssl_crt_certificate | ssl-ca ssl_certificate_authority} 

external-ip ip_address

Specify the external IP address to expose this cluster to remote manager.

Must be an IPv4 address.

-Or-

Must be an IPv6 address.

ssl-ca ssl_certificate_authority

Specify the SSL certificate authority.

Must be a string.

ssl-crt ssl_crt_certificate

Specify the SSL CRT certificate.

Must be a string.

ssl-key ssl_key_certificate

Specify the SSL key certificate.

Must be a string.

Usage Guidelines

Use this command to configure local cluster settings to enable scraping from remote manager.