sivasamyk / logtrail

Kibana plugin to view, search & live tail log events
MIT License
1.4k stars 185 forks source link

logtrail docker image for Kubernetes #376

Open guyta-essence opened 4 years ago

guyta-essence commented 4 years ago

hi can some create a logtrail docker image for Kubernetes with config map for the trail?

Tharun-Sabbu commented 4 years ago

@guyta-essence

Dockerfile:

FROM docker.elastic.co/kibana/kibana:7.3.1
ENV KIBANA_VER=7.3.1
RUN kibana-plugin install https://github.com/pjhampton/kibana-prometheus-exporter/releases/download/${KIBANA_VER}/kibana-prometheus-exporter-${KIBANA_VER}.zip
RUN kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-${KIBANA_VER}-0.1.31.zip
USER root
RUN rm -rf /usr/share/kibana/plugins/logtrail/logtrail.json
RUN mkdir /config
COPY logtrail.json /config/
RUN ln -s /config/logtrail.json /usr/share/kibana/plugins/logtrail/logtrail.json

logtrail.json:

{
  "version" : 1,
  "index_patterns" : [
    {
      "es": {
        "default_index": "filebeat-*"
      },
      "tail_interval_in_seconds": 10,
      "es_index_time_offset_in_seconds": 0,
      "display_timezone": "local",
      "display_timestamp_format": "MMM DD HH:mm:ss",
      "max_buckets": 500,
      "default_time_range_in_days" : 0,
      "max_hosts": 100,
      "max_events_to_keep_in_viewer": 5000,
      "fields" : {
        "mapping" : {
            "timestamp" : "@timestamp",
            "hostname" : "fields.host",
            "program" : "kubernetes.pod.name",
            "message": "log"
        },
        "message_format": "{{{kubernetes.container.name}}} : {{{log}}}"
      },
      "color_mapping" : {
      }
    }
  ]
}
guyta-essence commented 4 years ago

great thanks. just add "USER kibana" as last row to docker file.

guyta-essence commented 4 years ago

^^ @Tharun-Sabbu