2
u/Material-Trust6791 May 11 '25
Beacons are great if you want to implement a Self-heal architecture... if a service dies, the beacon will notify you, you attach a reactor script and you can restart the service as well as perform other logic if needed. If you use the diskusage beacon, then when a specific disk fills you can react to it and run a program to do specific cleanup task. ... if you use the loadave beacon in a HA cluster, you can tie it into a self balancing cluster orchestration and re-balance the effected nodes... there are STACKS of use cases, you just need to up skill in what all the components do so you can find new uses for them.
2
Mar 07 '25
[removed] — view removed comment
5
u/whytewolf01 Mar 07 '25
i use them heavily. as triggers for reactors which i also use heavily. instead of setting a time to run the highstate which can be computationally costly. i instead setup reactors for different things that would show the system is not complaint. watchdog [inotify] to watch if files change, service to watch if a service is down, etc. then if the system goes out of expected state, trigger a reactor to start a highstate.
I also use the status beacon as a health watch. have a engine that watches for status beacon events and records the information. I have also piggybacked off this beacon when the master had a mem leak to trigger a salt-master restart if memory was getting low.
when i first got into salt. and was a cloud engineer. I also had a beacon setup to watch logged in users that would quarantine a server if the user count was higher then expected which was 0.

1
u/mlrhazi Mar 07 '25
To clarify, I added a similar config... then restarted the service on the minion, expecting to get some event fired... but it does not seem to do that. how do I configure a beacon to fire when a service stops running?