Skip to content

Charles546/flapjack-grafana-receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flapjack Grafana Receiver

Flapjack-grafana-receiver is a tool to generate monitoring events based on Grafana board definitions and feed the events to flapjack for alerting. It is lightweight, easy to setup and customizable.

Flapjack is a monitoring notification and event processing system.

This is project is currently in MVP stage. Depending on the adoption, new features might be added in the future. Scroll to the bottom to see the limitations. Pull requests are welcome.

TOC

  1. Prerequisites
  2. Installation
  3. Configuration
  4. Usage
  5. Adding alert
  6. Limitations

Prerequisites

  • Grafana endpoint and access token
  • Flapjack redis server information
  • Node js >= 0.10

Installation

$ git clone <this repo>
$ cd flapjack-grafana-receiver
$ npm install

Configuration

Put your configuration in a local-config.js in the flapjack-grafana-receiver folder. See example below.

module.exports = {
  grafana_endpoint : 'http://grafana.mycompany.com/',
  grafana_access_token : 'adksj89PNHJHH78924jehklfhkehua37auhwaehBULIughuhYGUyu239r8923ytweuh=',
 
  redis: {
    host: 'flapjack-sever.mycompany.com',
    port: 6380,
  },
};

Check the config.js to understand more available options.

Usage

$ node . -h
Scan the grafana dashboards and generate alerts based on
target definitions and send to flapjack redis server. See
wiki for detail.

Usage: node flapjack-grafana-receiver.js [ -h|--help ] [ -d|--daemon ] [ -v|--verbose]

Optional:
 -h | --help:    print this message
 -d | --daemon:  run in daemon mode
 -v | --verbose: provide more verbose output to console

Required configurations for redis connection, grafana endpoint
should be provided in config.js

Adding alert

Adding alert to a metric is basically adding another metirc in the same panel with alias '_lower|upper_bound'.

Taking below board as an example. original board

To add a alerting for the "CPU Utilization" metric when it is below 75%, just add a new metric and use alias "A_lower_bound". Letter "A" is the "refId" of the "CPU utilization". You can hide the new metric if you want. Below is the udpated board.

updated board

Finally, you need to add a tag "alert" to the dashboard like below. board settings

Limitations

  • Supports only Graphite backend as of now
  • Graphite authentication has not been implemented
  • Single threaded

Pull requests are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published