Im trying to get a slack alert from Librenms when a ports utilization goes over 80% .
The first link i think has an “alert rule” that matches what i want but need a bone thrown
https://github.com/zimmertr/LibreNMS-Example-Alerts.
This helps but. Honestly, im lost
https://docs.librenms.org/#Alerting/
So for the alert rule for ports utilization goes over 80% would look something like this.
This rule is also listed in the alerts collection
So i went to the dvice in question. and hit “edit” then hit “alert rules” pictured below. how do i add this to the interface i want ?
Would “Map to” be the right way for this ?
If you want to map it to a device go to Alerts menu then Rule Mapping. You cant do it from the alert rule.
Think i got it. does this look good ? the macros.port= i assume is for setting the right port
No, macros,port = 1 is not the interface name. Leave that = 1
macros.port = 1 checks to see if the interface is set to “ignore” or “disabled”
port (%ports.deleted = 0 && %ports.ignore = 0 && %ports.disabled = 0)
I did this and it did alert with the Slack transport url i set. still not sure if this alert is going to go off if any other interface hits +70%
I don’t know what mean by that… It will alert on any interface that hits 70% or greater. Unless you rule mapped to just one device. Then its only going to alert on that one device. Things to keep in mind polling is down every 5 min so if its not at the limit during that 5 min poll cycle it may get missed, Also depends on when you have set in your alert rule for delay and interval. Please check the docs for more info.
Sorry i mean any other interface on this same device. I only want this alert to go off for eth1/1 hence my question earlier about the macro
Yes, this will alert rule will alert on any interface.
If you want to alert on a specific interface. Then you need to specify that either by ports.portName or ports.ifDescr
sorry did not see your suggestion before i posted
No worries you will need to play with the ports.ifname
Also, I don’t recommend doing strict comparison = Eth1/1 I would try with like ~ Eth1/1
Finally a slack related question. under the “enter config options” box in the slack transport section. what goes in there ?

No clue. I use slack here too and it works. I would just leave it blank for now.