0

Does anyone know how to configure custom Nginx Proxy Manager logs ? I need to make a json log_format for my promtail to finaly been able to make a grafana dashboard with json custom format log. (I've made this on "normal" Nginx before and it work great and now I have to make this on Nginx Proxy Manager..)

Bellow is my current data folder for Nginx Proxy Manager :

data/nginx/
├── dead_host
├── default_host
│   └── site.conf
├── default_www
├── proxy_host
│   └── 1.conf
├── redirection_host
├── stream
└── temp

And that's the format that I wanna put on my log :

log_format json_analytics escape=json '{'
      '"time_local": "$time_local", '
      '"remote_addr": "$remote_addr", '
      '"request_uri": "$request_uri", '
      '"status": "$status", '
      '"http_referer": "$httpReferer", '
      '"http_user_agent": "$httpAgent", '
      '"server_name": "$server_name", '
      '"request_time": "$request_time", '
      '"geoip2_data_country_code": "$geoip2_data_country_code", '
      '"geoip2_data_country_name": "$geoip2_data_country_name", '
      '"geoip2_data_city_name": "$geoip2_data_city_name", '
      '"geoip2_data_postal_code": "$geoip2_data_postal_code", '
      '"geoip2_data_latitude": "$geoip2_data_latitude", '
      '"geoip2_data_longitude": "$geoip2_data_longitude", '
      '"geoip2_data_state_name": "$geoip2_data_state_name", '
      '"geoip2_data_state_code": "$geoip2_data_state_code"'
      '}';

I've been trying to do this for a while, but I don't know how to do it and I haven't found a place to do it in WebUI.....

1 Answer 1

0

was just looking into this myself. NPM has a directory called /data/nginx/custom

You can place your customizations in there, see for details: https://zachthesplunker.com/splunk-the-nginx-proxy-manager/

Hope this helps,

Gerrit

Sign up to request clarification or add additional context in comments.

1 Comment

However, the geoip does not come OOB I think, but maybe this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.