librenms-librenms/html/includes/graphs/application/mailscanner_reject.inc.php
Adam Amstrong 378261360c watchguard firebox detection and cpu support
git-svn-id: http://www.observium.org/svn/observer/trunk@2782 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-14 22:04:56 +00:00

37 lines
1.0 KiB
PHP

<?php
include("includes/graphs/common.inc.php");
$scale_min = 0;
$colours = "mixed";
$nototal = (($width < 550) ? 1 : 0);
$unit_text = "Messages/sec";
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mailscannerV2-" . $app['app_id'] . ".rrd";
$array = array(
'msg_rejected' => array('descr' => 'Rejected'),
'msg_relay' => array('descr' => 'Relayed'),
'msg_waiting' => array('descr' => 'Waiting'),
);
$i = 0;
$x = 0;
if (is_file($rrd_filename))
{
$max_colours = count($config['graph_colours'][$colours]);
foreach ($array as $ds => $vars)
{
$x = (($x<=$max_colours) ? $x : 0);
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $vars['descr'];
$rrd_list[$i]['ds'] = $ds;
$rrd_list[$i]['colour'] = $config['graph_colours'][$colours][$x];
$i++;
$x++;
}
}
include("includes/graphs/generic_multi_line.inc.php");
?>