mbaran0v.ansible_role_prometheus_nginxlog_exporter

Ansible Role: prometheus-nginxlog-exporter

Build Status License GitHub tag Open Source Love PRs Welcome

This is an Ansible role designed to install and set up the Prometheus Nginx logs Exporter. It currently supports Debian and RedHat based Linux systems. The tested platforms include:

  • Ubuntu 16.04
  • CentOS 7

Requirements

No special requirements; however, this role requires root access. So you should run it in a playbook with become: yes.

Role Variables

Here are the variables that can be used with this role and a short description for each. You can find all variables in defaults/main.yml.

nginxlog_exporter_version: 1.3.0  # version to install
nginxlog_exporter_listen_port: 4040  # port to listen on
nginxlog_exporter_root_dir: /opt/nginxlog_exporter  # installation directory
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 settings

For more details, check the configuration file documentation.

Dependencies

None

Example Playbook

Here’s a simple example of how to use this role in a playbook:

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

License

MIT / BSD

Author Information

This role was created in 2019 by Maxim Baranov.

Informazioni sul progetto

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

Installa
ansible-galaxy install mbaran0v.ansible_role_prometheus_nginxlog_exporter
Licenza
Unknown
Download
1.1M
Proprietario
Experienced DevOps Engineer