prometheus.prometheus.nginx_exporter role – Prometheus nginx_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.nginx_exporter.

Entry point main – Prometheus nginx_exporter

Synopsis

Parameters

Parameter

Comments

nginx_exporter_basic_auth_users

dictionary

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

nginx_exporter_binary_install_dir

string

Advanced

Directory to install nginx_exporter binary

Default: "/usr/local/bin"

nginx_exporter_binary_url

string

URL of the nginx_exporter binaries .tar.gz file

Default: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_{{ ansible_system | lower }}_{{ _nginx_exporter_go_ansible_arch }}.tar.gz"

nginx_exporter_checksums_url

string

URL of the nginx_exporter checksums file

Default: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_checksums.txt"

nginx_exporter_config_dir

string

Path to directory with nginx_exporter configuration

Default: "/etc/nginx_exporter"

nginx_exporter_http_server_config

dictionary

Config for HTTP/2 support.

Keys and values are the same as in nginx_exporter docs.

nginx_exporter_local_cache_path

string

Local path to stash the archive and its extraction

Default: "/tmp/nginx_exporter-{{ ansible_system | lower }}-{{ _nginx_exporter_go_ansible_arch }}/{{ nginx_exporter_version }}"

nginx_exporter_log_format

string

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

Default: "logfmt"

nginx_exporter_log_level

string

Only log messages with the given severity or above. One of: [debug, info, warn, error]

Default: "info"

nginx_exporter_plus

boolean

Start the exporter for NGINX Plus.

Choices:

  • false ← (default)

  • true

nginx_exporter_scrape_uri

string

A URI or unix domain socket path for scraping NGINX or NGINX Plus metrics. For NGINX, the stub_status page must be available through the URI.

Default: "http://127.0.0.1/stub_status"

nginx_exporter_system_group

string

Advanced

System group for nginx_exporter

Default: "nginx-exp"

nginx_exporter_system_user

string

Advanced

nginx_exporter user

Default: "nginx-exp"

nginx_exporter_tls_server_config

dictionary

Configuration for TLS authentication.

Keys and values are the same as in nginx_exporter docs.

nginx_exporter_version

string

nginx_exporter package version. Also accepts latest as parameter.

Default: "1.3.0"

nginx_exporter_web_listen_address

string

Address on which nginx exporter will listen

Default: "0.0.0.0:9113"

nginx_exporter_web_telemetry_path

string

Path under which to expose metrics

Default: "/metrics"

Authors

  • Prometheus Community