Web hooks certainly the easiest approach. Otherwise, you would need to probably dig into the SNMP data which is very comprehensive typically with the Unifi stuff (which is professional grade equipment after all).
You would think but the udm pro and pro se does not ship with SNMP. I think this is true for all their controllers. Take a look at unpoller, that maybe of some use.
As said, I just started with that node as well but as per my understanding it is for the entire Unifi ecosystem, but could be wrong. I have not gone that much into details but it looks like the API is available