patricegautier/unifiZabbix

Suggestion: Add discovery rule for switch port changes

hellojoe88 opened this issue · 2 comments

I recently discovered in my network that faulty network cables or ports can cause connection speed changes, that may not be wanted. So I added a discovery rule for it to zabbix, I thought you might find it useful and want to add it:

Name of Trigger Prototype{{#PORT_IS_UPLINK}.regsub("true", "Uplink")} {{#PORT_MEDIA}.regsub("SFP", \0)} Port {#PORT_IDX} has changed Connection Speed

Expression: last(/Unifi Switch/connection_speed_[{#PORT_IDX}],#2)>0 and last(/Unifi Switch/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi Switch/up_[{#PORT_IDX}],#1)="true" and last(/Unifi Switch/stp_state_[{#PORT_IDX}],#1)="forwarding" and (last(/Unifi Switch/connection_speed_[{#PORT_IDX}],#1) <> last(/Unifi Switch/connection_speed_[{#PORT_IDX}],#2))

I added it as a "Trigger prototype" to the "Switch Port Discovery" in the Unifi Switch Template

I like the idea! Added to the template..
It is marked a non auto resolving, so you have to acknowledge in the ZB ui every time this happens. Otherwise the next time around the trigger auto resolves..

Thank you for including it so quickly. :)

Yeah true, I didn't mind it autoresolving, since I always look at the history. I feel it makes sense both ways.