Hi,
I know this is me (sadly), but really struggling to get it working . 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 . 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!