Alert if n devices in a group is down

I’m wondering if there is any way to create an alert (or chain alerts?) so LibreNMS notifies me if n number of devices in a group is down?

Say I have a group of 4 similar devices, and I want to raise a special alert if 2 or more are marked as down. Is this possible?



I think it should be possible using the advanced query rule.

You only need to figure out the correct SQL query.