iAviator
iAviator

Reputation: 1447

Parser filter plugin not working Td-agent [Fluentd]

My environment for running fluentd using td-agent is below:-

fluentd or td-agent version.
td-agent 1.3.3
Environment information:
Operating system: cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Kernel version: uname -r
4.4.0-1077-aws

Im using filter_parser plugin in my conf file as below:-

<filter input.s3>
 @type parser
 key_name message
 remove_key_name_field true
  <parse>
   @type regexp
   expression /^?<timestamp>[^ ]*) [^ ]* [^ ]* [^ ]* [^ ]* [^ ]* [^ ]* [^ ]* [^ ]* (?<url>[^ ]*) [^ ]* [^ ]* [^ ]* [^ ]* (?<platform>".+") [^ ]* (?<ref>".+")$/
    time_format %d/%b/%Y:%H:%M:%S %z
  </parse>
</filter>

Now, when i restart td-agent by below command i get error in command out put.

sudo /etc/init.d/td-agent restart
Error:- [....] Restarting td-agent (via systemctl): td-agent.serviceJob for td-agent.service failed because the control process exited with error code. See "systemctl status td-agent.service" and "journalctl -xe" for details.

My conf file is correct as i can see the parse succeeds in the log file of td agent as below:-

2019-03-24 11:53:16 +0000 [info]: parsing config file is succeeded path="/etc/td-agent/td-agent.conf"

Also, when i try to install the filter parser for older fluentd version that is from v0.12 (td-agent2, it seems to work and gives me error like format field is required which makes sense as the td-agentv3 doesn't have any format paramater.

When i remove this filter plugin everything works for me and the restart is successful.

It seems like the parser plugin for td-agentv3 is not working or detected by td-agent for me. Any guidance will be super helpful for me.

Upvotes: 0

Views: 895

Answers (0)

Related Questions