Giter Site home page Giter Site logo

grafana-loki's Introduction

Grafana Loki

A high-availability Grafana Loki deployment for Docker Swarm

Getting Started

You might need to create swarm-scoped overlay network called dockerswarm_monitoring for all the stacks to communicate if you haven't already.

$ docker network create --scope=swarm --driver overlay --attachable dockerswarm_monitoring

We provided a base configuration file for Grafana Loki. You can find it in the config folder.
Please make a copy as configs/loki.yml, make sure to change the following values:

common:
  # ...
  ring:
    kvstore:
      # ...
      store: consul
      consul:
        # !!! IMPORTANT !!!
        # ! Update this to the IP address of your Consul server
        host: 10.10.201.201:8500
        # acl_token: secret
  storage:
    # !!! IMPORTANT !!!
    # ! Update this to the IP address of your Minio server or S3 endpoint
    s3: 
      endpoint: http://10.10.201.201:9000
      region: us-east-1
      insecure: true
      bucketnames: loki
      access_key_id: minioadmin
      secret_access_key: minioadmin
      sse_encryption: false
      s3forcepathstyle: true

And add any additional configuration you need to configs/loki.yml.

Object Storage buckets

You need to create the following buckets in your object storage:

  • loki

You can change the bucket names in the configs/loki.yml file. Look for the bucketnames property.

Example

storage_config:
  aws:
    bucketnames: loki  # Change this to your bucket name

Dashboard

You can find a dashboard for Grafana Loki in the dashboard folder.

You might find that you need to make some modifications to the dashboard to make it work with your setup.

Fix job label:

Find: job=~\\"\(?\$namespace\)?/(.+?(?:\.\*)?)\\"
Replace: job=~\"$namespace/(loki|$1)\"

Fix container label:

Find: container=~?\\"(compactor|distributor|index-gateway|ingester|querier|query-frontend|query-scheduler|ruler)\\"
Replace: container=~\"(loki|$1)\"

As well as following:

Find: (kube_deployment_created|kube_pod_container_info)
Replace: loki_build_info

And the following:

Find: level=\\"\$level\\"
Replace: level=~\"$level\"

Deployment

To deploy the stack, run the following command:

$ make deploy

Destroy

To destroy the stack, run the following command:

$ make destroy

grafana-loki's People

Contributors

socheatsok78 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.