Nginx with Prometheus, access and error logs exporter
245
Nginx with Prometheus, access and error logs exporter.
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
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
For default the Nginx is accessible in your localhost port 9436.
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.
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.
Want to contribute? Great!
Make a change in image and be careful with your updates!
Kiwfy - Open your code, open your mind!
Content type
Image
Digest
Size
160 MB
Last updated
over 5 years ago
docker pull kiwfydev/nginx-lua-prometheus