Trouble with storage in new alert rules format

I can’t seem to create an alert rule that relates storage.storage_perc to storage.storage_perc_warn.
When I try, using the new rule ui, I can only enter a numeric value for comparison.

For example, trying to import from the old style rule from the alerting docs:
storage.storage_perc >= storage_perc_warn simply leaves the second field blank.

Are there docs on the new UI yet?

Thank you,
-Mike Sherman

INFO: output of ./validate.php

Component Version
LibreNMS 1.38-178-gef66a22
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5


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


I also attempted to add it as a template, with the same results. I added the following to ./misc/alert_rules.json

    "rule": "%storage.storage_perc >= %storage.storage_perc_warn && %macros.device_up = \"1\"",
    "name": "Storage percent over limit, check volume",
    "default": true

Try this PR:

That fixed it. I was able to enter storage.storage_perc_warn , with the backticks, and it now seems to be functioning properly.
It properly obeys thresholds.

One bit of behavior I noticed, is that without the backticks, the string is automatically quoted, and seems to be interpered as 0, as the rule triggered for all values. I’m not sure if the intended behavior is to alert or not, if it’s an invalid comparison.

Thanks for the help

Have you tried to do it without the backticks?

Without the backticks, it seems to be interpreted as a string, and the rule triggers for any value of storage_perc_warn. So the backticks are currently necessary.