Custom macro

Take a look here for your threshold issue Threshold for traffic alertings

and to create a custom macro you specify it in config.php https://docs.librenms.org/Alerting/Macros/