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