mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* rework into a json app and support the old style * working now * add health checking * add some datapoints to make writing alerts easy * add a few missing item for has checks * rework the app page * use the right var for id9 * print the self test log if we have it * add a graph for the max temp * display the max temp graph * display the health pass in the disk list if we have the data * fix legacy handling and set app as ok * replace id190 and id194 with the more useful maxtemp graph on the apps page * don't print the additional info area for legacy extends * add id232 * add id252 graph support * properly display id232 now * do not display SSD graphs for non-SSD disks * for legacy extends, make sure we don't have a bad line * add missing label for Product value * fix metrics * rework the metrics stuff a bit more * typo fix * more smart metrics cleanup * add exit info to metrics * style cleanup and logic checking for when disks are all now fine * fix checking for no more health errors * update the docs for SMART for v1 and remove slightly pointless notes about useSN * update the docs * initial test stuff * add missing tests for the legacy code * save if it it is legacy or not * style cleanup * update the smart legacy test * style cleanup * more test tweaking * some more style cleanup * more test fixes * correct the disk ID for the legacy test da0 -> Z304VCFY * more tests update * more test cleanup * begin cleanup of the v1 tests * more v1 test updates * more tests for v1 * more test cleanup * fix exit_nonzero and add unhealthy metric * add smart alerts * add the metric unhealthy to the stat test * use app data for the smart-common.inc.php
46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
$name = 'smart';
|
|
$unit_text = '';
|
|
$unitlen = 10;
|
|
$bigdescrlen = 25;
|
|
$smalldescrlen = 25;
|
|
$colours = 'mega';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$addarea = 1;
|
|
$transparency = 15;
|
|
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $vars['disk']]);
|
|
$rrd_filename_232 = Rrd::name($device['hostname'], ['app', $name . '_id232', $app->app_id, $vars['disk']]);
|
|
|
|
if (Rrd::checkRrdExists($rrd_filename)) {
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'Worst_Case_Erase_Count',
|
|
'ds' => 'id173',
|
|
];
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'Wear_Leveling_Count',
|
|
'ds' => 'id177',
|
|
];
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'SSD_Life_Left',
|
|
'ds' => 'id231',
|
|
];
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename,
|
|
'descr' => 'Media_Wearout_Indicator',
|
|
'ds' => 'id233',
|
|
];
|
|
$rrd_list[] = [
|
|
'filename' => $rrd_filename_232,
|
|
'descr' => 'Available_Reservd_Space',
|
|
'ds' => 'id232',
|
|
];
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';
|