Storage Alert Rule, Triggering for all drives

Hi,

I know this is me (sadly), but really struggling to get it working :frowning:. Trying to create an alert rule for storage space (too low free space). I see lots of posts about this, but it seems the format / approach has changed of late.

I went in to mysql, and in the storage table ran the command manually (after setting some thresholds as I needed them to be),

select * from `storage` where `storage_perc` > storage_perc_warn;

Perfect, comes back with 1 row / device,

+------------+-----------+-------------+---------------+--------------------+------------------------------------------+--------------+---------------+--------------+--------------+--------------+-------------------+-----------------+
| storage_id | device_id | storage_mib | storage_index | storage_type       | storage_descr                            | storage_size | storage_units | storage_used | storage_free | storage_perc | storage_perc_warn | storage_deleted |
+------------+-----------+-------------+---------------+--------------------+------------------------------------------+--------------+---------------+--------------+--------------+--------------+-------------------+-----------------+
|        757 |        56 | hrstorage   | 1             | hrStorageFixedDisk | C:\ Label:System  Serial Number 9e6be2eb | 118513475584 |          4096 | 114464489472 |   4048986112 |           97 |                60 |               0 |
+------------+-----------+-------------+---------------+--------------------+------------------------------------------+--------------+---------------+--------------+--------------+--------------+-------------------+-----------------+
1 row in set (0.000 sec)

But … creating the rule in LibreNMS, if I override SQL, to get it working, with,

SELECT * FROM devices,storage WHERE (devices.device_id = ? AND devices.device_id = storage.device_id) AND storage_perc > storage_perc_warn

Well, then NP. But if I use the menus to pull down / select items in the rule “generator”, I get the rule,

storage.storage_perc > "storage.storage_perc_warn"

And every single device shows up with an alert :frowning_face:. I get the feeling this isn’t being handled as an integer … right? I also tried % in front of storage.storage_perc_warn (and removing storage), but nothing seems to work.

Any thoughts?

Thanks!

BTW, I think it’s the quotes around "storage.storage_perc_warn", but the GUI seems to add those by itself :frowning_face:.

Thanks!

Same problem here, I’ve also encountered this issue and have to set rule by custom SQL query to get it work, otherwise the rule will never recovery.

====================================

Component Version
LibreNMS 21.2.0
DB Schema 2021_02_09_084318_remove_perf_times (199)
PHP 7.4.15
Python 3.8.8
MySQL 10.4.17-MariaDB-1:10.4.17+maria~focal
RRDTool 1.7.2
SNMP NET-SNMP 5.9

====================================

[OK] Installed from package; no Composer required
[OK] Database connection successful
[OK] Database schema correct
[INFO] Detected Dispatcher Service
[FAIL] Dispatcher service is enabled on your cluster, but not in use on this node
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Non-git install, updates are manual or from package

====================================

This topic was automatically closed 730 days after the last reply. New replies are no longer allowed.