prometheus.prometheus.redis_exporter role – Prometheus redis_exporter

Note

This role is part of the prometheus.prometheus collection (version 0.22.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install prometheus.prometheus.

To use it in a playbook, specify: prometheus.prometheus.redis_exporter.

Entry point main – Prometheus redis_exporter

Synopsis

Parameters

Parameter

Comments

redis_exporter_addr

string

Address of the Redis instance

Default: "redis://localhost:6379"

redis_exporter_binary_install_dir

string

Advanced

Directory to install redis_exporter binary

Default: "/usr/local/bin"

redis_exporter_binary_url

string

URL of the redis_exporter binaries .tar.gz file

Default: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/redis_exporter-v{{ redis_exporter_version }}.{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}.tar.gz"

redis_exporter_check_key_groups

list / elements=string

List of LUA regexes for classifying keys into groups. The regexes are applied in specified order to individual keys, and the group name is generated by concatenating all capture groups of the first regex that matches a key. A key will be tracked under the unclassified group if none of the specified regexes matches it.

Default: []

redis_exporter_check_keys

list / elements=string

List of key patterns to export value and length/size, eg: db3=user_count will export key user_count from db 3. db defaults to 0 if omitted. The key patterns specified with this flag will be found using SCAN. Use this option if you need glob pattern matching; check-single-keys is faster for non-pattern keys. Warning: using –check-keys to match a very large number of keys can slow down the exporter to the point where it doesn’t finish scraping the redis instance.

Default: []

redis_exporter_check_keys_batch_size

integer

Approximate number of keys to process in each execution. This is basically the COUNT option that will be passed into the SCAN command as part of the execution of the key or key group metrics, see COUNT option. Larger value speeds up scanning. Still Redis is a single-threaded app, huge COUNT can affect production environment.

Default: 1000

redis_exporter_check_single_keys

list / elements=string

List of keys to export value and length/size, eg: db3=user_count will export key user_count from db 3. db defaults to 0 if omitted. The keys specified with this flag will be looked up directly without any glob pattern matching. Use this option if you don’t need glob pattern matching; it is faster than check-keys.

Default: []

redis_exporter_check_single_streams

list / elements=string

List of streams to export info about streams, groups and consumers. The streams specified with this flag will be looked up directly without any glob pattern matching. Use this option if you don’t need glob pattern matching; it is faster than check-streams.

Default: []

redis_exporter_check_streams

list / elements=string

List of stream-patterns to export info about streams, groups and consumers. Syntax is the same as check-keys.

Default: []

redis_exporter_checksums_url

string

URL of the redis_exporter checksums file

Default: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/sha256sums.txt"

redis_exporter_config_command

string

What to use for the CONFIG command

Default: "CONFIG"

redis_exporter_config_dir

string

Path to directory with redis_exporter configuration

Default: "/etc/redis_exporter"

redis_exporter_connection_timeout

string

Timeout for connection to Redis instance

Default: "15s"

redis_exporter_count_keys

list / elements=string

List of patterns to count, eg: db3=sessions:* will count all keys with prefix sessions: from db 3. db defaults to 0 if omitted. Warning: The exporter runs SCAN to count the keys. This might not perform well on large databases.

Default: []

redis_exporter_debug

boolean

Verbose debug output

Choices:

  • false ← (default)

  • true

redis_exporter_export_client_list

boolean

Whether to scrape Client List specific metrics

Choices:

  • false ← (default)

  • true

redis_exporter_export_client_port

boolean

Whether to include the client’s port when exporting the client list. Warning: including the port increases the number of metrics generated and will make your Prometheus server take up more memory

Choices:

  • false ← (default)

  • true

redis_exporter_incl_config_metrics

boolean

Whether to include all config settings as metrics

Choices:

  • false ← (default)

  • true

redis_exporter_incl_system_metrics

boolean

Whether to include system metrics like total_system_memory_bytes

Choices:

  • false ← (default)

  • true

redis_exporter_is_cluster

boolean

Whether this is a redis cluster (Enable this if you need to fetch key level data on a Redis Cluster).

Choices:

  • false ← (default)

  • true

redis_exporter_is_tile38

boolean

Whether to scrape Tile38 specific metrics

Choices:

  • false ← (default)

  • true

redis_exporter_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/redis_exporter-{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}/{{ redis_exporter_version }}"

redis_exporter_log_format

string

Output format of log messages. One of: [txt, json]

Default: "txt"

redis_exporter_max_distinct_key_groups

integer

Maximum number of distinct key groups that can be tracked independently per Redis database. If exceeded, only key groups with the highest memory consumption within the limit will be tracked separately, all remaining key groups will be tracked under a single overflow key group.

Default: 100

redis_exporter_namespace

string

Namespace for the metrics

Default: "redis"

redis_exporter_password

string

Password of the Redis instance

Default: ""

redis_exporter_passwords

dictionary

Dictionary with passwords for instances.

Read more official documentation

Default: {}

redis_exporter_ping_on_connect

boolean

Whether to ping the redis instance after connecting and record the duration as a metric.

Choices:

  • false ← (default)

  • true

redis_exporter_redact_config_metrics

boolean

Whether to redact config settings that include potentially sensitive information like passwords.

Choices:

  • false ← (default)

  • true

redis_exporter_redis_only_metrics

boolean

Whether to also export go runtime metrics

Choices:

  • false ← (default)

  • true

redis_exporter_script

list / elements=string

List of path(s) to Redis Lua script(s) for gathering extra metrics.

Default: []

redis_exporter_set_client_name

boolean

Whether to set client name to redis_exporter

Choices:

  • false

  • true ← (default)

redis_exporter_skip_tls_verification

boolean

Whether to to skip TLS verification when the exporter connects to a Redis instance

Choices:

  • false ← (default)

  • true

redis_exporter_system_group

string

Advanced

System group for redis_exporter

Default: "redis-exp"

redis_exporter_system_user

string

Advanced

redis_exporter user

Default: "redis-exp"

redis_exporter_tls_ca_cert_file

string

Name of the CA certificate file (including full path) if the server requires TLS client authentication

Default: ""

redis_exporter_tls_client_cert_file

string

Name the client cert file (including full path) if the server requires TLS client authentication

Default: ""

redis_exporter_tls_client_key_file

string

Name of the client key file (including full path) if the server requires TLS client authentication

Default: ""

redis_exporter_tls_server_ca_cert_file

string

Name of the CA certificate file (including full path) if the web interface and telemetry should use TLS

Default: ""

redis_exporter_tls_server_cert_file

string

Name of the server certificate file (including full path) if the web interface and telemetry should use TLS

Default: ""

redis_exporter_tls_server_key_file

string

Name of the server key file (including full path) if the web interface and telemetry should use TLS

Default: ""

redis_exporter_tls_server_min_version

string

Minimum TLS version that is acceptable by the web interface and telemetry when using TLS

Default: "TLS1.2"

redis_exporter_user

string

User name to use for authentication (Redis ACL for Redis 6.0 and newer)

Default: ""

redis_exporter_version

string

redis_exporter package version. Also accepts latest as parameter.

Default: "1.63.0"

redis_exporter_web_listen_address

string

Address to listen on for web interface and telemetry

Default: "0.0.0.0:9121"

redis_exporter_web_telemetry_path

string

Path under which to expose metrics

Default: "/metrics"

Authors

  • Prometheus Community