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

Haproxy filebeat TCP log format #8526

Closed
wants to merge 2 commits into from

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Oct 1, 2018

Refer to this Issue for more details elastic/integrations#3250

WIP of the TCP log format that requires #8428 to be merged first

@sayden sayden added enhancement in progress Pull request is currently in progress. module review Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. v6.5.0 labels Oct 1, 2018
IP of the destination host

--

Copy link
Member

Choose a reason for hiding this comment

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

We may want to make use of ECS here https://github.com/elastic/ecs#-destination-fields

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have given it a try but I got quite a lot of small blocking issues so I'm gonna continue with the old naming yet.

Copy link
Member

@jsoriano jsoriano Oct 17, 2018

Choose a reason for hiding this comment

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

Could you use ECS names under haproxy namespace in any case? (it'd be haproxy.destination.port and haproxy.destination.ip here)

description: Total time in milliseconds elapsed between the accept and the last close
- name: connection_waiting_time_ms
type: long
description: Total time in milliseconds elapsed between the accept and the last close
Copy link
Member

Choose a reason for hiding this comment

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

Other fields in this file start with the name of the metric, we should probably open another PR to rephrase them for consistency, @sayden can you take care of this?

description: time_wait_ms is the total time in milliseconds spent waiting for a full HTTP request from the client (not counting body) after the first byte was received.
type: long

- name: default
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't namespace these common fields under default.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I guess this comes from #8428

"haproxy.backend_name": "app",
"haproxy.backend_queue": 0,
"haproxy.bytes_read": 212,
"haproxy.client_ip": "127.0.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

Client IP could be a public one, so geoip data is filled.

"haproxy.frontend_name": "main",
"haproxy.pid": 25457,
"haproxy.process_name": "haproxy",
"haproxy.server_name": "<NOSRV>",
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is that no server name was provided in the config? I guess that for this case we could leave this field empty, or even remove it.
It'd be nice to have also an example of a log line with a proper server name.

"haproxy.termination_state": "SC",
"haproxy.total_waiting_time_ms": -1,
"input.type": "log",
"message": "Sep 20 15:44:23 127.0.0.1 haproxy[25457]: 127.0.0.1:40962 [20/Sep/2018:15:44:23.285] main app/<NOSRV> -1/-1/0 212 SC 1/1/0/0/0 0/0",
Copy link
Member

Choose a reason for hiding this comment

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

In other modules, message is removed after it is parsed, we may want to do the same on this module.

@sayden sayden force-pushed the haproxy-filebeat-tcplog-format branch from 5120f9f to 3e82444 Compare October 17, 2018 18:03
@sayden
Copy link
Contributor Author

sayden commented Oct 17, 2018

Continues here #8637

@sayden sayden closed this Oct 17, 2018
@sayden sayden deleted the haproxy-filebeat-tcplog-format branch October 18, 2018 11:09
@urso urso removed the needs_backport PR is waiting to be backported to other branches. label Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Filebeat Filebeat in progress Pull request is currently in progress. module review v6.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants