Notification library for gophers and their furry friends.

Shoutrrr

Notification library for gophers and their furry friends. Heavily inspired by caronc/apprise.

github actions workflow status codecov Codacy Badge report card go.dev reference github code size in bytes license godoc All Contributors



Quick Start

As a package

Using shoutrrr is easy! There is currently two ways of using it as a package.

Using the direct send command

  url := "slack://token-a/token-b/token-c"
  err := shoutrrr.Send(url, "Hello world (or slack channel) !")

Using a sender

  url := "slack://token-a/token-b/token-c"
  sender, err := shoutrrr.CreateSender(url)
  sender.Send("Hello world (or slack channel) !", map[string]string { /* ... */ })

Using a sender with multiple URLs

  urls := []string {
    "slack://token-a/token-b/token-c"
    "discord://token@channel"
  }
  sender, err := shoutrrr.CreateSender(urls...)
  sender.Send("Hello world (or slack channel) !", map[string]string { /* ... */ })

Through the CLI

Start by running the build.sh script. You may then run send notifications using the shoutrrr executable:

$ shoutrrr send [OPTIONS] <URL> <Message [...]>

Documentation

For additional details, visit the full documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Amir Schnell

πŸ’»

nils mΓ₯sΓ©n

πŸ’» πŸ“– 🚧

Luka Peschke

πŸ’» πŸ“–

MrLuje

πŸ’» πŸ“–

Simon Aronsson

πŸ’» πŸ“– 🚧

Arne JΓΈrgensen

πŸ“– πŸ’»

Alexei Tighineanu

πŸ’»

Alexandru Bonini

πŸ’»

