ansible_role_prometheus_nginxlog_exporter

Ansible role: prometheus-nginxlog-exporter

Build Status License GitHub tag Open Source Love PRs Welcome

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

Requirements

No special requirements; note that this role requires root access, so either run it in a playbook with a global become: yes

Role Variables

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

Dependencies

None

Example Playbook

- hosts: app
  become: yes
  roles:
      - mbaran0v.prometheus-nginxlog-exporter

License

MIT / BSD

Author Information

This role was created in 2019 by Maxim Baranov.

About

Prometheus Nginx access log Exporter https://github.com/martin-helmich/prometheus-nginxlog-exporter

Install
ansible-galaxy install mbaran0v/ansible-role-prometheus-nginxlog-exporter
GitHub repository
License
Unknown
Downloads
382788
Owner
Experienced DevOps Engineer