ES Teamplate firewall

This commit is contained in:
Kameron Kenny 2024-06-14 12:23:11 -04:00
parent 921e47c7d1
commit 983aeb4938
No known key found for this signature in database
GPG Key ID: E5006629839D2276
1 changed files with 4 additions and 9 deletions

View File

@ -19,6 +19,8 @@ filter f_unifi_mcad { message("mcad"); };
filter f_unifi_hostapd { message("hostapd"); }; filter f_unifi_hostapd { message("hostapd"); };
filter f_unifi_wlan { message("wlan:"); }; filter f_unifi_wlan { message("wlan:"); };
parser p_kv { kv-parser(prefix("kv.")); };
destination d_local { destination d_local {
file("/var/log/messages"); file("/var/log/messages");
file("/var/log/messages-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3)); file("/var/log/messages-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3));
@ -35,15 +37,7 @@ destination d_unifi_firewall {
url("http://pi501.in.thelinuxpro.net:9200/_bulk") url("http://pi501.in.thelinuxpro.net:9200/_bulk")
template("$(format-json --scope rfc5424 --scope dot-nv-pairs template("$(format-json --scope rfc5424 --scope dot-nv-pairs
--rekey .* --shift 1 --scope nv-pairs --rekey .* --shift 1 --scope nv-pairs
--exclude DATE @timestamp=${ISODATE} --exclude DATE @timestamp=${ISODATE})")
DESCRIPTION=$(DESC)
INTERFACE_IN=$(IN)
INTERFACE_OUT=$(OUT)
IP_SOURCE=$(SRC)
IP_DESTINATION=$(DST)
PROTOCOL=$(PROTO)
PORT_SOURCE=$(SPT)
PORT_DESTINATION=$(DPT))")
persist-name("d_unifi_firewall") persist-name("d_unifi_firewall")
); );
}; };
@ -149,6 +143,7 @@ destination d_syslog_ng_es {
log { log {
source(s_network_udp); source(s_network_udp);
filter(f_unifi_fw_lan); filter(f_unifi_fw_lan);
parser(p_kv);
destination(d_unifi_firewall); destination(d_unifi_firewall);
flags(final); flags(final);
}; };