Questions tagged [nginx-log]

21 questions
0
votes
1 answer

OpenResty: Anonymise query parameter

I'm trying to anonymize email addresses (replace it by a UUID) to avoid keeping them as plaintext in my nginx access log. For now, I could only replace it with ***** by overriding OpenResty's nginx.conf : http { include mime.types; …
Fcmam5
  • 4,888
  • 1
  • 16
  • 33
0
votes
0 answers

How can I log exception errors to disk of a systemd service?

I have written below systemd service that runs the flask app on gunicorn following a tutorial. I am able to see access logs in /var/log/nginx/ but not log of error happening in the python flask app! How can I log errors to disk of a systemd…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
0
votes
0 answers

Why nginx $upstream_response_time is zero, when response is sent from memcached upstream

Our nginx is configured to serve requests from 2 upstreams: php-fpm and memcached. When request is served from php-fpm, $upstream_response_time has non-zero value. When request is served from memcached, $upstream_response_time sometimes has zero…
antonbormotov
  • 1,821
  • 2
  • 20
  • 32
0
votes
1 answer

filter out info in nginx log_format

I want to log the $request coming in but want to filter out sensitive information such as passwords or keys. I tried the following and it doesn't work: http { log_format xxx '$filtered_request'; location /xxx { set $filtered_request…
unional
  • 14,651
  • 5
  • 32
  • 56
-1
votes
1 answer

nginx.log convert to CSV with Python

I have a part of nginx.log file: 192.168.226.64 - - [26/Apr/2021:21:20:37 +0000] "GET /api/datasources/proxy/1/api/v1/query_range?query=probe_ssl_earliest_cert_expiry%7Btarget%3D~%22()%22%7D-time()&start=1619471730&end=1619472030&step=30 HTTP/2.0"…
-1
votes
1 answer

Full match regex for URI

what is full match regex(python) to find URI only from nginx logs? 00.00.00.00 - - [23/Mar/2020:16:23:04 +0000] "GET /foo/bar/uri.js?id=123 HTTP/1.1" 200 19165 "https://nginx.com/foo/bar" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3)…
RV Sai
  • 1
  • 1
1
2