Files
librenms-librenms/includes/html/graphs/application/logsize-common.inc.php
Zane C. Bowers-Hadley 2ac9a634b4 Logsize monitoring for LibreNMS (#15137)
* add logsize poller

* add set size info

* add more stats

* add min size

* more logsize files

* add logsize

* fix creating log file links

* add two new graphs

* add some graphs

* add no_minus_d

* add no minus d to app page

* add count of log files

* save logsizes in app data

* rename title log sizes

* only show top 12

* add mean median and mode

* cleanup naming a bit

* the values for the files hash is now a int instead of another hash

* add new stats and correct median name

* now properly handle unseen

* fix logsize bits

* add combined

* update metrics and add some tests

* add logsize graphs to apps page

* add the logsize bit

* add logszie docs

* add some example alert rules

* style cleanup

* more style cleanup

* fix a few things for metrics and update the test

* fix a variable name in the test and update the data
2023-07-19 22:02:23 -05:00

12 lines
440 B
PHP

<?php
$name = 'logsize';
if (isset($vars['log_set']) && isset($vars['log_file'])) {
$filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $vars['log_set'] . '_____-_____' . $vars['log_file']]);
} elseif (isset($vars['log_set'])) {
$filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $vars['log_set']]);
} else {
$filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id]);
}