Senan Kelly

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Owner
containrrr
Tools, containers and other docker-related community content.
containrrr
Comments
  • Add notification types

    Add notification types

    It should be possible to post notifications to any of the following services: Priority in descending order.

    Services

    • [x] Discord
    • [x] Gotify
    • [x] Hangouts
    • [x] IFTTT
    • [x] Local logs
    • [x] MatterMost
    • [x] Pushbullet
    • [x] Pushover
    • [x] Slack
    • [x] Email
    • [x] Microsoft Teams
    • [x] Telegram
    • [x] Zulip Chat
    • [x] Join
    • [Β ] Twitter
    • [ ] Gitter
    • [Β ] Facebook
    • [ ] XMPP (#6)
    • [ ] Rocket.Chat
    • [ ] Generic Webhook (other) - how?

    Candidates for review

    Wont fix

    • ~HipChat~

    Updates

    24 June, 2019

    IFTTT webhook service done.

    9 June, 2019

    Hipchat is discontinued and will be replaced by slack according to this page, so hipchat will not be implemented. Unsure whether Google Hangouts will continue to be a maintained product. Until someone wants it we'll just leave it out.

  • Discord embeds in message

    Discord embeds in message

    Is it possible to send embedded messages to a discord webhook?

    The template

    {{`{`}}"embeds":[{{range .}} {{`{`}}"title":"{{ .Level }}", "description":"{{ .Message }}" {{`}`}}{{print}}{{end}}]{{`}`}}
    

    generates messages in the JSON format

    {"embeds":[ {"title":"info", "description":"Starting Watchtower and scheduling first run: 2020-06-30 22:03:31 +0000 UTC m=+300.065202141" }]}
    

    But they are just shown as the text value, not actually used by discord

  • Move CLI command to /shoutrrr

    Move CLI command to /shoutrrr

    This will make the CLI command installable by running:

    go install github.com/containrrr/shoutrrr/shoutrrr@latest
    

    When installing using go install previously the command got installed with the binary name cli.

  • Change URL format for mattermost

    Change URL format for mattermost

    Currently, the mattermost URL is segmented as:

    mattermost://host/token/user/channel
    

    to fit with the rest of the services, this would likely be preferrable:

    mattermost://username:token@host/channel
    

    Thoughts?

  • Cleanup and improve GitHub Actions

    Cleanup and improve GitHub Actions

    Use build matrix of go versions

    GitHub Actions only tested the build using go 1.13 (which has been unsupported by the Go team for more than two years).

    Introduce a build matrix testing all versions from the lowest supported by shoutrrr to the newest released by the Go team (shamelessly using my own Go Version Action).

    Bump required go to 1.13 in go.mod

    The matrix test showed the code didn't compile in go1.12 anymore.

    Build release using latest Go version

    The release action built the version for release with go 1.13. From now, we'll use the latest go release.

    Bump codecov action version

    The old version used node 12 which is deprecated by GitHub Actions

    Use goreleaser action

    Instead of installing goreleaser by ourselves, we'll let the goreleaser action install it.

    Add @dependabot configuration

    Let @dependabot create pull requests for new dependencies in go.mod, Dockerfile, and GitHub Actions. This should make it easier to stay up-to-date.

    Add GitHub Action permissions

    GitHub has introduced permissions for GitHub Actions to increase the safety of the actions.

  • feat(mattermost): add support for icons

    feat(mattermost): add support for icons

    • What your PR contributes Icon support on MatterMost:
    ./shoutrrr send -u 'mattermost://[email protected]:443/xxxxxxxxxxx?icon_emoji=https%3A%2F%2Fraw.githubusercontent.com%2Fcontainrrr%2Fshoutrrr%2Fmain%2Fdocs%2Fshoutrrr-logotype.png' -m 'Icon Test'
    ./shoutrrr send -u 'mattermost://[email protected]:443/xxxxxxxxxxx?icon_emoji=smiley' -m 'Icon Test'
    

    image

    • Which issues it solves Moving my Argus project to use Shoutrrr. Really want to keep icon support!

    • Tests that verify the code your contributing I tried adding tests (and most of this code is copied from the Slack service), but couldn't get them to pass. Every other service that has query params seems to include the title param, but that's no supported on MatterMost, so I'm not sure what to do w.r.t this error. Help fixing this would be appreciated!

    β€’ Failure [0.000 seconds]
    services
    /path/to/shoutrrr/pkg/services/services_test.go:48
      when passed the a title param
      /path/to/shoutrrr/pkg/services/services_test.go:57
        should not throw an error for mattermost [It]
        /path/to/shoutrrr/pkg/services/services_test.go:71
    
        Unexpected error:
            <*errors.errorString | 0xc00030e1b0>: {
                s: "title is not a valid config key [icon icon_emoji icon_url]",
            }
            title is not a valid config key [icon icon_emoji icon_url]
        occurred
    
        /path/to/shoutrrr/pkg/services/services_test.go:99
    
    • Updates to the documentation Done? Let me know if you'd like any more, or changes to them. (Hoping the 'The services does not support any query/param props' would go away with this current commit?)
  • Slack: add properties for overriding channel and emoji

    Slack: add properties for overriding channel and emoji

    After looking into the new kured 1.7.0 release, I came across a couple of properties that I miss after the transition to shoutrrr. This PR introduces two new properties in the Slack service:

    • channel: allows for overriding which channel to be notified (default is using the channel specifying in the Slack webhook configuration)
    • emoji: use a custom icon for the messages posted by shoutrrr

    Related to #88, https://github.com/weaveworks/kured/pull/368

  • Microsoft Teams connector webhook URL format changed

    Microsoft Teams connector webhook URL format changed

    image

    This causes teams:// URLs to fail as well as directly pasting the webhook URL for the Watchtower Teams integration, since it tries to parse the URL and use shoutrrr anyway.

  • Add generic webhook service

    Add generic webhook service

    Most webhooks need a specific payload to be sent to them. That is one of the main purposes of the templates that services can use.

    If you are consuming shoutrrr "directly" without exposing it's URLs to the end user to configure, it's pretty trivial to support, so initially this is the only supported method (if consumers want to support them, they would need to load the templates manually).

  • Feature request: Matrix notifications

    Feature request: Matrix notifications

    It would be nice if a Matrix channel could be used as notification target.

    I don't actually know what would be required to achieve this, as I'm neither familiar with Matrix internals nor with Go. But as a user of Watchtower, I'd appreciate support for it πŸ™‚

  • Add support for MQTT (Home Assistant)

    Add support for MQTT (Home Assistant)

    As requested in https://github.com/containrrr/watchtower/issues/618#issuecomment-703123815, we should consider adding support for sending notifications to home assistant. I'm not sure exactly how, or if, this will work, so some investigation will be needed unless someone has a clear idea.

  • Prowl support

    Prowl support

    Posting this here to see if support for Prowl could be added. I'll be the first to admit I don't know go well enough to attempt myself at this point but I did see goprowl so was hoping that would help in getting it implimented.

    Thanks in advance if it's able to be added.

  • smpt notification not working with startTLS enabled

    smpt notification not working with startTLS enabled

    Hi,

    I'm struggling to use the smtp notify system.

    I'm using a simple URL:

    smtp://[email protected]:[email protected]:587/?fromAddress=[email protected]&toAddresses=[email protected]

    The smtp server is a Plesk system behind Cloudflare DNS (not proxied).

    I tried changing the ssl cert of the mail server, both with letsencrypt and cloudflare certs, but I get "the cert is not valid for smtp.domain.com" or "the cert is signed by invalid authority".

    Disabling startTLS does not work: it does not authenticate a non-encrypted request.

    Using other clients to the same smtp works, enabling "accept all certs", is there a way to properly make this work?

    Thank you very much.

  • Using self-signed certs with rocketchat

    Using self-signed certs with rocketchat

    I am trying to send a notification on a self-hosted Rocketchat server with a self-signed certificate. I get this error:

    msg="Failed to send shoutrrr notification"
    error="Error while posting to URL: Post \"https://xxx.xxx.xxx.xxx/hooks/hooks/62e2425ae7724e0009bd522f\": 
           x509: cannot validate certificate for xxx.xxx.xxx.xxx because it doesn't contain any IP SANs
           HOST: xxx.xxx.xxx.xxx
           PORT: " 
    index=0 
    notify=no 
    service=rocketchat
    

    Is there a solution? Thx

Apple Push Notification (APN) Provider library for Go 1.6 and HTTP/2.

Apple Push Notification (APN) Provider library for Go 1.6 and HTTP/2. Send remote notifications to iOS, macOS, tvOS and watchOS. Buford can also sign push packages for Safari notifications and Wallet passes.

Dec 6, 2021
File system event notification library on steroids.

notify Filesystem event notification library on steroids. (under active development) Documentation godoc.org/github.com/rjeczalik/notify Installation

Jan 7, 2023
Monitor star changes of GitHub repo, and send the notification to slack or lark.

stargazers Features monitor the star events of the GitHub repo send the notifications to Slack or Lark How to use For Lark, create a bot called like s

Dec 4, 2022
[TOOL, CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations.

typex Examine Go types and their transitive dependencies. Export results as TypeScript value objects (or types) declaration. Installation go get -u gi

Dec 6, 2022
Gorsair hacks its way into remote docker containers that expose their APIs
Gorsair hacks its way into remote docker containers that expose their APIs

Gorsair Gorsair is a penetration testing tool for discovering and remotely accessing Docker APIs from vulnerable Docker containers. Once it has access

Dec 31, 2022
This project is an implementation of Fermat's factorization method in which multiples of prime numbers are factored into their constituent primes

This project is an implementation of Fermat's factorization method in which multiples of prime numbers are factored into their constituent primes. It is a vanity attempt to break RSA Encryption which relies on prime multiples for encryption.

Jun 3, 2022
Start of a project that would let people stay informed about safe running spaces in their area.

SafeRun Start of a project that would let people stay informed about safe running spaces in their area. Too many people I'm friends with feel unsafe w

Feb 11, 2022
Library to work with MimeHeaders and another mime types. Library support wildcards and parameters.

Mime header Motivation This library created to help people to parse media type data, like headers, and store and match it. The main features of the li

Nov 9, 2022
A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022
Go bindings for unarr (decompression library for RAR, TAR, ZIP and 7z archives)

go-unarr Golang bindings for the unarr library from sumatrapdf. unarr is a decompression library and CLI for RAR, TAR, ZIP and 7z archives. GoDoc See

Dec 29, 2022
An simple, easily extensible and concurrent health-check library for Go services
An simple, easily extensible and concurrent health-check library for Go services

Healthcheck A simple and extensible RESTful Healthcheck API implementation for Go services. Health provides an http.Handlefunc for use as a healthchec

Dec 30, 2022
Functional programming library for Go including a lazy list implementation and some of the most usual functions.

functional A functional programming library including a lazy list implementation and some of the most usual functions. import FP "github.com/tcard/fun

May 21, 2022
Flow-based and dataflow programming library for Go (golang)
Flow-based and dataflow programming library for Go (golang)

GoFlow - Dataflow and Flow-based programming library for Go (golang) Status of this branch (WIP) Warning: you are currently on v1 branch of GoFlow. v1

Dec 30, 2022
go.pipeline is a utility library that imitates unix pipeline. It simplifies chaining unix commands (and other stuff) in Go.

go.pipeline go.pipeline is a utility library that imitates unix pipeline. It simplifies chaining unix commands (and other stuff) in Go. Installation g

May 8, 2022
A Go library for reading sensor data from the Adafruit SCD-40 and SCD-41

A Go module for reading CO2, temperature, and humidity data from the Sesirion SCD4x family of sensors. Example sensors are the Adafruit SCD-40 and Adafruit SCD-41. The former was used during the development of this module.

Dec 23, 2022
Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)
Evolutionary optimization library for Go (genetic algorithm, partical swarm optimization, differential evolution)

eaopt is an evolutionary optimization library Table of Contents Changelog Example Background Features Usage General advice Genetic algorithms Overview

Dec 30, 2022
cross-platform, normalized battery information library

battery Cross-platform, normalized battery information library. Gives access to a system independent, typed battery state, capacity, charge and voltag

Dec 22, 2022
GoLang Library for Browser Capabilities Project

Browser Capabilities GoLang Project PHP has get_browser() function which tells what the user's browser is capable of. You can check original documenta

Sep 27, 2022
Type-safe Prometheus metrics builder library for golang

gotoprom A Prometheus metrics builder gotoprom offers an easy to use declarative API with type-safe labels for building and using Prometheus metrics.

Dec 5, 2022