Ansible role for install and configure Prometheus Nginx logs Exporter. Currently this works on Debian and RedHat based linux systems. Tested platforms are:
- Ubuntu 16.04
- CentOS 7
No special requirements; note that this role requires root access, so either run it in a playbook with a global become: yes
The variables that can be passed to this role and a brief description about them are as follows. (For all variables, take a look at defaults/main.yml)
nginxlog_exporter_version: 1.3.0
version for installation
nginxlog_exporter_listen_port: 4040
listen port
nginxlog_exporter_root_dir: /opt/nginxlog_exporter
directory for installation
nginxlog_exporter_config_vars: |
listen:
port: {{ nginxlog_exporter_listen_port }}
address: {{ nginxlog_exporter_listen_address }}
namespaces:
- name: nginx
format: "$remote_addr [$time_local] \"$request\" $status $body_bytes_sent $request_time $upstream_response_time"
source_files:
- "/var/log/nginx/exporter.log"
histogram_buckets: [.1, .3, .5, .7, 1, 3, 5, 7]
configuration file https://github.com/martin-helmich/prometheus-nginxlog-exporter#configuration-file
None
- hosts: app
become: yes
roles:
- mbaran0v.prometheus-nginxlog-exporter
MIT / BSD
This role was created in 2019 by Maxim Baranov.