Hi! I would like to monitor accesses to my services done through my nginx setup that acts as reverse proxy.
I’ve tried fluentd to export Prometheus metrics with fluend to scrape the access.log file produced by nginx. The problem is that it uses a lot of resources as I can see (130+ MB of RAM only for fluentd, and each http request towards the fluentd metrics endpoint transfers a lot of data and I assume It Will increase consequently with the increase of the access.log file).
Is there any “embedded” scraper with integrated dashboard that I can recall on demand? For example, one of the problem with the previous solution is that peometheus scrapes the metrics every 5s so I have a constant transfer of different MBs every second due to the size of the metrics, even if I am not looking at grafana (my frontend for Prometheus). With an on demand service I would scrape the access.log file only when I am using the on demand service.
Thank you
Ages ago there was such a tool - Webalizer and everybody was using it :) not anymore…
The commercial nginx+ has a status endpoint that can be hooked into graphana/prometheus, but as you can imagine, status endpoints is one of the money maker for nginx inc so they won’t put it on the opensource version anytime soon. There is also a basic status endpoint available in the opensource version of nginx, but it doesn’t return much.
Have a look at nginx vts. I run it on my Raspberry Pi, it works great and provides everything I need! The auto-installer is easy to use and it can output as html, json or prometheus.