Skip to content

Commit

Permalink
[Metricbeat] Rename http.request.body to http.request.body.content fo…
Browse files Browse the repository at this point in the history
…r ECS (#10315)

The header fields were not touched in this change as not defined yet in ECS.
  • Loading branch information
ruflin authored Jan 28, 2019
1 parent 4e78750 commit dc5cf51
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Refactor Prometheus metric mappings {pull}9948[9948]
- Removed Prometheus stats metricset in favor of just using Prometheus collector {pull}9948[9948]
- Adjust Redis.info metricset fields to ECS. {pull}10319[10319]
- Rename http.request.body field to http.request.body.content. {pull}10315[10315]

*Packetbeat*

Expand Down
6 changes: 6 additions & 0 deletions dev-tools/ecs-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,12 @@
alias: true
beat: metricbeat

### HTTP
- from: http.request.body
to: http.request.body.content
alias: false
beat: metricbeat

### Zookeeper

- from: zookeeper.mntr.version
Expand Down
10 changes: 0 additions & 10 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10543,16 +10543,6 @@ type: object
The HTTP headers sent
--
*`http.request.body`*::
+
--
type: keyword
The HTTP payload sent
--
[float]
Expand Down
4 changes: 0 additions & 4 deletions metricbeat/module/http/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
type: object
description: >
The HTTP headers sent
- name: body
type: keyword
description: >
The HTTP payload sent
- name: response
type: group
description: >
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/http/fields.go

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

4 changes: 3 additions & 1 deletion metricbeat/module/http/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ func (m *MetricSet) processBody(response *http.Response, jsonBody interface{}) c
"request": common.MapStr{
"headers": m.getHeaders(response.Request.Header),
"method": response.Request.Method,
"body": m.body,
"body": common.MapStr{
"content": m.body,
},
},
}
}
Expand Down

0 comments on commit dc5cf51

Please sign in to comment.