4 ms·
Brilliantly lazy, I would say, since he used out-of-box software to do the piping, he didn't have to write any code. My first inclination would be to format ngi
by bonekeeper 13y ago
Brilliantly lazy, I would say, since he used out-of-box software to do the piping, he didn't have to write any code. My first inclination would be to format nginx's logs to a JSON array like such:
log_format json '["$time_local","$msec","$remote_addr","$remote_user","$http_host","$request","$status","$upstream_addr","$upstream_cache_status","$bytes_sent","$request_time","$upstream_response_time","$http_referer","$http_user_agent","$http_x_forwarded_for","$http_cookie","$upstream_http_x_session_key","$upstream_http_x_session_user"]';
(just copied and pasted from my own config, many fields are not relevant to this use case in particular).
Then log to a named pipe into a program which would then RPUSH the entries into a LIST or maybe PUBLISH them to a channel, from where several different analytics programs would be running for several different metrics that depend on the same data, so that they could run in parallel.
- throwaway2048 13y agoCan you please break up the 3rd line of your post, it is badly breaking the comment page layout.
- derefr 13y agoThe HN stylesheet really needs a "word-wrap: break-word;" in there somewhere.
- dingdingdang 13y agoThis is what I have in my Stylish extension for HN: @namespace url(http://www.w3.org/1999/xhtml); http://www.w3.org/1999/xhtml); @-moz-document domain("news.ycombinator.com") { p { word-break: break-all; } }
- rschmitty 13y agoAwesome, thanks!