so my question is the way to expose Nginx metrics it's only with docker? because I had read in internet and I saw something like this https://github.com/nginxinc/nginx-prometheus-exporter what I want is to monitor the Nginx log, for failed responses.
$ docker run -p 9113:9113 nginx/nginx-prometheus-exporter:0.8.0 -nginx.scrape-uri http://<nginx>:8080/stub_status
To summarize our discussion in the comments:
node-prometheus-exporter
is handy tool to get the Nginx in-built metrics and send it to Prometheus. But if you need any specialised metric, you have to either modify the source code or create your own solution.