This can be configured as an Advanced Alerting Rule https://docs.librenms.org/Alerting/Rules/#advanced
Create a new rule and give it a name
Then switch to Advanced
tab, enable Override SQL
, and paste the following line into Query
SELECT * FROM devices,ports WHERE ports.device_id = ? AND devices.device_id = ports.device_id AND ports.port_id IN ( SELECT ports_stp.port_id FROM ports_stp WHERE ports_stp.state = "blocking")
Then Save Rule
Main Import Form does not allow blank spaces