Skip to content

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

Closed
wants to merge 2 commits into from
Closed

Conversation

robgil
Copy link
Contributor

@robgil robgil commented Sep 4, 2018

Ref: #86

For use with DHCP logs, Firewall logs, or BGP logs.

Adds source.cidr, source.netmask, destination.cidr,destination.netmask, network.cidr, and network.netmask.

Rob Gil added 2 commits September 4, 2018 15:37
Ref: elastic#86

For use with DHCP logs, Firewall logs, or BGP logs.
Adds `source.cidr`, `source.netmask`, `destination.cidr`,
`destination.netmask`.
Copy link
Contributor

@ruflin ruflin left a 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
Copy link
Contributor

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.

@webmat
Copy link
Contributor

webmat commented Sep 5, 2018

@ruflin:

where do I search if I want to search across all of them?

A: Someone who uses .cidr and .netmask in multiple places should also add all these values in related.cidr and related.netmask, to simplify searching across all of them at the same time.

Copy link
Contributor

@webmat webmat left a 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
Copy link
Contributor

@webmat webmat Sep 5, 2018

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

@webmat
Copy link
Contributor

webmat commented Sep 5, 2018

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. :-)

@webmat webmat mentioned this pull request Sep 18, 2018
26 tasks
@ruflin ruflin mentioned this pull request Oct 31, 2018
22 tasks
@MikePaquette
Copy link
Contributor

I am closing this PR as it is outdated and the contributor is no longer active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants