# Haproxy grokparsefailure

**URL:** <https://discuss.elastic.co/t/haproxy-grokparsefailure/229899>\
**Category:** Logstash\
**Created:** [April 27, 2020, 5:41am UTC](https://discuss.elastic.co/t/haproxy-grokparsefailure/229899 "2020-04-27T05:41:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vakarthik](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vakarthik](https://discuss.elastic.co/u/vakarthik)\
**Post date:** [April 27, 2020, 5:41am UTC](https://discuss.elastic.co/t/haproxy-grokparsefailure/229899/1 "2020-04-27T05:41:04Z")

</div>

HAPRoxy Logstash Grok Parse Failure

This is my log entry from HAProxy (pfsense haproxy package)

`"message": "<142>Apr 27 02:24:00 haproxy[37279]: 162.158.155.249:54250 [27/Apr/2020:02:24:00.173] shared-frontend-merged~ example.com_ipvANY/emaple.com 0/0/192/170/363 200 3411 - - ---- 2/2/0/1/0 0/0 \"GET / HTTP/1.1\"\n",`

I have default grok enabled in logstash but i still get log parse failure. is it because the logs have appended syslog header ?

`grok {`

`match => { "message" => "%{HAPROXYHTTP}" }`

`}`

can anyone help me with correct grok ?

---

<div class="post-metadata">

**Author:** ![vakarthik](https://avatars.discourse-cdn.com/v4/letter/v/e79b87/32.png) [@vakarthik](https://discuss.elastic.co/u/vakarthik)\
**Post date:** [April 27, 2020, 10:15am UTC](https://discuss.elastic.co/t/haproxy-grokparsefailure/229899/2 "2020-04-27T10:15:23Z")

</div>

Thnaks.  
This solved my issue.

> [@Haproxy format changes when sending directly](https://discuss.elastic.co/t/haproxy-format-changes-when-sending-directly/172681):
>
> Hello, I am using logstash to ship haproxy logs to my elk stack. MY haproxy configuration - global log 127.0.0.1:10514 local0 chroot /var/lib/haproxy user haproxy group haproxy maxconn 55550 maxcompcpuusage 100 maxcomprate 0 nbproc 1 ssl-server-verify none daemon Logstash configuration - input { udp { host =\> "0.0.0.0" port =\> 10514 type =\> "logs" } } filter { grok { match =\> ["message", "%{HAPROXYHTTP}"] } } output { elasticsearch {…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 25, 2020, 10:15am UTC](https://discuss.elastic.co/t/haproxy-grokparsefailure/229899/3 "2020-05-25T10:15:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
