Closed frodood closed 3 years ago
This is definitely possible and should work. I believe that the proper directive to use should be log_by_lua_file
, that might be the reason, why it doesn't work for you...
Just to make sure: Do you also have initialization and collection code somewhere? Do you see any errors in nginx error.log?
hey guys,
I have a special scenario when logging nginx metrics, I don't want to log every incoming request hitting my ngx, certain conditions has to be meant before system passed the ngx request to services, so I want to log metrics only for that. I have this config
and in my example.lua I added following
but metrics are not logging, how can I solve this?