Yaswanth
(Yaswanth )
June 28, 2017, 2:19pm
#1
Hi,
My usecase i want to drop a field if it doesnt satisfy the value like
if [ServerName] ! "data-0","data-1","data-2"
drop ServerName
(i.e. I want to drop the ServerName field in an event if it doesn't have either data-0,data-1,data-2 in it.
Note: I dont want to stop the whole event i just want to drop only the ServerName field.
Thanks
ld_pvl
June 28, 2017, 2:29pm
#2
Yaswanth
(Yaswanth )
June 28, 2017, 2:33pm
#3
Thanks
Looking into it but i want to check not equal condition on 3 strings in ServerName field
if !("SERVERNAME" in ["esndata-0", "esndata-1", "esndata-2" ]) {
mutate { add_tag => "shouldexist" }
}
}
That is if SERVERNAME doesnt have either of the given strings then it should add a tag.
Is the above syntax is correct?
Thanks
ld_pvl
June 28, 2017, 2:43pm
#4
system
(system)
closed
July 26, 2017, 2:43pm
#5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.