prometheus.prometheus.mongodb_exporter role – Prometheus mongodb_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.mongodb_exporter.

Entry point main – Prometheus mongodb_exporter

Synopsis

Parameters

Parameter

Comments

mongodb_exporter_basic_auth_users

dictionary

Dictionary of users and password for basic authentication. Passwords are automatically hashed with bcrypt.

mongodb_exporter_binary_install_dir

string

Advanced

Directory to install mongodb_exporter binary

Default: "/usr/local/bin"

mongodb_exporter_binary_url

string

URL of the mongodb_exporter binaries .tar.gz file

Default: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/mongodb_exporter-{{ mongodb_exporter_version }}.{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}.tar.gz"

mongodb_exporter_checksums_url

string

URL of the mongodb_exporter checksums file

Default: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/mongodb_exporter_{{ mongodb_exporter_version }}_checksums.txt"

mongodb_exporter_collectors

string

List collectors from documantation.

You can specify ‘all’ to enable all collectors

mongodb_exporter_collstats_colls

list / elements=string

List of databases.collections to get $collStats

mongodb_exporter_collstats_limit

integer

Disable collstats, dbstats, topmetrics and indexstats collector if there are more than <n> collections. 0=No limit

Default: 0

mongodb_exporter_compatible_mode

boolean

Enable old mongodb-exporter compatible metrics

Choices:

  • false ← (default)

  • true

mongodb_exporter_config_dir

string

Path to directory with mongodb_exporter configuration

Default: "/etc/mongodb_exporter"

mongodb_exporter_direct_connect

boolean

Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used

Choices:

  • false ← (default)

  • true

mongodb_exporter_discovering_mode

boolean

Enable autodiscover collections

Choices:

  • false ← (default)

  • true

mongodb_exporter_global_conn_pool

boolean

Use global connection pool instead of creating new pool for each http request

Choices:

  • false ← (default)

  • true

mongodb_exporter_http_server_config

dictionary

Config for HTTP/2 support.

Keys and values are the same as in mongodb_exporter docs.

mongodb_exporter_indexstats_colls

list / elements=string

List of databases.collections to get $indexStats

mongodb_exporter_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/mongodb_exporter-{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}/{{ mongodb_exporter_version }}"

mongodb_exporter_log_level

string

Only log messages with the given severity or above.

Choices:

  • "debug"

  • "info"

  • "warn"

  • "error" ← (default)

  • "fatal"

mongodb_exporter_metrics_overridedescendingindex

boolean

Enable descending index name override to replace -1 with _DESC

Choices:

  • false ← (default)

  • true

mongodb_exporter_profile_time_ts

integer

Set time for scrape slow queries

Default: 30

mongodb_exporter_system_group

string

Advanced

System group for mongodb_exporter

Default: "mongodb-exp"

mongodb_exporter_system_user

string

Advanced

mongodb_exporter user

Default: "mongodb-exp"

mongodb_exporter_timeout_offset

integer

Offset to subtract from the timeout in seconds

Default: 1

mongodb_exporter_tls_server_config

dictionary

Configuration for TLS authentication.

Keys and values are the same as in mongodb_exporter docs.

mongodb_exporter_uri

string / required

MongoDB connection URI

mongodb_exporter_version

string

mongodb_exporter package version. Also accepts latest as parameter.

Default: "0.41.1"

mongodb_exporter_web_listen_address

string

Address on which mongodb exporter will listen

Default: "0.0.0.0:9216"

mongodb_exporter_web_telemetry_path

string

Path under which to expose metrics

Default: "/metrics"

Authors

  • Prometheus Community