@version: 3.30
# One network source, which collects logs from various hosts
source s_network {
network(port(12345));
};
# One known host, with the IP 127.0.0.1
filter f_host1 {
netmask("127.0.0.1");
};
# Another known host with the IP 127.0.0.2
filter f_host2 {
netmask("127.0.0.2");
};
# The destination, where host1's logs will be forwarded to
destination d_network1 {
network("localhost" port(23456));
};
# The destination, where host2's logs will be forwarded to
destination d_network2 {
network("localhost" port(23457));
};
log {
source(s_network);
# First branch, for host1 -> destination1
log {
filter(f_host1);
destination(d_network1);
flags(final); # Don't forget to stop processing
};
# Second branch, for host2 -> destination2
log {
filter(f_host2);
destination(d_network2);
flags(final); # Don't forget to stop processing
};
};