Skip to content

A log exporter for Nginx that reads multiple Nginx logs and provides a metric to use as a target for Prometheus.

Notifications You must be signed in to change notification settings

alinowrouzii/nginx_log_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGINX log exporter

A log exporter that extracts data from multiple NGINX logs file and can be used as a target for prometeous.

Usage

To run nginx_log_exporter just run the script shown below:

    ./run.sh -config ./config.yml

Sample of config.yml is exist in the project root directory.

The extracted metric from NGINX is the total requests with specific method and http status code.

To access to metric inside prometious use:

<app_name>_log_exporter_requests_total{method=httpMethod, status=httpStatus}

where app_name is specified inside your config file. Also method and status code should be exist inside your config file.

Note: Inside the config file the list of status code corresponding to its method should be written.

About

A log exporter for Nginx that reads multiple Nginx logs and provides a metric to use as a target for Prometheus.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published