stream利的JSONparsing器:获取无法parsing的消息

在我目前的项目中,我必须处理不同types的日志logging在一个来源(http)中进入我的fluentd。 大多数条目是JSON格式的,但在某些情况下,我必须处理明文logging。 (例如,在设置日志库之前的例外情况)。 我如何处理我的fluentd-config中的这种情况?

我的详细设置:我使用Docker的fluentd-logging-driver作为一些带有node.js-app的容器。 node.js-app有一个日志logging库,它以json格式将所有内容logging到stdout / stderr。 每个运行时exception也将被格式化为json。 我的问题只发生在node.js无法启动(如缺less依赖关系..)。 在这种情况下,exception将被格式化为纯文本。 这会导致fluentd中的错误,因为它不能被parsing。 Fluentd也运行在一个容器中。
我的第一个方法是将fluentd-own-messages(包括parsing器错误消息)也logging到我的elasticsearch中,但是原来的消息get的来源是这种方法丢失的。 我运行了大约15个不同的服务,所以我真的需要我的exception的“源”。

<source> @type forward port 24224 </source> <filter fluent.**> @type record_transformer <record> fields.module fluentd #fields.module is my identifier for the source </record> </filter> <match fluent.**> @include elastic.conf #elastic configuration is in a separate file </match> # JSON-Parse <filter **> @type parser @log_level trace format json key_name log hash_value_field fields </filter> <match logging.**> @include elastic.conf </match>