<commit_before>= NGINX-to-Prometheus log file exporter
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:toc:
:toc-placement!:
:toc-title:

image:https://travis-ci.org/martin-helmich/prometheus-nginxlog-exporter.svg?branch=master[link="https://travis-ci.org/martin-helmich/prometheus-nginxlog-exporter",Build status]
image:https://quay.io/repository/martinhelmich/prometheus-nginxlog-exporter/status[link="https://quay.io/repository/martinhelmich/prometheus-nginxlog-exporter",Docker Repository on Quay]
image:https://goreportcard.com/badge/github.com/martin-helmich/prometheus-nginxlog-exporter[link="https://goreportcard.com/report/github.com/martin-helmich/prometheus-nginxlog-exporter", Go Report Card]

Helper tool that continuously reads an NGINX log file and exports metrics to https://prometheus.io/[Prometheus].

[discrete]
== Contents

toc::[]

== Usage

You can either use a simple configuration, using command-line flags, or create
a configuration file with a more advanced configuration.

Use the command-line:

    ./prometheus-nginxlog-exporter \
      -format="<FORMAT>" \
      -listen-port=4040 \
      -namespace=nginx \
      [PATHS-TO-LOGFILES...]

Use the configuration file:

    ./prometheus-nginxlog-exporter -config-file /path/to/config.hcl

== Collected metrics
<commit_msg>Adjust README<commit_after>= NGINX-to-Prometheus log file exporter
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:toc:
:toc-placement!:
:toc-title:

image:https://img.shields.io/github/workflow/status/martin-helmich/prometheus-nginxlog-exporter/Compile%20&%20Test[GitHub Workflow Status]
image:https://quay.io/repository/martinhelmich/prometheus-nginxlog-exporter/status[link="https://quay.io/repository/martinhelmich/prometheus-nginxlog-exporter",Docker Repository on Quay]
image:https://goreportcard.com/badge/github.com/martin-helmich/prometheus-nginxlog-exporter[link="https://goreportcard.com/report/github.com/martin-helmich/prometheus-nginxlog-exporter", Go Report Card]
image:https://img.shields.io/github/license/martin-helmich/prometheus-nginxlog-exporter[GitHub]

Helper tool that continuously reads an NGINX log file and exports metrics to https://prometheus.io/[Prometheus].

[discrete]
== Contents

toc::[]

== Usage

You can either use a simple configuration, using command-line flags, or create
a configuration file with a more advanced configuration.

Use the command-line:

    ./prometheus-nginxlog-exporter \
      -format="<FORMAT>" \
      -listen-port=4040 \
      -namespace=nginx \
      [PATHS-TO-LOGFILES...]

Use the configuration file:

    ./prometheus-nginxlog-exporter -config-file /path/to/config.hcl

== Collected metrics

{'fraction_non_alphanumeric': 0.13405292479108635, 'fraction_numerical': 0.004178272980501393, 'mean_word_length': 4.997912317327766, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1938974', 'n_tokens_mistral': 1008, 'n_tokens_neox': 952, 'n_words': 169}