There are two basic types of monitoring services: those that record data, and those that trigger alerts based on that data. On the surface, beacons may look like the second type. They run on a regular interval (as frequently as every second, by default) and when they find data that is important, they send it up to the Master.
However, because beacons have access to execution modules on the Minion that they are running on, they can interact with any program on the Minion that an execution module can.
Let's go ahead and put together a beacon that monitors nspawn
containers. It doesn't need to be very complex; indeed, beacons should be as simple as possible, since they are expected to run so often. All that our beacon needs to do is keep an eye on containers that should be running, and those that should be absent.