Bulk-edit storage_perc_warn?

Just curious, is there an officially sanctioned way to change the default 60% storage warning percentage? All but a small handful of our drives we’re OK with running up to 90% full, so we have to have separate rules right now for those drives on those boxen, with the general rule set to <=90%, except those machines.

It would be a lot simpler if we could set <= %storage_perc_warn and then modify those small handful of partitions, especially as we build out this server and run into more little exceptions that require bespoke alert rules.


1 Like

I don’t think there is global way of changing the percent for drives from 60%.

But you can change it per device under settings/storage.

I have one rule set for the alert on warning and then I just go custom set the storage % warning for each device.

It’s not changeable but possibly should be, we’d accept a PR for it.

1 Like

@Kevin_Krumm I am aware of the setting, but my concern is that 99% of the drives we want at 90% rather than 60%. It is my hope to make editing the devices’ parameters upon adding them to LibreNMS the exception rather than the norm by changing that defaults en masse, so that the small handful of exceptions can be treated as such.

@laf I am unfamiliar with PR. Is that LibreNMS parlance for a feature request? And if so, would that be here or on github?


1 Like

PR is a pull request, i.e you writing the changes and submitting them on github for us to look at.

If you can’t do that then you can create a feature request on this forum.

Appreciate the help, but since there’s no official UI for it I did it myself in mySQL. For anyone else that finds this post looking for the same thing, here’s what I did in the database;

ALTER TABLE storage ALTER COLUMN storage_perc_warn SET DEFAULT ‘90’;
UPDATE storage SET storage_perc_warn = REPLACE (storage_perc_warn, ‘60’, ‘90’);

1 Like

FYI that validate will no longer confirm your install is correct due to this. We also can’t say that this won’t be overwrote at some stage so whilst it might work now, use at your own risk.

frustrated thumbnail

Thanks for the information @laf. I hadn’t thought to try validate.php and I don’t want to end up deviating too far from a standard install.

To make validate.php happy I’ve set the default back to 60. I scripted that REPLACE statement and put it in crontab, so that when the other admins add machines it doesn’t alert them that they’re low on space.

Since the replace statement is looking for a specific value (60) and changing that only, I’m hoping that the worst case scenario is that the script simply stops working if the database changes in the future. I’ve never worked at a place where 60% full was cause for concern. It’s a puzzling default, and even stranger that it can’t be changed.

I guess I’ll make a feature request for an officially sanctioned solution.

I really like LibreNMS, and it’s so close to being awesome for lightweight system monitoring and alerting. Stuff like this seems minor, but for the other admins I work with it’s the difference between moving forward with LibreNMS or sticking with the massively over-engineered Zabbix system I’m hoping to replace.

Thanks again.