Removal of legacy alert rules

This announcement is probably not going to affect anyone but in the spirit of good comms we wanted to let people know about the upcoming removal of some legacy code.

As of the 29th of May 2025, we started to log if anyone was using the old alert rule format that hasn’t existed for over 5 years. To check if you are impacted you can check for the string “Legacy alert rule detected, please convert your alert rule to new format” in your librenms log:

grep 'Legacy alert rule detected, please convert your alert rule to new format' /opt/librenms/logs/librenms.log

If you see anything returned then you need to check the alert rule mentioned in the log. You can also run this command to give you more information:

php artisan tinker
\App\Models\AlertRule::where('builder', '')->get();

Again, if you get any results from the above then you need to update your rules.

Q. How do you update your rules?
A. You should just be able to edit the existing rule and just click save.

If that doesn’t work and the command from tinker still returns results then It’s probably easier to recreate it from the old rule, you can do this by selecting “Import from” when creating a new rule, selecting “Old format” and pasting the output from the “rule” field from the above query. Don’t forget to set your other options as per the original rule and once you are happy, delete the old alert rule.

Q. When do I need to do this by?
A. By the time 25.6.0 is released which will be due around the 16th of June. After 25.6.0 we will be merging the update in that will remove the code old alerts relied upon and alerting will no longer work if you haven’t updated. That means if you are on the monthly stable release then that change will happen in 25.7.0

1 Like