initial commit; version 22.5.12042
This commit is contained in:
38
html/pages/device/health/counter.inc.php
Normal file
38
html/pages/device/health/counter.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage webui
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if ($metric != 'counter' && device_permitted($device))
|
||||
{
|
||||
|
||||
// Don't show aggregate graphs to people without device permissions, or for "all sensors" view.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
print_counter_table($vars);
|
||||
|
||||
// EOF
|
20
html/pages/device/health/dbm.inc.php
Normal file
20
html/pages/device/health/dbm.inc.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium Network Management and Monitoring System
|
||||
* Copyright (C) 2006-2015, Adam Armstrong - http://www.observium.org
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage webui
|
||||
* @author Adam Armstrong <adama@observium.org>
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$class = "dbm";
|
||||
$unit = "dBm";
|
||||
$graph_type = "sensor_dbm";
|
||||
|
||||
include("sensors.inc.php");
|
||||
|
||||
// EOF
|
88
html/pages/device/health/diskio.inc.php
Normal file
88
html/pages/device/health/diskio.inc.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage web
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (device_permitted($device)) {
|
||||
|
||||
// Only show aggregate graph if we have access to the entire device.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_diskio_bits";
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
$graph_array['type'] = "device_diskio_ops";
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
echo generate_box_open();
|
||||
|
||||
echo('<table class="table table-striped table-condensed ">');
|
||||
|
||||
//echo("<thead><tr>
|
||||
// <th>Device</th>
|
||||
// </tr></thead>");
|
||||
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY diskio_descr", array($device['device_id'])) as $drive)
|
||||
{
|
||||
|
||||
$fs_url = "device/device=".$device['device_id']."/tab=health/metric=diskio/";
|
||||
|
||||
$graph_array_zoom['id'] = $drive['diskio_id'];
|
||||
$graph_array_zoom['type'] = "diskio_ops";
|
||||
$graph_array_zoom['width'] = "400";
|
||||
$graph_array_zoom['height'] = "125";
|
||||
$graph_array_zoom['from'] = $config['time']['twoday'];
|
||||
$graph_array_zoom['to'] = $config['time']['now'];
|
||||
|
||||
echo("<tr><td><h3>");
|
||||
echo(overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), NULL));
|
||||
echo("</h3>");
|
||||
|
||||
$types = array("diskio_bits", "diskio_ops");
|
||||
|
||||
$rrd_filename = get_rrd_path($device, "diskstat-".$drive['diskio_descr'].".rrd");
|
||||
if(is_file($rrd_filename))
|
||||
{
|
||||
$types[] = "diskio_stat";
|
||||
}
|
||||
|
||||
foreach ($types as $graph_type)
|
||||
{
|
||||
|
||||
$graph_array = array();
|
||||
$graph_array['id'] = $drive['diskio_id'];
|
||||
$graph_array['type'] = $graph_type;
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
// EOF
|
36
html/pages/device/health/mempool.inc.php
Normal file
36
html/pages/device/health/mempool.inc.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage web
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (device_permitted($device)) {
|
||||
|
||||
// Only show aggregate graph if we have access to the entire device.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
print_mempool_table($vars);
|
||||
|
||||
// EOF
|
38
html/pages/device/health/processor.inc.php
Normal file
38
html/pages/device/health/processor.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage web
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (device_permitted($device)) {
|
||||
|
||||
// Only show aggregate graph if we have access to the entire device.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
$graph_type = "processor_usage";
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
print_processor_table($vars);
|
||||
|
||||
// EOF
|
38
html/pages/device/health/sensors.inc.php
Normal file
38
html/pages/device/health/sensors.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium Network Management and Monitoring System
|
||||
* Copyright (C) 2006-2015, Adam Armstrong - http://www.observium.org
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage webui
|
||||
* @author Adam Armstrong <adama@observium.org>
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if($metric != 'sensors' && device_permitted($device))
|
||||
{
|
||||
|
||||
// Don't show aggregate graphs to people without device permissions, or for "all sensors" view.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
print_sensor_table($vars);
|
||||
|
||||
// EOF
|
42
html/pages/device/health/status.inc.php
Normal file
42
html/pages/device/health/status.inc.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage web
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (device_permitted($device)) {
|
||||
|
||||
// Only show aggregate graph if we have access to the entire device.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
}
|
||||
|
||||
print_status_table($vars);
|
||||
|
||||
// EOF
|
37
html/pages/device/health/storage.inc.php
Normal file
37
html/pages/device/health/storage.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage web
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
if (device_permitted($device)) {
|
||||
|
||||
// Only show aggregate graph if we have access to the entire device.
|
||||
|
||||
$graph_title = nicecase($vars['metric']);
|
||||
$graph_array['type'] = "device_".$vars['metric'];
|
||||
$graph_array['device'] = $device['device_id'];
|
||||
$graph_array['legend'] = 'no';
|
||||
|
||||
$box_args = array('title' => $graph_title,
|
||||
'header-border' => TRUE,
|
||||
);
|
||||
|
||||
echo generate_box_open($box_args);
|
||||
|
||||
print_graph_row($graph_array);
|
||||
|
||||
echo generate_box_close();
|
||||
|
||||
|
||||
}
|
||||
|
||||
print_storage_table($vars);
|
||||
|
||||
// EOF
|
Reference in New Issue
Block a user