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

Add http.request.body. #263

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ All notable changes to this project will be documented in this file based on the
* Reintroduce a streamlined `user_agent` field set. #240
* Add `geo.name` for ad hoc location names. #248
* Add `event.timezone` to allow for proper interpretation of incomplete timestamps. #258
* Add `http.request.body`. #263

### Improvements
* Improved the definition of the file fields #196
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ Fields related to HTTP activity.
|---|---|---|---|---|
| <a name="http.request.method"></a>http.request.method | Http request method. | extended | keyword | `GET, POST, PUT` |
| <a name="http.request.referrer"></a>http.request.referrer | Referrer for this HTTP request. | extended | keyword | `https://blog.example.com/` |
| <a name="http.response.status_code"></a>http.response.status_code | Http response status code. | extended | long | `404` |
| <a name="http.request.body"></a>http.request.body | The full http request body. | extended | keyword | `Hello world` |
| <a name="http.response.body"></a>http.response.body | The full http response body. | extended | keyword | `Hello world` |
| <a name="http.response.status_code"></a>http.response.status_code | Http response status code. | extended | long | `404` |
| <a name="http.version"></a>http.version | Http version. | extended | keyword | `1.1` |


Expand Down
15 changes: 11 additions & 4 deletions fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,12 @@
Referrer for this HTTP request.
example: https://blog.example.com/

- name: response.status_code
- name: request.body
Copy link
Member

Choose a reason for hiding this comment

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

This seems to conflict with #239

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well 239 is about adding the size metrics.

This current PR is adding the other body with the same semantics as it had before. But if we go forward with 239's proposal to nest the body content at body.content, then this implementation will indeed need to change.

Was just trying to keep concerns separate ;-)

level: extended
type: long
type: keyword
description: >
Http response status code.
example: 404
The full http request body.
example: Hello world

- name: response.body
level: extended
Expand All @@ -865,6 +865,13 @@
The full http response body.
example: Hello world

- name: response.status_code
level: extended
type: long
description: >
Http response status code.
example: 404

- name: version
level: extended
type: keyword
Expand Down
1 change: 1 addition & 0 deletions schema.csv
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ host.ip,ip,core,
host.mac,keyword,core,
host.name,keyword,core,
host.type,keyword,core,
http.request.body,keyword,extended,Hello world
http.request.method,keyword,extended,"GET, POST, PUT"
http.request.referrer,keyword,extended,https://blog.example.com/
http.response.body,keyword,extended,Hello world
Expand Down
15 changes: 11 additions & 4 deletions schemas/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
Referrer for this HTTP request.
example: https://blog.example.com/

- name: response.status_code
- name: request.body
level: extended
type: long
type: keyword
description: >
Http response status code.
example: 404
The full http request body.
example: Hello world

- name: response.body
level: extended
Expand All @@ -35,6 +35,13 @@
The full http response body.
example: Hello world

- name: response.status_code
level: extended
type: long
description: >
Http response status code.
example: 404

- name: version
level: extended
type: keyword
Expand Down
4 changes: 4 additions & 0 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@
"properties": {
"request": {
"properties": {
"body": {
"ignore_above": 1024,
"type": "keyword"
},
"method": {
"ignore_above": 1024,
"type": "keyword"
Expand Down