Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logtrail docker image for Kubernetes #376

Open
guyta-essence opened this issue Jan 6, 2020 · 3 comments
Open

logtrail docker image for Kubernetes #376

guyta-essence opened this issue Jan 6, 2020 · 3 comments

Comments

@guyta-essence
Copy link

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

@Tharun-Sabbu
Copy link

@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
Copy link
Author

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

@guyta-essence
Copy link
Author

^^ @Tharun-Sabbu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants