LogTrail is a plugin for Kibana to view, analyze, search, and tail log events from multiple hosts in realtime with DevOps friendly interface inspired by Papertrail.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/kibana/Dockerfile | 10 +++++++++ container/kibana/logtrail.json | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 container/kibana/logtrail.json
diff --git a/container/kibana/Dockerfile b/container/kibana/Dockerfile index 970eb5a..60b889d 100644 --- a/container/kibana/Dockerfile +++ b/container/kibana/Dockerfile @@ -10,3 +10,13 @@ FROM ${BASE_IMAGE} MAINTAINER Wu Zhende wuzhende666@163.com
RUN sed -i 's/server.host: "0"/server.host: "0.0.0.0"/' config/kibana.yml + +USER root +RUN yum -y install wget \ + && wget https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-7.6... -O /logtrail-7.6.2-0.1.31.zip + +USER 1090 +RUN ./bin/kibana-plugin install file:///logtrail-7.6.2-0.1.31.zip \ + && rm -rf /tmp/logtrail-7.6.2-0.1.31.zip + +COPY --chown=1090:1090 logtrail.json /usr/share/kibana/plugins/logtrail/logtrail.json diff --git a/container/kibana/logtrail.json b/container/kibana/logtrail.json new file mode 100644 index 0000000..304a4b3 --- /dev/null +++ b/container/kibana/logtrail.json @@ -0,0 +1,41 @@ +{ + "version": 2, + "index_patterns": [{ + "es": { + "default_index": "scheduler-3016", + "allow_url_parameter": false, + "timezone": "CST" + }, + "tail_interval_in_seconds": 10, + "es_index_time_offset_in_seconds": 0, + "display_timezone": "CST", + "display_timestamp_format": "YYYY MMM DD HH:mm:ss", + "max_buckets": 500, + "nested_objects": false, + "default_time_range_in_days": 0, + "max_hosts": 100, + "max_events_to_keep_in_viewer": 5000, + "default_search": "", + "fields": { + "mapping": { + "timestamp": "time", + "display_timestamp" : "time", + "hostname": "container_name", + "program": "tags", + "message": "log" + }, + "message_format": "{{{log}}}", + "keyword_suffix": "keyword" + }, + "color_mapping": { + "field": "level", + "mapping": { + "ERROR": "#FF0000", + "WARN": "#FFEF96", + "DEBUG": "#B5E7A0", + "TRACE": "#CFE0E8", + "INFO": "#339999" + } + } + }] +}