tigattackOPDiscord Overlord•

Hi all. Thought I'd share my latest project (technically more of a new version of an old project...), VeeamNotify.

VeeamNotify sends Veeam Backup & Replication session summary notifications to Discord, Microsoft Teams, and Slack, detailing the session result, various statistics, and optionally alerting you via @mention when a job finishes in a warning or failed state.
It's highly configurable in terms of when it sends a notification and when it @mentions you (i.e. on success and/or warning and/or failure).

VeeamNotify is a replacement for my previous VeeamDiscordNotifications project, and the respective Teams and Slack projects, featuring improvements across the board and support for all the aforementioned messaging services in one place.

I posted about VeeamDiscordNotifications here a few years ago. Some of you were pretty excited about it, so I thought I'd post about this one too.

Whilst not without its frustrations (as all us labbers know from our own projects!), this project and its predecessors have been a lot of fun for me. I've learnt a lot and thoroughly enjoyed working on them.

I hope you all can enjoy it as much as I have. All feedback is appreciated, and please don't hesitate to log an issue in the GitHub repository for any feature requests or problems you may encounter :)

EDIT: I thought it may be worth mentioning that you can all use Veeam free of charge with their NFR license for labbers, bloggers, people with vendor qualifications, etc.
This isn't sponsored or anything, I've just found it super handy in my lab and thought some of you may not be aware.

6
schklom•

Instead of working on integrating APIs for multiple notification systems, you may want to use https://github.com/caronc/apprise, it integrates all major notification systems already :)

3
tigattackOPDiscord Overlord•

That's a great tip, cheers! I'd like to keep the setup super simple so for now I think I'll stick with custom integrations.

I hope to make use of the VBR API in the future though; this would allow me to distribute VeeamNotify as a simple Docker image, at which point I could supply a compose file which includes Apprise. This is something I've wanted to do for a long while, but unfortunately the VBR API is still too limited for such a purpose.

1
whllm•

Slick project, ill definitely have to try it out; didn't know about the NFR license either, so thanks a ton!

2
tigattackOPDiscord Overlord•

Awesome, glad I could help!

1
SilentDecodeR720: 1x E5-2680v2, 256GB RAM, 6x 500GB SSD RAID5. ESXi 7U2d•

Is there a way to get this working with Telegram? I have a few friends that use Telegram on daily basis, that including myself. Having this option for Telegram, would reduce Veeam B&R spam in the mailbox and would make it much easier to check if a backup ran or if it failed.

2
tigattackOPDiscord Overlord•

I was actually looking into this the other day. The API looks pretty simple, so I should be able to implement it pretty easily. I suggest you watch the repository for releases (open repo, click watch, click custom, tick releases) as I hope to add support for Telegram in the next release.

The only downside is that Telegram doesn't seem to support embeds/cards in the style supported by Discord, Slack, and Teams, at least not that I've been able to discover so far, it will probably just have to be some formatted text rather than a structured embed/card.

2
Estimate-Superb•

It says that the license is only valid for a year.

2
tigattackOPDiscord Overlord•

For the NFR licence? That's right. I've never seen a limitation on renewals, though. I just re-apply every year and install the new one. Takes 5 minutes, then the licence is in your inbox!

1
kayson•

How does this work on the veeam side? Is there some kind of API I've been misisng? Right now I just have all my jobs run powershell scripts that call my healthchecks urls

1
tigattackOPDiscord Overlord•

Just like your healthcheck scripts, as a post-job script. The post-install deployment script injects the launch command into any chosen jobs (it won't overwrite existing post-job scripts without confirmation).

FYI v1.1 will have support for "pinging" healthcheck URLs as well as sending to the supported notification services.

Side not, there actually is a B&R API. You can access the Swagger UI at https://veeamhostname:9419/swagger/ui/index.html (assuming you left the default port selected during install). The VeeamRESTSvc also needs to be running.
I was a few hours into a completely redesign of VeeamNotify before I realised the API doesn't expose anywhere close to the amount of data I need as it's missing a number of pretty crucial endpoints. I'm hoping for improvements with v12, but we'll see.

There is also an Enterprise Manager REST API which exposes a lot more data. Could be useful for you, however I didn't want to make the assumption that users of VeeamNotify would be licensed for Enterprise Manager, so it's sadly of little use to me.

2
kayson•

Ah thanks for the info. So how does the post job script get info about the completed job? Does veeam give it cli arguments?

1
tigattackOPDiscord Overlord•

No problem. Good question!

TL;DR each Veeam session runs in its own process, then post-job scripts are launched as a child process of that session process, so from the scope of the script's child process we can ID the parent process, find the command line used to launch the process, then parse the job and session IDs from that.

If you're interested in exactly how it works, have a look at https://github.com/tigattack/VeeamNotify/blob/v1.0/Bootstrap.ps1#L47..L62

1
kayson•

That's very clever!

2