Sign inSign up

kiwfydev/nginx-lua-prometheus

By kiwfydev

•Updated over 5 years ago

Nginx with Prometheus, access and error logs exporter

Image
0

245

kiwfydev/nginx-lua-prometheus repository overview

⁠Nginx Lua Prometheus - Docker image

Latest Version Build Status Docker Image Size PRs Welcome

Nginx with Prometheus, access and error logs exporter.

⁠How to use this image

Requires Docker⁠.

Before get the image is necessary authenticate⁠ in Github Package

You can run the container and service like so:

docker run -d -p 80:80 docker.pkg.github.com/kiwfy/nginx-lua-prometheus/nginx-lua-prometheus:latest

Or with Docker Hub⁠ image

docker run -d kiwfydev/nginx-lua-prometheus:latest
⁠Docker with compose tool

It's a good way to use docker-compose⁠. Example:

version: '3.7'
services:
    nginx:
        image: docker.pkg.github.com/kiwfy/nginx-lua-prometheus/nginx-lua-prometheus:latest
        container_name: nginx
        ports:
            - 80:80
        volumes:
            - ./:/var/www/html
⁠Nginx

For default the Nginx is accessible in your localhost⁠ port 9436.

⁠Metrics

This project have route metric to using with Prometheus⁠ and Grafana⁠ dashboard.

For testing and visualize all the metrics:

docker-compose up --build

After that, open metrics dashboard⁠ with:

Username: admin
password: admin

If you alreay have Prometheus service running or is a base image from another service, just call the route: http://nginx-lua-prometheus:9436/metrics⁠

This route is enable only for internal requests in the same docker networking.

⁠Logs

To follow all nginx logs, you can use Kibana⁠ + Elasticsearch⁠.

This imagem is ready to export and show this informations.

You can access your Local Kibana⁠ with:

Username: elastic
password: changeme

After that access discover⁠ menu to see the log.

If you already have this services enable, just configure Filebeat⁠ in configuration folder⁠.

⁠Development

Want to contribute? Great!

Make a change in image and be careful with your updates!

Kiwfy - Open your code, open your mind!

Tag summary

Content type

Image

Digest

Size

160 MB

Last updated

over 5 years ago

docker pull kiwfydev/nginx-lua-prometheus