Giter Site home page Giter Site logo

grafana-to-ntfy's People

Contributors

dependabot[bot] avatar juliangroshaupt 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grafana-to-ntfy's Issues

Specify priority

Just sent my first test messages successfully, thanks for this project!

One thing I'm missing already: I'd want to specify for an alert if it has a high priority (--> waking me up at night) or not (--> I can handle it next working day). I can set custom notification settings for different priorities ntfy, so this would be a nice feature to use.

Could there be a way to specify the priority of the notification? I could imagine to add a label named priority for an alert, so grafana-to-ntfy could check this label? It probably should loop over the alerts array and check the labels of each alert to use the highest one provided?

Or is there another/better way? WDYT?

Setting up fails

When sending test during the ntfy configuration, the following error is shown in container:

Json < data :: Notification > data guard failed: Parse("{"receiver":"","status":"firing","alerts":[{"status":"firing","labels":{"alertname":"TestAlert","instance":"Grafana"},"annotations":{"dashboard_id":"111","description":"asdasd","summary":"Notification test"},"startsAt":"2022-10-25T22:09:02.374605697+03:00","endsAt":"0001-01-01T00:00:00Z","generatorURL":"","fingerprint":"57c6d9296de2ad39","silenceURL":"https://grafana.domain.com/alerting/silence/new?alertmanager=grafana\u0026matcher=alertname%3DTestAlert\u0026matcher=instance%3DGrafana","dashboardURL":"https://grafana.domain.com/d/123","panelURL":"","valueString":"[ metric='foo' labels={instance=bar} value=10 ]"}],"groupLabels":{},"commonLabels":{"alertname":"TestAlert","instance":"Grafana"},"commonAnnotations":{"dashboard_id":"111","description":"asdasd","summary":"Notification test"},"externalURL":"https://grafana.domain.com/\",\"version\":\"1\",\"groupKey\":\"{alertname=\\\"TestAlert\\\", instance=\"Grafana\"}2022-10-25 22:09:02.374605697 +0300 IDT m=+76325.319301984","truncatedAlerts":0,"orgId":1,"title":"[FIRING:1] (TestAlert Grafana)","state":"alerting","message":"Firing\n\nValue: [ metric='foo' labels={instance=bar} value=10 ]\nLabels:\n - alertname = TestAlert\n - instance = Grafana\nAnnotations:\n - dashboard_id = 111\n - description = asdasd\n - summary = Notification test\nSilence: https://grafana.domain.com/alerting/silence/new?alertmanager=grafana\\u0026matcher=alertname%3DTestAlert\\u0026matcher=instance%3DGrafana\\nDashboard: https://grafana.domain.com/d/123\\n\"}", Error("missing field dashboard_id", line: 1, column: 1525)).
No 422 catcher registered. Using Rocket default.

setup is default values as shown in the example

arm64 container availability

Hi,

This project would look great in my homelab, unfortunately this is only available for amd64 architecture

Do you have any plans releasing this container on arm64 ?

Ntfy and Grafana both run great on Raspberry Pi ans your project would fit nicely between the two.

I have absolutely no experience regarding Rust and coding in general, so I would be of absolutely no help, except for testing

Keep the community posted about this

Regards

401 error with Grafana 10.x

Hello,
with Grafana 10 I'm configuring a webook using all the recommended parameters but it keeps failing with error 401 Unauthorized.

Screenshot_20230825_143009

BAUTH_USER and BAUTH_PASS correctly set in the docker-compose file and matching those used in Grafana.

log output on grafana:

logger=ngalert.notifier.webhook notifierUID= t=2023-08-25T12:04:30.117765435Z level=error msg="Missing receiver"
logger=ngalert.notifier.webhook notifierUID= t=2023-08-25T12:04:30.117791213Z level=error msg="Missing group labels"
logger=notifications t=2023-08-25T12:04:30.118281904Z level=debug msg="Sending webhook" url=http://xxx.xxxxx.xxx:8080 httpmethod=POST
logger=notifications t=2023-08-25T12:04:30.122511436Z level=debug msg="Webhook failed" url=http://xxx.xxxxx.xxx:8080 statuscode="401 Unauthorized" body="<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\">\n    <title>401 Unauthorized</title>\n</head>\n<body align=\"center\">\n    <div role=\"main\" align=\"center\">\n        <h1>401: Unauthorized</h1>\n        <p>The request requires user authentication.</p>\n        <hr />\n    </div>\n    <div role=\"contentinfo\" align=\"center\">\n        <small>Rocket</small>\n    </div>\n</body>\n</html>"

Perhaps something has changed in how grafana sends the request?

Add License

I'd like to add grafana-to-ntfy to the NixOS package repository nixpkgs.

I kindly request you to add a suitable open-source license to the project. A well-defined license will not only ensure the legal use and distribution of the software but also facilitate its inclusion in various package management systems, including nixpkgs.

There a numerous resources such as choosealicense.com to help choosing a license, but the default is sadly unfree.

Thanks!

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.