Custom alert macros are not re-evaluated


I’m using an alert macro, which I defined in config.php.
Today I did a modification of it, however, my system’s alerting behavior did not change as expected.

I ran the " Capture Debug Information" fort “Alerts” and the SQL query shown there did not include my modifications.

In an alert rule which uses the macro i clicked on advanced and again, the modification was not shown in the SQL query there.

I deleted the rule which was referring to the macro and applied it back to my “alert rule”.
Now I could see my modifications in the SQL query under “advanced” and also in the “Debug Capture”.
I had to do this for every reference to my macro.

Right now changes in alert macros are not automatically updated:


Component Version
LibreNMS 1.47-87-g45e0e5e
DB Schema 1000
PHP 7.1.25
MySQL 5.5.60-MariaDB
RRDTool 1.4.8


[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Best regards,

I came accross this today again. The problem still exists…

If this is not the right place to report a bug… can somebody please point to the right place and procedure of doing that?

Thank you!

Best regards,

  • awaum

Can confirm the bug

to replicate, set custom macro in config.php e.g

$config['alert']['macros']['rule']['Out_Of_Business_Hours'] = '(HOUR(now()) <= 7 OR HOUR(now()) >= 17) OR WEEKDAY(now()) >= 5';

Create the alert rule with the macro set to yes.

change the time

$config['alert']['macros']['rule']['Out_Of_Business_Hours'] = '(HOUR(now()) <= 6 OR HOUR(now()) >= 18) OR WEEKDAY(now()) >= 5';

SQL doesn’t update to reflect updated macro.