2010-06-19 16:06:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$row = 1;
|
|
|
|
|
|
2017-03-04 11:19:04 +00:00
|
|
|
foreach (get_disks($device['device_id']) as $drive) {
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_integer($row / 2)) {
|
2019-06-23 00:29:12 -05:00
|
|
|
$row_colour = \LibreNMS\Config::get('list_colour.even');
|
2016-08-18 20:28:22 -05:00
|
|
|
} else {
|
2019-06-23 00:29:12 -05:00
|
|
|
$row_colour = \LibreNMS\Config::get('list_colour.odd');
|
2015-07-10 13:36:21 +02:00
|
|
|
}
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$fs_url = 'device/device='.$device['device_id'].'/tab=health/metric=diskio/';
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$graph_array_zoom['id'] = $drive['diskio_id'];
|
|
|
|
|
$graph_array_zoom['type'] = 'diskio_ops';
|
|
|
|
|
$graph_array_zoom['width'] = '400';
|
|
|
|
|
$graph_array_zoom['height'] = '125';
|
2019-06-23 00:29:12 -05:00
|
|
|
$graph_array_zoom['from'] = \LibreNMS\Config::get('time.twoday');
|
|
|
|
|
$graph_array_zoom['to'] = \LibreNMS\Config::get('time.now');
|
2011-09-20 09:55:11 +00:00
|
|
|
|
2015-09-21 01:30:23 +05:30
|
|
|
$overlib_link = overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), null);
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$types = array(
|
|
|
|
|
'diskio_bits',
|
|
|
|
|
'diskio_ops',
|
|
|
|
|
);
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
foreach ($types as $graph_type) {
|
|
|
|
|
$graph_array = array();
|
|
|
|
|
$graph_array['id'] = $drive['diskio_id'];
|
|
|
|
|
$graph_array['type'] = $graph_type;
|
2016-08-18 20:28:22 -05:00
|
|
|
if ($graph_array['type']=="diskio_ops") {
|
2015-09-21 01:30:23 +05:30
|
|
|
$graph_type_title="Ops/sec";
|
2016-08-18 20:28:22 -05:00
|
|
|
}
|
|
|
|
|
if ($graph_array['type']=="diskio_bits") {
|
2015-09-21 01:30:23 +05:30
|
|
|
$graph_type_title="bps";
|
|
|
|
|
}
|
|
|
|
|
echo "<div class='panel panel-default'>
|
|
|
|
|
<div class='panel-heading'>
|
|
|
|
|
<h3 class='panel-title'>$overlib_link - $graph_type_title</h3>
|
|
|
|
|
</div>";
|
|
|
|
|
echo "<div class='panel-body'>";
|
2019-04-11 23:26:42 -05:00
|
|
|
include 'includes/html/print-graphrow.inc.php';
|
2015-09-21 01:30:23 +05:30
|
|
|
echo '</div></div>';
|
2015-07-10 13:36:21 +02:00
|
|
|
}
|
2010-06-19 16:06:57 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$row++;
|
2016-08-18 20:28:22 -05:00
|
|
|
}
|