Skip to content

Commit

Permalink
Add Autonomous System (AS) fields (#341)
Browse files Browse the repository at this point in the history
This adds fields for Autonomous System (AS) information. It's common to enrich
events containing IP addresses with information about the AS controlling that
address.
  • Loading branch information
andrewkroh authored Jul 8, 2019
1 parent ccba36b commit a35a903
Show file tree
Hide file tree
Showing 13 changed files with 634 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Added `file.created`, and `file.accessed`. #445
* Added `domain` field to user. #486
* Added `.nat.ip` and `.nat.port` to `source`, `destination`, `client` and `server`. #491

* Added `as` fields for Autonomous System information (i.e. ASN). #341

### Improvements

Expand Down
33 changes: 33 additions & 0 deletions code/go/ecs/as.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions docs/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,52 @@ example: `6.0.0-rc2`

|=====

[[ecs-as]]
=== Autonomous System Fields

An autonomous system (AS) is a collection of connected Internet Protocol (IP) routing prefixes under the control of one or more network operators on behalf of a single administrative entity or domain that presents a common, clearly defined routing policy to the internet.

==== Autonomous System Field Details

[options="header"]
|=====
| Field | Description | Level

// ===============================================================

| as.number
| Unique number allocated to the autonomous system. The autonomous system number (ASN) uniquely identifies each network on the Internet.

type: long

example: `15169`

| extended

// ===============================================================

| as.organization.name
| Organization name.

type: keyword

example: `Google LLC`

| extended

// ===============================================================

|=====

==== Field Reuse

The `as` fields are expected to be nested at: `client.as`, `destination.as`, `server.as`, `source.as`.

Note also that the `as` fields are not expected to be used directly at the top level.




[[ecs-client]]
=== Client Fields

Expand Down Expand Up @@ -295,6 +341,12 @@ type: long
// ===============================================================


| <<ecs-as,client.as.*>>
| Fields describing an Autonomous System (Internet routing prefix).

// ===============================================================


| <<ecs-geo,client.geo.*>>
| Fields describing a location.

Expand Down Expand Up @@ -625,6 +677,12 @@ type: long
// ===============================================================


| <<ecs-as,destination.as.*>>
| Fields describing an Autonomous System (Internet routing prefix).

// ===============================================================


| <<ecs-geo,destination.geo.*>>
| Fields describing a location.

Expand Down Expand Up @@ -2563,6 +2621,12 @@ type: long
// ===============================================================


| <<ecs-as,server.as.*>>
| Fields describing an Autonomous System (Internet routing prefix).

// ===============================================================


| <<ecs-geo,server.geo.*>>
| Fields describing a location.

Expand Down Expand Up @@ -2817,6 +2881,12 @@ type: long
// ===============================================================


| <<ecs-as,source.as.*>>
| Fields describing an Autonomous System (Internet routing prefix).

// ===============================================================


| <<ecs-geo,source.geo.*>>
| Fields describing a location.

Expand Down
2 changes: 2 additions & 0 deletions docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ all fields are defined.

| <<ecs-agent,Agent>> | Fields about the monitoring agent.

| <<ecs-as,Autonomous System>> | Fields describing an Autonomous System (Internet routing prefix).

| <<ecs-client,Client>> | Fields about the client side of a network connection, used with server.

| <<ecs-cloud,Cloud>> | Fields about the cloud resource.
Expand Down
69 changes: 69 additions & 0 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,27 @@
ignore_above: 1024
description: Version of the agent.
example: 6.0.0-rc2
- name: as
title: Autonomous System
group: 2
description: An autonomous system (AS) is a collection of connected Internet Protocol
(IP) routing prefixes under the control of one or more network operators on
behalf of a single administrative entity or domain that presents a common, clearly
defined routing policy to the internet.
type: group
fields:
- name: number
level: extended
type: long
description: Unique number allocated to the autonomous system. The autonomous
system number (ASN) uniquely identifies each network on the Internet.
example: 15169
- name: organization.name
level: extended
type: keyword
ignore_above: 1024
description: Organization name.
example: Google LLC
- name: client
title: Client
group: 2
Expand Down Expand Up @@ -140,6 +161,18 @@
Then it should be duplicated to `.ip` or `.domain`, depending on which one
it is.'
- name: as.number
level: extended
type: long
description: Unique number allocated to the autonomous system. The autonomous
system number (ASN) uniquely identifies each network on the Internet.
example: 15169
- name: as.organization.name
level: extended
type: keyword
ignore_above: 1024
description: Organization name.
example: Google LLC
- name: bytes
level: core
type: long
Expand Down Expand Up @@ -403,6 +436,18 @@
Then it should be duplicated to `.ip` or `.domain`, depending on which one
it is.'
- name: as.number
level: extended
type: long
description: Unique number allocated to the autonomous system. The autonomous
system number (ASN) uniquely identifies each network on the Internet.
example: 15169
- name: as.organization.name
level: extended
type: keyword
ignore_above: 1024
description: Organization name.
example: Google LLC
- name: bytes
level: core
type: long
Expand Down Expand Up @@ -1816,6 +1861,18 @@
Then it should be duplicated to `.ip` or `.domain`, depending on which one
it is.'
- name: as.number
level: extended
type: long
description: Unique number allocated to the autonomous system. The autonomous
system number (ASN) uniquely identifies each network on the Internet.
example: 15169
- name: as.organization.name
level: extended
type: keyword
ignore_above: 1024
description: Organization name.
example: Google LLC
- name: bytes
level: core
type: long
Expand Down Expand Up @@ -2053,6 +2110,18 @@
Then it should be duplicated to `.ip` or `.domain`, depending on which one
it is.'
- name: as.number
level: extended
type: long
description: Unique number allocated to the autonomous system. The autonomous
system number (ASN) uniquely identifies each network on the Internet.
example: 15169
- name: as.organization.name
level: extended
type: keyword
ignore_above: 1024
description: Organization name.
example: Google LLC
- name: bytes
level: core
type: long
Expand Down
10 changes: 10 additions & 0 deletions generated/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ agent.id,keyword,core,8a4f500d,1.1.0-dev
agent.name,keyword,core,foo,1.1.0-dev
agent.type,keyword,core,filebeat,1.1.0-dev
agent.version,keyword,core,6.0.0-rc2,1.1.0-dev
as.number,long,extended,15169,1.1.0-dev
as.organization.name,keyword,extended,Google LLC,1.1.0-dev
client.address,keyword,extended,,1.1.0-dev
client.as.number,long,extended,15169,1.1.0-dev
client.as.organization.name,keyword,extended,Google LLC,1.1.0-dev
client.bytes,long,core,184,1.1.0-dev
client.domain,keyword,core,,1.1.0-dev
client.geo.city_name,keyword,core,Montreal,1.1.0-dev
Expand Down Expand Up @@ -47,6 +51,8 @@ container.labels,object,extended,,1.1.0-dev
container.name,keyword,extended,,1.1.0-dev
container.runtime,keyword,extended,docker,1.1.0-dev
destination.address,keyword,extended,,1.1.0-dev
destination.as.number,long,extended,15169,1.1.0-dev
destination.as.organization.name,keyword,extended,Google LLC,1.1.0-dev
destination.bytes,long,core,184,1.1.0-dev
destination.domain,keyword,core,,1.1.0-dev
destination.geo.city_name,keyword,core,Montreal,1.1.0-dev
Expand Down Expand Up @@ -231,6 +237,8 @@ process.uptime,long,extended,1325,1.1.0-dev
process.working_directory,keyword,extended,/home/alice,1.1.0-dev
related.ip,ip,extended,,1.1.0-dev
server.address,keyword,extended,,1.1.0-dev
server.as.number,long,extended,15169,1.1.0-dev
server.as.organization.name,keyword,extended,Google LLC,1.1.0-dev
server.bytes,long,core,184,1.1.0-dev
server.domain,keyword,core,,1.1.0-dev
server.geo.city_name,keyword,core,Montreal,1.1.0-dev
Expand Down Expand Up @@ -262,6 +270,8 @@ service.state,keyword,core,,1.1.0-dev
service.type,keyword,core,elasticsearch,1.1.0-dev
service.version,keyword,core,3.2.4,1.1.0-dev
source.address,keyword,extended,,1.1.0-dev
source.as.number,long,extended,15169,1.1.0-dev
source.as.organization.name,keyword,extended,Google LLC,1.1.0-dev
source.bytes,long,core,184,1.1.0-dev
source.domain,keyword,core,,1.1.0-dev
source.geo.city_name,keyword,core,Montreal,1.1.0-dev
Expand Down
Loading

0 comments on commit a35a903

Please sign in to comment.