How to have inter-VMs alerts?

foremanguy@lemmy.ml to Selfhosted@lemmy.world – 11 points –

Hey, I've setup a promox server and running some stuffs in it, and basically I want to know how to have alerts notifications that goes from one service to another, for example : I'm running NUT on proxmox shell, and I want to have an alert in Truenas (and in NextCloud running in Truenas) to say that the server will shutdown soon to the users that are actually using my cloud. Thank you 😄

6

Well the services would have to speak the same event or messaging system, whatever it may be. Then you'd just need to bridge the networks of the containers, or have them speak to endpoints in each side.

There is no universal messaging system between all pieces of software though. Maybe figure out what you're sending to first, then work back from there. There's nothing blocking you from sending data between two containers in a variety of ways though.

would running nut-monitor in the VMs fit your use case?

But it would a cleanest of running at only one place and fetch the infos after

my solution to this is to only deal with the UPS in proxmox. it shuts down everything if the battery goes below a certain level.

I think you can configure nut to run a few scripts when something changes around the UPS. you could have a script that sends an alert through ntfy, and/or the web services that you want to use for this, but I'm not familiar with the notification system of nextcloud and truenas

Okay going to check it

one more thing I remembered when re-reading the title: I think you can send messages to the VM using the qm command. it stands for qemu monitor, basically its a management tool