rra? no. you mean ds. also make multi_bits_separated prettier

git-svn-id: http://www.observium.org/svn/observer/trunk@2534 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-21 11:59:59 +00:00
parent 86c6a817ad
commit a9cac94659
69 changed files with 231 additions and 210 deletions
+5 -5
View File
@@ -34,15 +34,15 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($id))
$rrd_filenames[] = $rrd_filename;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $port['ifDescr'];
$rrd_list[$i]['rra_in'] = $rra_in;
$rrd_list[$i]['rra_out'] = $rra_out;
$rrd_list[$i]['ds_in'] = $ds_in;
$rrd_list[$i]['ds_out'] = $ds_out;
$i++;
}
unset($ignore);
}
$units ='bps';
$units ='b';
$total_units ='B';
$colours_in ='greens';
$multiplier = "8";
@@ -51,8 +51,8 @@ $colours_out = 'blues';
$nototal = 1;
$rra_in = "INOCTETS";
$rra_out = "OUTOCTETS";
$ds_in = "INOCTETS";
$ds_out = "OUTOCTETS";
$graph_title .= "::bits";
@@ -2,8 +2,8 @@
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cipsec_flow.rrd";
$rra_in = "InOctets";
$rra_out = "OutOctets";
$ds_in = "InOctets";
$ds_out = "OutOctets";
include("includes/graphs/generic_bits.inc.php");
@@ -2,8 +2,8 @@
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cipsec_flow.rrd";
$rra_in = "InPkts";
$rra_out = "OutPkts";
$ds_in = "InPkts";
$ds_out = "OutPkts";
$colour_area_in = "AA66AA";
$colour_line_in = "330033";
@@ -7,69 +7,69 @@ $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cipsec_flow.r
$i=0;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InAuths";
$rrd_list[$i]['rra'] = "InAuths";
$rrd_list[$i]['ds'] = "InAuths";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "OutAuths";
$rrd_list[$i]['rra'] = "OutAuths";
$rra_list[$i]['invert'] = "1";
$rrd_list[$i]['ds'] = "OutAuths";
$ds_list[$i]['invert'] = "1";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InDecrypts";
$rrd_list[$i]['rra'] = "InDencrypts";
$rrd_list[$i]['ds'] = "InDencrypts";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "OutEncrypts";
$rrd_list[$i]['rra'] = "OutEncrypts";
$rra_list[$i]['invert'] = "1";
$rrd_list[$i]['ds'] = "OutEncrypts";
$ds_list[$i]['invert'] = "1";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InDrops";
$rrd_list[$i]['rra'] = "InDrops";
$rrd_list[$i]['ds'] = "InDrops";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InReplayDrops";
$rrd_list[$i]['rra'] = "InReplayDrops";
$rrd_list[$i]['ds'] = "InReplayDrops";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "OutDrops";
$rrd_list[$i]['rra'] = "OutDrops";
$rra_list[$i]['invert'] = "1";
$rrd_list[$i]['ds'] = "OutDrops";
$ds_list[$i]['invert'] = "1";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InAuthFail";
$rrd_list[$i]['rra'] = "InAuthFails";
$rrd_list[$i]['ds'] = "InAuthFails";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "OutAuthFail";
$rrd_list[$i]['rra'] = "OutAuthFails";
$rra_list[$i]['invert'] = "1";
$rrd_list[$i]['ds'] = "OutAuthFails";
$ds_list[$i]['invert'] = "1";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "InDecryptFails";
$rrd_list[$i]['rra'] = "InDecryptFails";
$rrd_list[$i]['ds'] = "InDecryptFails";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "OutEncryptFails";
$rrd_list[$i]['rra'] = "OutEncryptFails";
$rra_list[$i]['invert'] = "1";
$rrd_list[$i]['ds'] = "OutEncryptFails";
$ds_list[$i]['invert'] = "1";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "ProtocolUseFails";
$rrd_list[$i]['rra'] = "ProtocolUseFails";
$rrd_list[$i]['ds'] = "ProtocolUseFails";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "NoSaFails";
$rrd_list[$i]['rra'] = "NoSaFails";
$rrd_list[$i]['ds'] = "NoSaFails";
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = "SysCapFails";
$rrd_list[$i]['rra'] = "SysCapFails";
$rrd_list[$i]['ds'] = "SysCapFails";
#$units='%';
#$total_units='%';
@@ -4,7 +4,7 @@ include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cipsec_flow.rrd";
$rra = "Tunnels";
$ds = "Tunnels";
$colour_area = "9999cc";
$colour_line = "0000cc";
+1 -1
View File
@@ -7,7 +7,7 @@
* Foundation; only version 2 of the License is applicable.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* ANY WARRANTY; without even the implied wadsnty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
@@ -7,8 +7,8 @@ $multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$rra_in = "read";
$rra_out = "written";
$ds_in = "read";
$ds_out = "written";
include("includes/graphs/device/diskio_common.inc.php");
@@ -9,8 +9,8 @@ foreach (dbFetchRows("SELECT * FROM `ucd_diskio` AS U, `devices` AS D WHERE D.de
{
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $disk['diskio_descr'];
$rrd_list[$i]['rra_in'] = $rra_in;
$rrd_list[$i]['rra_out'] = $rra_out;
$rrd_list[$i]['ds_in'] = $ds_in;
$rrd_list[$i]['ds_out'] = $ds_out;
$i++;
}
}
@@ -7,8 +7,8 @@ $colours_in = 'greens';
$multiplier = "1";
$colours_out = 'blues';
$rra_in = "reads";
$rra_out = "writes";
$ds_in = "reads";
$ds_out = "writes";
$nototal = 1;
@@ -22,7 +22,7 @@ foreach($stats as $stat => $colour)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("icmp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -22,7 +22,7 @@ foreach($stats as $stat => $array)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("icmp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -19,7 +19,7 @@ foreach($stats as $stat => $array)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("ip", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -19,7 +19,7 @@ foreach($stats as $stat)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("snmp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -14,7 +14,7 @@ foreach($stats as $stat)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("snmp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -13,7 +13,7 @@ foreach($stats as $stat)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("tcp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE || strpos($stat, "Retrans") !== FALSE || strpos($stat, "Attempt") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -13,7 +13,7 @@ foreach($stats as $stat)
$i++;
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = str_replace("udp", "", $stat);
$rrd_list[$i]['rra'] = $stat;
$rrd_list[$i]['ds'] = $stat;
if (strpos($stat, "Out") !== FALSE || strpos($stat, "Retrans") !== FALSE || strpos($stat, "Attempt") !== FALSE)
{
$rrd_list[$i]['invert'] = TRUE;
@@ -27,15 +27,15 @@ foreach ( $config['nfsen_rrds'] as $nfsenrrds )
$rrd_list[$nfsen_iter]['filename'] = $rrd_filename;
$rrd_list[$nfsen_iter]['descr'] = $flowtype;
$rrd_list[$nfsen_iter]['rra'] = $rraprefix . $flowtype;
$rrd_list[$nfsen_iter]['ds'] = $dsprefix . $flowtype;
# set a multiplier which in turn will create a CDEF if this var is set
if ($rraprefix == "traffic_") { $multiplier = "8"; }
if ($dsprefix == "traffic_") { $multiplier = "8"; }
$colours = "blues";
$nototal = 0;
$units="";
$unit_text = $rradescr;
$unit_text = $dsdescr;
$scale_min = "0";
if ($_GET['debug']) { print_r($rrd_list); }
@@ -1,5 +1,5 @@
<?php
$rradescr = "Flows/s ";
$rraprefix = "flows_";
$dsdescr = "Flows/s ";
$dsprefix = "flows_";
include("nfsen_common.inc.php");
?>
@@ -1,5 +1,5 @@
<?php
$rradescr = "Packets/s ";
$rraprefix = "packets_";
$dsdescr = "Packets/s ";
$dsprefix = "packets_";
include("nfsen_common.inc.php");
?>
@@ -1,5 +1,5 @@
<?php
$rradescr = "Byts/s ";
$rraprefix = "traffic_";
$dsdescr = "Byts/s ";
$dsprefix = "traffic_";
include("nfsen_common.inc.php");
?>
@@ -12,7 +12,7 @@ foreach ($procs as $proc)
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $descr;
$rrd_list[$i]['rra'] = "usage";
$rrd_list[$i]['ds'] = "usage";
$rrd_list[$i]['area'] = 1;
$i++;
}
@@ -12,7 +12,7 @@ foreach ($procs as $proc)
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $descr;
$rrd_list[$i]['rra'] = "usage";
$rrd_list[$i]['ds'] = "usage";
$i++;
}
}
@@ -8,15 +8,15 @@ $file = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("screeno
$rrd_list[0]['filename'] = $file;
$rrd_list[0]['descr'] = "Maxiumum";
$rrd_list[0]['rra'] = "max";
$rrd_list[0]['ds'] = "max";
$rrd_list[1]['filename'] = $file;
$rrd_list[1]['descr'] = "Allocated";
$rrd_list[1]['rra'] = "allocate";
$rrd_list[1]['ds'] = "allocate";
$rrd_list[2]['filename'] = $file;
$rrd_list[2]['descr'] = "Failed";
$rrd_list[2]['rra'] = "failed";
$rrd_list[2]['ds'] = "failed";
if ($_GET['debug']) { print_r($rrd_list); }
@@ -4,7 +4,7 @@ include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawContexts.rrd";
$rra = "value";
$ds = "value";
$colour_area = "9999cc";
$colour_line = "0000cc";
@@ -4,7 +4,7 @@ include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawInterrupts.rrd";
$rra = "value";
$ds = "value";
$colour_area = "CC9999";
$colour_line = "CC0000";
+2 -2
View File
@@ -2,8 +2,8 @@
$rrd_filename_in = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssIORawReceived.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssIORawSent.rrd";
$rra_in = "value";
$rra_out = "value";
$ds_in = "value";
$ds_out = "value";
$multiplier = 512;
@@ -2,8 +2,8 @@
$rrd_filename_in = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawSwapIn.rrd";
$rrd_filename_out = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_ssRawSwapOut.rrd";
$rra_in = "value";
$rra_out = "value";
$ds_in = "value";
$ds_out = "value";
$multiplier = 512;