05 May 2014

Config log4net send log to elasticsearch with fluentd and kibana - realtime and centralization - part 2

<< Back to part 1 <<

1. Config Log4net to push log with syslog format :

On the Log4net machine, config the appender like this :

<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
  <remoteAddress value="10.90.7.195" />
  <remotePort value="5140" />
  <layout type="log4net.Layout.PatternLayout, log4net">
   <conversionPattern value="&lt;190&gt;%date{MMM dd HH:mm:ss} %P{log4net:HostName} %logger: %thread %level %logger Inside-Log %P{log4net:HostName} [[%message" />
  </layout>
  <filter type="log4net.Filter.LevelRangeFilter">
   <param name="LevelMin" value="INFO" />
   <param name="LevelMax" value="ERROR" />
  </filter>
</appender>

Config log4net send log to elasticsearch with fluentd and kibana - realtime and centralization.






This post will help you to config Apache log4net Library to output log to a centralization logging system, which can be used to watch realtime log events + searching + analysis ...

I will use 2 machines in this scenario :

- The Log4net machine with IP = 10.90.7.194, this machine act as the source log generator (installed or used with some application which has implemented Apache Log4net Lib). The Log4net will be configed to send log stream using syslog format on UDP protocol.