Nginx LUA

Can anyone please help me with a lua configuration which I can embedded
into
nginx.conf to send the following sepaately in access log.

user_agent_os
user_agent_browser
user_agent_version

At present all these fields are embedded in http_user_agent and I am
writing
parser to parse at the receiver end. I am looking for some input where I
can
send them separately as different fields from Nginx itself.

Posted at Nginx Forum:

Hello!

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
OpenResty® - Open source for more details. Thanks.

Best regards,
-agentzh

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
shell
script, writing one yourself won’t take more than a few minutes.
Analyzing access log on the fly just doesn’t make much sense.