mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Macros for xDP neighbours alert rules (#9531)
* Macros for xDP devices * Documentation for macros.port_has_xdp_neighbours * Stupid typo while renaming macro port_has_xdp_neighbours_device
This commit is contained in:
@@ -168,6 +168,22 @@ Description: Ports that were previously up and have now gone down.
|
||||
|
||||
Example: `macros.port_now_down = 1`
|
||||
|
||||
### Port has xDP neighbour (Boolean)
|
||||
|
||||
Entity: `%macros.port AND %links.local_port_id = %ports.port_id`
|
||||
|
||||
Description: Ports that have an xDP (lldp, cdp, etc) neighbour.
|
||||
|
||||
Example: `macros.port_has_xdp_neighbours = 1`
|
||||
|
||||
### Port has xDP neighbour already known in LibreNMS (Boolean)
|
||||
|
||||
Entity: `%macros.port_has_neighbours AND (%links.remote_port_id IS NOT NULL)`
|
||||
|
||||
Description: Ports that have an xDP (lldp, cdp, etc) neighbour that is already known in libreNMS.
|
||||
|
||||
Example: `macros.port_has_xdp_neighbours_device = 1`
|
||||
|
||||
### Device component down [JunOS]
|
||||
|
||||
Entity: `sensors.sensor_class = "state" AND sensors.sensor_current != "6" AND sensors.sensor_type = "jnxFruState" AND sensors.sensor_current != "2"`
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
"port_in_usage_perc": "((%ports.ifInOctets_rate*8) \/ %ports.ifSpeed)*100",
|
||||
"port_out_usage_perc": "((%ports.ifOutOctets_rate*8) \/ %ports.ifSpeed)*100",
|
||||
"port_now_down": "%ports.ifOperStatus != %ports.ifOperStatus_prev && %ports.ifOperStatus_prev = \"up\" && %ports.ifAdminStatus = \"up\" && %macros.port",
|
||||
"port_has_xdp_neighbours": "(%macros.port && %links.local_port_id = %ports.port_id)",
|
||||
"port_has_xdp_neighbours_device": "(%macros.port_has_xdp_neighbours && %links.remote_port_id IS NOT NULL)",
|
||||
"pdu_over_amperage_apc": "%sensors.sensor_class = \"current\" && %sensors.sensor_descr = \"Bank Total\" && %sensors.sensor_current > %sensors.sensor_limit && %devices.os = \"apc\"",
|
||||
"sensor": "(%sensors.sensor_alert = 1)",
|
||||
"sensor_port_link": "(%sensors.entPhysicalIndex_measured = 'ports' && %sensors.entPhysicalIndex = %ports.ifIndex && %macros.port_up)",
|
||||
|
||||
Reference in New Issue
Block a user