Logstash CIDR Plugin not working

Hi, I need to filter events by IP addresses. I would like to use CIDR plugin but it is not working for me.

This is my code:

filter {
if [type] == "mytype" {
	  address => [ "%{srcip}" ]
	  network => [ "" ]
	  add_tag => [ "mytag" ]
	if "mytag" not in [tags]{
	drop {}
if [type] == "mytype"{
udp {
                host => ""
                port => 514
		codec => line { format => "%{message}" }
		id => "myid"

This is a piece of a log:

eventtime=165646546546 tz=\"+0200\" srcip= srcport=10000

Unfortunally It looks like there is not a match in the filter and anything is sent to the output.

Can you help me?

I recommend removing all conditional statements

if [type] == "mytype" {


if "mytag" not in [tags]{

and send everything to a log file using the stdout{} output filter.
Break it down piece by piece and see where the problems comes up.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.