3) The problem is because the packet received has a part being a jSON, but I can't use the json-parser().
# Extracting only the jSON payload
rewrite p_nginx_wb_error_log_clean {
subst(".*captcha] ", "", value("MESSAGE"), flags("global"));
subst(" while logging request.*$", "", value("MESSAGE"), flags("global"));
};
parser p_nginx_wb_error_log_json {
json-parser(
marker("")
prefix("j.")
);
};
destination d_nginx_wb_error_log {
file("/var/log/syslog-ng/nginx/${j.webapp_domain:-unknow-payload}_error.log"
create_dirs(yes)
owner("root")
group("root")
perm(0644)
dir_perm(0755)
template("${MSG}\n")
);
};
--
Jorge Pereira