NLog outputting all fields in `message` property in Kibana

8 views
Skip to first unread message

Peter Morris

unread,
Jul 11, 2018, 6:38:13 AM7/11/18
to NLog-Users

I'm using NLog with a Redis target. In an older version all of the attributes in my layout used to appear as 1st class data-items when viewing in Kibana.


Since upgrading to the latest version they all appear as a JSON encoded string value against a single data-item named message.


I've tried specifying a JsonLayout for the message value but it has made no difference:


<targets async="true">

  <target xsi:type="FallbackGroup" name="fallbacklogger" returnToFirstOnSuccess="true">

    <target xsi:type="Redis" name="RedisLog" appName="${appName}" environmentKey="EnvironmentName" connectionStringKey="LoggingRedisConnectionString" includeAllProperties="true" keySettingsKey="LoggingRedisKey">

      <layout xsi:type="JsonLayout">


        <attribute name="message" encode="false">

          <layout type="JsonLayout" includeAllProperties="true" includeMdlc="true"></layout>

        </attribute>


      </layout>

    </target>

  </target>

</targets>


How do I get these back to first class data-items in Kibana so that I can click the Filter button against them? Is this something I need to change in NLog, or somewhere else?



Message

Reply all
Reply to author
Forward
0 new messages