GithubHelp home page GithubHelp logo

automatic-disco's Introduction

Install loki and promtail to monitor server terminal and journal

  1. install loki and promtail using docker compose and use below docker file
    version: "3.4"
    
    networks:
    loki:
    
    services:
    loki:
    image: grafana/loki:2.8.0
    mem_limit: 3G
    mem_reservation: 128M
    cpus: 0.5
    
    volumes: 
    - "/etc/localtime:/etc/localtime:ro"
    ports:
    - "10.19.143.65:3100:3100"
    command: -config.file=/etc/loki/local-config.yaml
    networks:
    - loki
    
    promtail:
    image: grafana/promtail:2.8.0
    mem_limit: 3G
    mem_reservation: 128M
    cpus: 0.5
    volumes:
    - "/etc/localtime:/etc/localtime:ro"
    - /var/log/journal:/var/log/journal
    - /var/run/docker.sock:/var/run/docker.sock 
    - /data/users/appuser/loki-promtail/config.yml:/etc/promtail/config.yml
    - /data/docker/containers:/var/lib/docker/containers
    command: -config.file=/etc/promtail/config.yml
    networks:
    - loki
    
    cadvisor:
    image: gcr.io/cadvisor/cadvisor:latest
    mem_limit: 2G
    mem_reservation: 128M
    cpus: 0.5
    
    container_name: cadvisor
    privileged: true
    volumes:
    - /:/rootfs:ro
    - /var/run:/var/run:ro
    - /sys:/sys:ro
    - /data/docker:/var/lib/docker:ro
    - /dev/disk:/dev/disk/:ro
    
    networks:
    - loki  
    

the run below comand in a directory which docker-compose.yml exist

docker compose up -d

automatic-disco's People

Contributors

imanjr13 avatar

Watchers

 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.