Skip to content
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

Change the fields exported by flows #1291

Merged
merged 2 commits into from Apr 4, 2016

Conversation

monicasarbu
Copy link
Contributor

No description provided.

@monicasarbu
Copy link
Contributor Author

Export the following fields:

  "_source": {
    "@timestamp": "2016-04-03T21:27:20.006Z",
    "beat": {
      "hostname": "mar.local",
      "name": "mar.local"
    },
    "dest": {
      "ip": "172.16.2.200",
      "port": 8081,
      "stats": {
        "net_bytes_total": 2768,
        "net_packets_total": 13
      }
    },
    "source": {
      "ip": "172.16.2.1",
      "port": 59720,
      "stats": {
        "net_bytes_total": 1394,
        "net_packets_total": 14
      }
    },
    "final": false,
    "flow_id": "EAT/////AP//////CP8AAAGsEAIBrBACyEjpkR8",
    "last_time": "2016-04-03T21:26:54.771Z",
    "start_time": "2016-04-03T21:26:54.771Z",
    "tags": [
      "service-X",
      "web-tier"
    ],
    "transport": "tcp",
    "type": "flow"
  },

- name: ip4
description: >
Innermost IPv4 source address as indicated by first packet seen for the
current flow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use spaces instead of tabs? Just to keep the same formatting as in the rest of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses only spaces.

@tsg
Copy link
Contributor

tsg commented Apr 4, 2016

LGTM. @urso should check that nothing is lost in the reorg.



==== mac_dest
==== outter_vlan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, typo. Just figured it must say 'outer', not 'outter'. I'm afraid this error is all over the place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


for _, name := range ipFieldNames {
source[name[1]] = getLocation(source, name[0])
dest[name[1]] = getLocation(dest, name[0])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sets "ip6_location" to "", even if no "ip6" address is in source/dest. We should only set field, if address really in event

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I forgot to add the check.

@urso
Copy link

urso commented Apr 4, 2016

LGTM

@urso urso merged commit 2f48f37 into elastic:master Apr 4, 2016
@dedemorton dedemorton mentioned this pull request Dec 6, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants