Custom haproxy module grok pattern failing

Which filebeat version are you using? I assume your problem is that source in Filebeat 6.x is a keyword and only in 7.x will be an object and work with the above.