![]() ![]() This needs a little bit of processing to make it Elasticsearch / Kibana friendly but can be achieved within Elasticsearch by using a processor. The Log4j2 JSONLayout adds a timestamp field named timeMillis which is UNIX time (seconds since epoch) formatted. The compact and eventEol settings are necessary for Filebeat to be able to parse the log file as JSON. Scroll further down to where all the existing appenders are defined and add your new JSON appender: # JSON log appender ![]() In order to enable JSON logging in OH, edit the etc/.cfg file (usually in /var/lib/openhab2) and amend the Root Logger section near the top to add the new appender ref: # Root logger For optimal experience, Filebeat only connects to instances. We’re going to configure OH to emit a JSON log file which will then be picked up by Filebeat and sent off directly to Elasticsearch. This output works with all compatible versions of Elasticsearch. The guide assumes you already installed Elasticsearch (+ Kibana) as well as Filebeat. The following steps have been tested on OpenHab 2.4 and the 7.3 version of the Elastic stack (according to the documentation this should work all the way back to 5.0 though).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |