Best practice for notification of orphaned pool blocks?

I’d like to improve our pool’s response to orphaned blocks (as per this comment) but I’m having trouble finding a “best practice” for notification, when we lose a slot battle, that doesn’t involve manual checking or services without flexibility or accountability.

The lightest weight approach, which has served us well until recently, has been to check the BLOCKS and/or ORPHANS tabs of our page every time I read block notifications from the Telegram bot… to make sure the block count is in sync with our leadership schedule. This is a composition of 2 closed systems that still involves repeated manual effort, with a time delay unhelpful for operations.

I would much rather be notified only in the case of an orphan or lost height battle than be notified only of every successful block as we are now. We use cncli for the leadership schedules but I can’t see how any of its subcommands can be used for the specific purpose of scripting a notification from our BP host when we’ve produced a block that isn’t accepted by the chain. Likewise I don’t know of aggregators which could determine & notify based on these conditions from an external view of the chain.

Has anyone else made, or know of, a utility or service that does this? I might eventually have the time to write something to scrape our logfiles and query Blockfrost but would much rather help support some existing effort to accomplish this.