feat: add "Plus" mode flag for nginx_exporter

Signed-off-by: anviar <oleg.kluchkin+github@gmail.com>
This commit is contained in:
anviar 2024-02-09 09:39:48 +03:00
parent b9c15a1bd2
commit 35b38bb93c
No known key found for this signature in database
GPG key ID: 1D9496B16B0FC606
3 changed files with 8 additions and 0 deletions

View file

@ -6,6 +6,7 @@ nginx_exporter_binary_url: "https://github.com/{{ _nginx_exporter_repo }}/releas
nginx_exporter_checksums_url: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/\
nginx-prometheus-exporter_{{ nginx_exporter_version }}_checksums.txt"
nginx_exporter_skip_install: false
nginx_exporter_plus: false
nginx_exporter_scrape_uri: "http://127.0.0.1/stub_status"
nginx_exporter_web_listen_address: "0.0.0.0:9113"
nginx_exporter_web_telemetry_path: "/metrics"

View file

@ -15,6 +15,10 @@ argument_specs:
description: "nginx_exporter installation tasks gets skipped when set to true."
type: bool
default: false
nginx_exporter_plus:
description: "Start the exporter for NGINX Plus."
type: bool
default: false
nginx_exporter_binary_local_dir:
description:
- "Enables the use of local packages instead of those distributed on github."

View file

@ -14,6 +14,9 @@ ExecStart={{ nginx_exporter_binary_install_dir }}/nginx-prometheus-exporter \
'--web.telemetry-path={{ nginx_exporter_web_telemetry_path }}' \
{% if nginx_exporter_tls_server_config | length > 0 or nginx_exporter_http_server_config | length > 0 or nginx_exporter_basic_auth_users | length > 0 %}
'--web.config.file=/etc/nginx_exporter/web_config.yaml' \
{% endif %}
{% if nginx_exporter_plus %}
'--nginx.plus' \
{% endif %}
'--log.level={{ nginx_exporter_log_level }}' \
'--log.format={{ nginx_exporter_log_format }}'