split client ip port
This commit is contained in:
parent
28061444a2
commit
e9f93e474b
|
@ -1,7 +1,7 @@
|
|||
FROM debian:latest
|
||||
MAINTAINER Kameron Kenny <kkenny379@gmail.com>
|
||||
|
||||
LABEL version="20240619.1.10"
|
||||
LABEL version="20240619.1.11"
|
||||
LABEL description="Debian Based syslog-ng"
|
||||
|
||||
RUN apt-get update
|
||||
|
|
|
@ -38,9 +38,18 @@ parser p_docker_header {
|
|||
);
|
||||
};
|
||||
|
||||
parser p_client_ip_port {
|
||||
csv-parser(
|
||||
template("${bind9.client.ip_port}")
|
||||
flags(strip-whitespace)
|
||||
delimiters("#")
|
||||
columns("bind9.client.ip", "bind9.client.port")
|
||||
);
|
||||
};
|
||||
|
||||
parser p_bind_client_ip_geoip2_city {
|
||||
geoip2(
|
||||
"${kv.SRC}",
|
||||
"${bind9.client.ip}",
|
||||
prefix( "geoip2.source." )
|
||||
database( "/config/GeoIP/GeoLite2-City.mmdb" )
|
||||
);
|
||||
|
@ -66,6 +75,8 @@ log {
|
|||
parser(p_bind_message);
|
||||
rewrite(r_docker_header);
|
||||
parser(p_docker_header);
|
||||
parser(p_client_ip_port);
|
||||
parser(p_bind_client_ip_geoip2_city);
|
||||
destination(d_bind_logs);
|
||||
flags(final);
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ services:
|
|||
syslog-ng:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/syslog-ng:240619.1.10
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/syslog-ng:240619.1.11
|
||||
container_name: syslog-ng
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
|
|
Loading…
Reference in New Issue