Can anyone please help me with a lua configuration which I can embedded
nginx.conf to send the following sepaately in access log.
At present all these fields are embedded in http_user_agent and I am
parser to parse at the receiver end. I am looking for some input where I
send them separately as different fields from Nginx itself.
Posted at Nginx Forum:
On Sun, Jun 7, 2015 at 10:41 PM, nginxsantos wrote:
You need to parse the User-Agent header value yourself in Lua with
regexes or something. Not sure if there’s a ready-to-use 3rd-party Lua
libraries that can already parse that for you.
BTW, you’re recommended to post ngx_lua related questions to the
openresty-en mailing list instead. Please see
https://openresty.org/#Community for more details. Thanks.
I would suggest using some log parser. You can find some by searching.
Those “for Apache” ones would also work. If you know some python or
script, writing one yourself won’t take more than a few minutes.
Analyzing access log on the fly just doesn’t make much sense.