-
Notifications
You must be signed in to change notification settings - Fork 438
Adds .cidr and .netmask #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ref: elastic#86 For use with DHCP logs, Firewall logs, or BGP logs.
Adds `source.cidr`, `source.netmask`, `destination.cidr`, `destination.netmask`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR will need a changelog entry.
So far I assumed cidr/netmask will added to network. In which cases network is used and when is source/desitation used? And where do I search if I want to search across all of them?
- name: cidr | ||
type: ip | ||
description: > | ||
CIDR of the source IP address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add examples as you did in the others above?
Nit: Please add dots at the end of the descriptions as it will show up like this in the docs.
A: Someone who uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Nic on changelog, examples and periods at the end of the descriptions.
New request: .cidr
should be ip_range
. The .netmask
fields are fine as ip
, however.
@@ -203,6 +203,14 @@ | |||
IP address of the destination. | |||
|
|||
Can be one or multiple IPv4 or IPv6 addresses. | |||
- name: cidr | |||
type: ip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each .cidr
field should actually be of type ip_range
[1], not ip
[2]. You can search an ip
field with a CIDR range, but you can't store a range directly in it.
If you want to play with these in a Kibana console:
PUT ip_test
{ "mappings": {
"_doc": {
"properties": {
"address": {
"type": "ip"
},
"range": {
"type": "ip_range"
}}}}}
PUT ip_test/_doc/1
{ "address": "127.0.0.1" }
PUT ip_test/_doc/2
{ "address": "::1" }
PUT ip_test/_doc/3
{ "address": "255.255.255.0" }
# Fails:
PUT ip_test/_doc/4
{ "address": "10.0.0.0/8" }
PUT ip_test/_doc/4
{ "range": "10.0.0.0/8" }
# Fails:
PUT ip_test/_doc/5
{ "range": "255.255.255.0" }
GET ip_test/_search
DELETE ip_test
Tip: in your PR body, if you have a line that says "Closes #86", GitHub will close the referenced issue automatically when this PR is merged. :-) |
I am closing this PR as it is outdated and the contributor is no longer active. |
Ref: #86
For use with DHCP logs, Firewall logs, or BGP logs.
Adds
source.cidr
,source.netmask
,destination.cidr
,destination.netmask
,network.cidr
, andnetwork.netmask
.