grafana

package
v0.0.0-...-fb315dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 14 Imported by: 0

README

A webhook for grafana alerts

API

REST

POST /api/graphana/{chatid:[0-9]+}

{
  "evalMatches": [
    {
      "value": 100,
      "metric": "High value",
      "tags": null
    },
    {
      "value": 200,
      "metric": "Higher Value",
      "tags": null
    }
  ],
  "imageUrl": "http://grafana.org/assets/img/blog/mixed_styles.png",
  "message": "Someone is testing the alert notification within grafana.",
  "ruleId": 0,
  "ruleName": "Test notification",
  "ruleUrl": "http://localhost:3000/",
  "state": "alerting",
  "title": "[Alerting] Test notification"
}


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(service Service, logger kitlog.Logger, ml machineLearning.Service) http.Handler

MakeHandler retuns a http rest request handler for sensu the machine learning service can be nil if you do not wish to save the request message

Types

type Service

type Service interface {
	// contains filtered or unexported methods
}

func NewInstrumentService

func NewInstrumentService(counter metrics.Counter, errorCounter metrics.Counter, latency metrics.Histogram, s Service) Service

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(alertService alert.Service) Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL