packet_loss macros quick fix (#15961)

* packet_loss macros quick fix
Due to device_perf table going away, this macro no longer functions as it did.
Use device status to make it somewhat functional until a better solution can be found.

* remove space
This commit is contained in:
Tony Murray
2024-04-20 09:26:51 -05:00
committed by GitHub
parent 9088a34299
commit 613fd18511
3 changed files with 7 additions and 3 deletions

View File

@@ -11,8 +11,8 @@
"device_up": "(%devices.status = 1 && %macros.device)",
"device_down": "(%devices.status = 0 && %macros.device)",
"now": "NOW()",
"packet_loss_15m": "(%macros.past_15m && %device_perf.loss)",
"packet_loss_5m": "(%macros.past_5m && %device_perf.loss)",
"packet_loss_15m": "if(%devices.status = 0, 100, 0)",
"packet_loss_5m": "if(%devices.status = 0, 100, 0)",
"past_5m": "DATE_SUB(NOW(),INTERVAL 5 MINUTE)",
"past_10m": "DATE_SUB(NOW(),INTERVAL 10 MINUTE)",
"past_15m": "DATE_SUB(NOW(),INTERVAL 15 MINUTE)",

View File

@@ -98,5 +98,10 @@
<description>Due to a bug, all manually set port speeds will need to be reconfigured. Likely they are set to 1 instead of the expected value. See https://github.com/librenms/librenms/pull/15238 for more information.</description>
<pubDate>Mon, 21 Aug 2023 15:00:00 +0000</pubDate>
</item>
<item>
<title>Alerting packet loss macro</title>
<description>The packet loss macros were broken recently. The quick fix is to have them resemble device up/down, which is similar to how they would function if fping_options.count=1. Hopefully, they can be fixed in the future, but be aware their functionality is degraded in the meantime.</description>
<pubDate>Sat, 4 Apr 2024 14:00:00 +0000</pubDate>
</item>
</channel>
</rss>