Skip to content

Commit

Permalink
packet_loss macros quick fix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
murrant committed Apr 20, 2024
1 parent 9088a34 commit 67f7749
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion doc/Support/Cleanup-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ These options rely on ```daily.sh``` running from cron as per the installation i
lnms config:set authlog_purge 30
lnms config:set ports_fdb_purge 10
lnms config:set ports_nac_purge 10
lnms config:set device_perf_purge 7
lnms config:set rrd_purge 0
lnms config:set ports_purge true
```
Expand Down
4 changes: 2 additions & 2 deletions misc/macros.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
5 changes: 5 additions & 0 deletions misc/notifications.rss
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 67f7749

Please sign in to comment.