GithubHelp home page GithubHelp logo

grafana / alertmanager-webhook-proxy Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 1.0 101 KB

A reverse proxy for the Prometheus AlertManager webhook notifier.

License: Apache License 2.0

Go 96.81% Dockerfile 3.19%

alertmanager-webhook-proxy's Introduction

Grafana Logo (Light) Grafana Logo (Dark)

The open-source platform for monitoring and observability

License Drone Go Report Card

Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:

  • Visualizations: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
  • Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
  • Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
  • Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
  • Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
  • Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.

Get started

Unsure if Grafana is for you? Watch Grafana in action on play.grafana.org!

Documentation

The Grafana documentation is available at grafana.com/docs.

Contributing

If you're interested in contributing to the Grafana project:

Get involved

This project is tested with BrowserStack

License

Grafana is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.

alertmanager-webhook-proxy's People

Contributors

umamialex avatar

Stargazers

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

Watchers

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

alertmanager-webhook-proxy's Issues

template creation

I have an easy webservice that just takes 2 pieces of info in json format:
(@{"NotificationType"="ChannelName";"Message"="Destroy all humans"}

How can I craft the template, to put all the information from the alert into Message, and leave NotificationType a static name?
I always seem to get this error: json: cannot unmarshal string into Go struct field Alert.alerts.labels of type template.KV

No template function for JSON string escaping

I tried using the printf "%q" function in go to encode double-quoted strings (like this: {{ printf "%q" .Annotations.description }}). This renders correct JSON strings in most cases, but it's not perfect.

I wasn't able to figure out how to use the jq template function. alertmanager-webhook-proxy crashes when I try to load the template.
I tried {{ jq .Labels.example }} and {{ .Labels.example | jq }}.

Reference documentation:

Similarities between Go string literals and JSON strings:

  • Double quotes delimiters.
  • Two character escape sequences \\, \", \n, \t, and others.

Differences:

  • Go literal strings have \nnn (octal), \xFF, \uFFFF and \UFFFFFFFF character sequences.
  • JSON strings only have \uFFFF and a few 2-character sequences.

For example, in Go printf "%q" a null character will be represented as \x00, but JSON would require \u0000.

In JSON, all control characters U+0000 to U+001F must be escaped. Therefore, any control character that would not be represented as a 2-character escape sequence would produce bad JSON and cause an error.

Resolution:

I ended up re-writing in Python (because I am more familiar with that) so that I can use a JSON serialiser instead of a text template engine. This way, at least the JSON syntax is always correct.

No logs

It's difficult to troubleshoot HTTP transactions because the application doesn't log incoming and outgoing HTTP requests and responses.

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.