-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Grok for new haproxy module in filebeat fail #8301
Comments
Hi @RemiDesgrange, Thanks for reporting this! It is weird because your format doesn't look like any of the default haproxy log formats according to its documentation. The "default" one, used when no other log option is set is discouraged and marked as deprecated, but it still looks different to yours. In any case if it works for you with |
@RemiDesgrange If this work for you we should consider on our side to update the documentation with mention that setting. |
Ok @jsoriano I already have this option in default:
Maybe I should make it global. But I don't modify anything in frontend/backend about logs. Is there any other config file beside |
Having this option in defaults should be enough, yes 🤔 We will have to investigate it further. I don't know of any other config file that could be affecting this. |
I have been doing some quick tests in a clean debian jessie with haproxy 1.5.8-3+deb8u2 and logs look like the ones in the documentation. I have added this config to the haproxy config provided by the package:
And doing requests with curl to ports 81 and 82 I see logs like:
The only variable parts are the ones between curly brackets, they are captured headers, I think that current patterns are expecting them and they don't need to be present, we will have to handle this.
And a catch it all pattern for this kind of messages:
I am checking the logs in |
@RemiDesgrange could you double-check that you don't have any |
Oh god... yes in the frontend part... This is so dumb... I'm sorry. Ok closing. |
@RemiDesgrange good to read that an explanation has been found 🙂 |
We're running into the same issue. We don't have a log-format option in our haproxy.cfg file. Any advice would be great! |
Hi @SETI, |
thanks. checking the capture hearders - I know I'm not capturing them currently. Here is an message from ELK: Provided Grok expressions do not match field value: [Jan 9 10:06:46 haproxy3 haproxy[14466]: 46.229.168.132:35508 [09/Jan/2019:10:06:46.638] http_in bigpicturescience_backend_farm/bps1 0/0/0/73/74 200 52952 - - ---- 1/1/0/0/0 0/0 "GET /episodes?order=title&page=4&sort=asc&tag=behavior&view=tag HTTP/1.1"] |
I have haproxy from debian repo, version 1.5.8. Log conf is:
Filebeat haproxy module is configured as follow:
a typical log line (heartbeat from a monitoring tool):
a real line that fetch real data from a backend server
This produce a grok error in elasticsearch. Since I'm using "default" logging in haproxy, I found weird that I got error from Grok.
go get
,cd
andmake
)The text was updated successfully, but these errors were encountered: