tatdat
(Dat Pham Tat)
June 16, 2017, 3:06am
1
Hi,
Im using Kibana 5.4.0
I have field netflow.ipv4_dst_addr
. I want check this is private ỏ public ip.
Here is my script filed
def m = ^(?:10|127|172.(?:1[6-9]|2[0-9]|3[01])|192.168)..*$/.matcher(doc['netflow.ipv4_dst_addr'].value);
if ( m.matches() ) {
return "private"
} else {
return "public"
}
but kibana show compile error
Can u suggest me script field for this case ? And where is i can debug script field before put script to kibana?
Thanks
tatdat
(Dat Pham Tat)
June 19, 2017, 1:49am
2
Can Anyone help me. thanks!
Since this seems to be a static pattern, why not add a field at ingest time? This is likely to perform and scale better than a scripted field.
tatdat
(Dat Pham Tat)
June 20, 2017, 3:46pm
4
Thank for reply.
I used grok filter for this. it solved
system
(system)
Closed
July 18, 2017, 3:46pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.