Hi @Tadpole
DB data is not automatically exposed in alerts. To find out what is available, you can use the test scripts for alerts and templates :
librenms@monitoring1:~$ ./scripts/test-alert.php
Info:
Use this to send an actual alert via transports that is currently active.
Usage:
-r Is the Rule ID.
-h Is the device ID or hostname
-d Debug
Example:
./scripts/test-alert.php -r 4 -d -h localhost
and for templates :
librenms@monitoring1:~$ ./scripts/test-template.php
Usage:
-t Is the template ID.
-h Is the device ID or hostname
-r Is the rule ID
-p Is the transport name (optional)
-s Is the alert state <0|1|2|3|4> (optional - defaults to current state.)
0 = ok, 1 = alert, 2 = acknowledged, 3 = got worse, 4 = got better
-d Debug
Example:
./scripts/test-template.php -t 10 -d -h localhost -r 2 -p mail
If the data is indeed missing, a few options :
- Send a Pull Request correcting the missing data
- Use PHP code in the template to get the data directly in the printer_supplies PHP object
(like so : Alert template recovery: how to get actual value instead of alerted one - #2 by murrant or Alert template recovery: how to get actual value instead of alerted one - #8 by tamatsuna)