From 2a711ecb7b2d043ea9e0d185cc0bb7bbe153942f Mon Sep 17 00:00:00 2001 From: Kameron Kenny <1267885+kkenny@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:19:57 -0400 Subject: [PATCH] stats --- Dockerfile | 2 +- config/syslog-ng.conf.d/nas81.conf | 12 ++++++++++-- docker-compose.yml | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 944340d..0c3225c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM debian:latest MAINTAINER Kameron Kenny -LABEL version="20241029141420" +LABEL version="20241029141957" LABEL description="Debian Based syslog-ng" RUN apt-get update diff --git a/config/syslog-ng.conf.d/nas81.conf b/config/syslog-ng.conf.d/nas81.conf index 2638b89..54e7cc2 100644 --- a/config/syslog-ng.conf.d/nas81.conf +++ b/config/syslog-ng.conf.d/nas81.conf @@ -25,12 +25,20 @@ destination d_nas81_suricata_stats { index("nas81") type("") url("http://pi501.in.thelinuxpro.net:9200/_bulk") - template("$(format-json suricata.stats.* --scope rfc5424 --exclude DATE @timestamp=${ISODATE})") + template("$(format-json --scope rfc5424 --scope dot-nv-pairs + --rekey .* --shift 1 --scope nv-pairs + --exclude DATE @timestamp=${ISODATE})") persist-name("d_nas81_suricata_stats") ); }; -destination d_file_suricata { file("/var/log/suricata.log"); }; +destination d_file_suricata { + file("/var/log/suricata.log" + template("$(format-json --scope rfc5424 --scope dot-nv-pairs + --rekey .* --shift 1 --scope nv-pairs + --exclude DATE @timestamp=${ISODATE})") + ); +}; log { source(s_network_udp); diff --git a/docker-compose.yml b/docker-compose.yml index b95789d..5ba6c46 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: syslog-ng: build: dockerfile: Dockerfile - image: docker-registry1.in.thelinuxpro.net:5000/tlp/syslog-ng:20241029141420 + image: docker-registry1.in.thelinuxpro.net:5000/tlp/syslog-ng:20241029141957 container_name: syslog-ng restart: unless-stopped networks: