Giter Site home page Giter Site logo

timoyuen / pg-grafana-loki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prateeknayak/pg-grafana-loki

0.0 3.0 0.0 19 KB

Playgroud repo to try out grafana loki with kubernetes.

License: MIT License

Makefile 58.03% Dockerfile 16.66% Go 25.31%

pg-grafana-loki's Introduction

pg-grafana-loki

NOTE: This repository is just meant for testing purpose. Please do not deploy these components to production as is. Please consider productionising each of the given components.

So, Grafana recently released loki which as per the readme is like Promtheus but for logs. This repository contains some manifests to deploy loki into an existing kubernetes cluster along with couple of dummy applications that log to stdout every now and then.

Components

The official repository has a ksonnet based build and deploy thing. But for the sake of this example we are going to use static manifests.

Loki

The main server which ingests all the logs forwarded to it and also provides a means to query via the Grafana interface.

Considerations in this example:

  • It deploys loki without much deliberation on persistence of aggregated data which might be useful if you want to deploy this to production.
  • Loki service is of type NodePort which is handy when running kubernetes via docker-for-mac.
  • Loki authentication is disabled.

Promtail

The thing that actually does most of the work of collecting all the logs and sending them to loki for aggregation and querying.

Grafana

The best thing about the Loki announcement was the Grafana Explore feature. For eons folks have been switching back and forth from grafana to data-source (prometheus, AWS cloudwatch etc) to understand why their query doesn't work. But with Grafana Explore you should be able to query your data-source from one place. Oh and you can split query into two side by side tabs which is just perfect !!

Considerations in this example:

  • Again no persistence
  • Default username password admin:admin (BAD !! Please don't deploy this in prod as is.)

Prometheus

Prometheus set to scrape metrics from kube-state-metrics and for the cluster level metrics and any pod annotated with prometheus.io annotation. You do not need to port forward to prometheus any more. You can just use the grafana explorer view to search through prometheus data-source (yay !!).

Deploy loki to cluster

Deploy loki, promtail, grafana, prometheus:

make deploy-all-loki

Deploy sample app:

make deploy-sample-app

Deploy logging app

make deploy-logging-app

TODO

  • Add Grafana configmap for data-source
  • Add Prometheus deployment
  • Add Tracing to the sample app
  • Build some dashboards etc.

pg-grafana-loki's People

Contributors

prateeknayak avatar

Watchers

James Cloos avatar  avatar  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.