Giter VIP home page Giter VIP logo

promtail-loki-docker's Introduction

promtail-loki-docker

Docker service for collecting logs and sending it to Grafana Loki

Used tech stack:

  • Nginx - for proxying requests to 3100 port and a restricting access to this port by certain ip
  • Promtail - logs collector
  • Loki - sends logs to your general grafana loki server

Setup

  1. Copy docker-compose.yml.example to docker-compose.yml
  2. In docker-compose.yml in promtail service in volume block add needed folders with logs
  3. Copy file promtail-config/promtail.yaml.example to promtail-config/promtail.yaml
  4. Add needed log folders to new jobs to promtail-config/promtail.yaml. Example:
  - job_name: nginx
    static_configs:
      - targets:
          - localhost
        labels:
          job: nginx
          __path__: /var/www/nginx-proxy-hs1/log/nginx/*log
          host: grafana
  1. Copy nginx-config/default.nginx.conf.example to nginx-config/default.nginx.conf
  2. If you want to restrict access for all IP except of sertain Grafana Loki server, unkomment and edit following code in conf.d/default.nginx.conf:
    allow  192.168.176.1;
    deny   all;

URL для Grafana Loki в Grafana:

http://ваш_сервер:3100/loki

Run

  1. Switch to promtail-loki-docker folder
  2. Run command make up

Stop

  1. Switch to promtail-loki-docker folder
  2. Run command make down

promtail-loki-docker's People

Watchers

Nikolay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.