mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-04-22 09:56:40 +00:00
fix logs tail
This commit is contained in:
@@ -37,13 +37,10 @@ elseif ngx.var.request_method == "POST" and action == 'set' then
|
||||
elseif ngx.var.request_method == "POST" and action == "set_log_regex" then
|
||||
local body_data = ngx.req.get_body_data()
|
||||
red:set("log_pod_regex:" .. arg['id'], body_data)
|
||||
red:set("pods_match_regex:" .. arg['id'], "0")
|
||||
red:set("programming_mode", "0")
|
||||
ngx.say("Regex has been set => " .. body_data)
|
||||
ngx.log(ngx.INFO, "Set Regex for web log tail. Log id " .. arg['id'])
|
||||
--local redis_del_cmd = "(redis-cli KEYS 'regex_cmp:'" .. arg['id'] .. "| xargs redis-cli DEL) || echo"
|
||||
--local handle = io.popen(redis_del_cmd)
|
||||
--local result = handle:read("*a")
|
||||
--local rc = handle:close()
|
||||
return ngx.exit(ngx.status)
|
||||
|
||||
elseif ngx.var.request_method == "POST" and action == "enable_log_tail" then
|
||||
|
||||
Reference in New Issue
Block a user