Commit version 24.12.13800
This commit is contained in:
@ -5,50 +5,47 @@
|
||||
*
|
||||
* This file is part of Observium.
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
if (!isset($rrd_filename))
|
||||
{
|
||||
# We can be included from arista_netstats_sw_ip6, which just sets the filename.
|
||||
$rrd_filename = get_rrd_path($device, "arista-netstats-sw-ip.rrd");
|
||||
$ipv = "v4";
|
||||
if (!isset($rrd_filename)) {
|
||||
# We can be included from arista_netstats_sw_ip6, which just sets the filename.
|
||||
$rrd_filename = get_rrd_path($device, "arista-netstats-sw-ip.rrd");
|
||||
$ipv = "v4";
|
||||
}
|
||||
|
||||
$stats = array(
|
||||
'InReceives' => array(),
|
||||
'InForwDatagrams' => array(),
|
||||
'InNoRoutes' => array(),
|
||||
'InAddrErrors' => array(),
|
||||
'InUnknownProtos' => array(),
|
||||
'InTruncatedPkts' => array(),
|
||||
'OutForwDatagrams' => array(),
|
||||
'OutDiscards' => array(),
|
||||
'OutNoRoutes' => array(),
|
||||
'OutTransmits' => array());
|
||||
$stats = [
|
||||
'InReceives' => [],
|
||||
'InForwDatagrams' => [],
|
||||
'InNoRoutes' => [],
|
||||
'InAddrErrors' => [],
|
||||
'InUnknownProtos' => [],
|
||||
'InTruncatedPkts' => [],
|
||||
'OutForwDatagrams' => [],
|
||||
'OutDiscards' => [],
|
||||
'OutNoRoutes' => [],
|
||||
'OutTransmits' => []];
|
||||
|
||||
$i=0;
|
||||
foreach ($stats as $stat => $array)
|
||||
{
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $stat . " " . $ipv;
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
if (strpos($stat, "Out") !== FALSE)
|
||||
{
|
||||
$rrd_list[$i]['invert'] = TRUE;
|
||||
}
|
||||
$i = 0;
|
||||
foreach ($stats as $stat => $array) {
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $stat . " " . $ipv;
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
if (strpos($stat, "Out") !== FALSE) {
|
||||
$rrd_list[$i]['invert'] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
$colours='mixed';
|
||||
$colours = 'mixed';
|
||||
|
||||
$scale_min = "0";
|
||||
$nototal = 1;
|
||||
$scale_min = "0";
|
||||
$nototal = 1;
|
||||
$simple_rrd = TRUE;
|
||||
|
||||
include($config['html_dir']."/includes/graphs/generic_multi_line.inc.php");
|
||||
include($config['html_dir'] . "/includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user