Skip to content

Commit

Permalink
Fix mapping for Packetbeat flow metrics
Browse files Browse the repository at this point in the history
The following fields were marked as not_analyzed strings and should be longs.

- source.stats.net_packets_total
- source.stats.net_bytes_total
- dest.stats.net_bytes_total
- dest.stats.net_packets_total

Issue elastic#2177
  • Loading branch information
andrewkroh committed Aug 9, 2016
1 parent 61fd22f commit 258abcd
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha5...master[Check the HEAD d
*Metricbeat*

*Packetbeat*
- Fix mapping for some Packetbeat flow metrics that were not marked as being longs. {issue}2177[2177]

*Topbeat*

Expand Down
8 changes: 8 additions & 0 deletions packetbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -971,12 +971,16 @@ Object with source to destination flow measurements.
[float]
=== source.stats.net_packets_total

type: long

Total number of packets


[float]
=== source.stats.net_bytes_total

type: long

Total number of bytes


Expand Down Expand Up @@ -1073,12 +1077,16 @@ Object with destination to source flow measurements.
[float]
=== dest.stats.net_packets_total

type: long

Total number of packets


[float]
=== dest.stats.net_bytes_total

type: long

Total number of bytes


Expand Down
4 changes: 4 additions & 0 deletions packetbeat/etc/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,12 @@
Object with source to destination flow measurements.
fields:
- name: net_packets_total
type: long
description: >
Total number of packets
- name: net_bytes_total
type: long
description: >
Total number of bytes
Expand Down Expand Up @@ -274,10 +276,12 @@
Object with destination to source flow measurements.
fields:
- name: net_packets_total
type: long
description: >
Total number of packets
- name: net_bytes_total
type: long
description: >
Total number of bytes
- name: icmp_id
Expand Down
16 changes: 4 additions & 12 deletions packetbeat/packetbeat.template-es2x.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,10 @@
"stats": {
"properties": {
"net_bytes_total": {
"ignore_above": 1024,
"index": "not_analyzed",
"type": "string"
"type": "long"
},
"net_packets_total": {
"ignore_above": 1024,
"index": "not_analyzed",
"type": "string"
"type": "long"
}
}
}
Expand Down Expand Up @@ -1083,14 +1079,10 @@
"stats": {
"properties": {
"net_bytes_total": {
"ignore_above": 1024,
"index": "not_analyzed",
"type": "string"
"type": "long"
},
"net_packets_total": {
"ignore_above": 1024,
"index": "not_analyzed",
"type": "string"
"type": "long"
}
}
}
Expand Down
12 changes: 4 additions & 8 deletions packetbeat/packetbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,10 @@
"stats": {
"properties": {
"net_bytes_total": {
"ignore_above": 1024,
"type": "keyword"
"type": "long"
},
"net_packets_total": {
"ignore_above": 1024,
"type": "keyword"
"type": "long"
}
}
}
Expand Down Expand Up @@ -946,12 +944,10 @@
"stats": {
"properties": {
"net_bytes_total": {
"ignore_above": 1024,
"type": "keyword"
"type": "long"
},
"net_packets_total": {
"ignore_above": 1024,
"type": "keyword"
"type": "long"
}
}
}
Expand Down

0 comments on commit 258abcd

Please sign in to comment.