Code Monkey home page Code Monkey logo

gluster-mixins's Introduction

Prometheus Monitoring Mixin for Gluster

Build Status

A set of Grafana dashboards and Prometheus alerts for Gluster.

The scope of this project is to provide Gluster specific Grafana dashboard configs and Prometheus rule files using Prometheus Mixins.

Prerequisites

  • Jsonnet [Install Jsonnet]

    Jsonnet is a data templating language for app and tool developers.

    The mixin project uses Jsonnet to provide reusable and configurable configs for Grafana Dashboards and Prometheus Alerts.

  • Jsonnet-bundler [Install Jsonnet-bundler]

    Jsonnet-bundler is a package manager for jsonnet.

  • Promtool

    1. Download Go (>=1.11) and install it on your system.
    2. Setup the GOPATH environment.
    3. Run $ go get -d github.com/prometheus/prometheus/cmd/promtool

How to use?

Manually generate configs and rules

You can clone this repository and manually generate Grafana Dashboard configs and Prometheus Rules files, and apply it according to your setup.

$ git clone https://github.com/gluster/gluster-mixins.git
$ cd gluster-mixins

To get dependencies

$ jb install

To generate Prometheus Alert file

$ make prometheus_alerts.yaml

To generate Prometheus Rule file

$ make prometheus_rules.yaml

To generate Grafana Dashboard configs

$ make dashboards_out

The prometheus_alerts.yaml and prometheus_rules.yaml files then needs to be passed to your Prometheus Server, and the files in dashboards_out needs to be passed to your Grafana server.

Background

gluster-mixins's People

Contributors

anmolsachan avatar cloudbehl avatar shtripat avatar umangachapagain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gluster-mixins's Issues

Grafana object builder

Grafana builder is required to create a k8s object. The object is of config type and can be applied directly on the k8s cluster.

The file that will be created out of it will have a k8s header with the grafana JSON. After applying you can see the grafana dashboards.

Volume level rules and metrics should also be dependent on job label along with volume label.

Currently glusterExporterSelector: 'job="gluster-exporter"' is hard coded in configs. This represents a cluster level differentiation.
This should not be present here; dashboards and clusters should consider a cluster level entity (according to metrics JOB label can be considered at that level ). Currently there is no concept of cluster_id in metrics and job is the label that differentiates them.

Alerts - OCS Cluster and Cluster Nodes health

Need following status alerts:

Node status (Up/Down)
Container status (Up/Down)
Gluster peer in cluster status (Connected/Disconnected)
Glusterd2 service status (Up/Down)
Cluster status

docker build fails due to missing jb install

jsonnet -S lib/rules.jsonnet > prometheus_rules.yaml
jsonnet -J vendor -m dashboards_out lib/dashboards.jsonnet
RUNTIME ERROR: couldn't open import "grafana-builder/grafana.libsonnet": no match locally or in the Jsonnet library paths.
        lib/../dashboards/k8s-storage-resources-glusterfs-pv.libsonnet:1:11-53  thunk <g>
        lib/../dashboards/k8s-storage-resources-glusterfs-pv.libsonnet:60:7     object <grafanaDashboards>
        lib/../dashboards/defaults.libsonnet:7:17-44    object <dashboards>
        lib/dashboards.jsonnet:4:11-27  object <anonymous>
        During manifestation
make: *** [Makefile:17: dashboards_out] Error 1

Alerts - K8s generic storage alerts

PVCHardLimitNearingFull
StorageClass.PVCHardLimitNearingFull
StorageClass.PVCCountNearing Full
Namespace.PVCCountNearingFull
Namespace.EphemeralStorageLimitNearingFull

Makefile for compilation and linting

We need to have a makefile or a script that can help us with jsonnet linting and compiling to respective alerts, rules and dashboard object in prometheus.

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.