Hello,
I’m new to LibreNMS, and I’ve recently been tasked with finding a way to set custom thresholds for the progress bars on the health and device pages. By default LibreNMS will use the get_percentage_colours($percentage) function in librenms/html/includes/functions.inc.php to determine what colors to give the progress bar on these pages.
I am trying to come up with a way to override these values depending on the device/configuration. For example, we monitor some devices with drives that are 2TB+ and automatically remove files after a certain point. We also have devices that can reach 80-90% memory utilization without using much swap space. I know it probably goes against rational, but reaching 90% full threshold on some of our components is common and not much reason for concern.
I am trying to find an elegant way to define a custom “red” progress bar thresholds. I found I can pull the ‘storage_perc_warn’ number from the ‘storage’ table for our storage devices. This was a small win, but I’ve found there isn’t a similar field for processors or mempools. Does anyone have a suggestion on how to design around this problem? Would this feature useful to anyone else?
Thanks in advance,
rpenziol