mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
mailscanner improvements
git-svn-id: http://www.observium.org/svn/observer/trunk@2636 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
38
html/includes/graphs/application/mailscanner_reject.inc.php
Normal file
38
html/includes/graphs/application/mailscanner_reject.inc.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$colours = "mixed";
|
||||
$nototal = (($width < 550) ? 1 : 0);
|
||||
$unit_text = "Messages";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mailscanner-" . $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++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_line.inc.php");
|
||||
|
||||
?>
|
27
html/includes/graphs/application/mailscanner_sent.inc.php
Normal file
27
html/includes/graphs/application/mailscanner_sent.inc.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$nototal = 1;
|
||||
|
||||
$ds_in = "msg_recv";
|
||||
$ds_out = "msg_sent";
|
||||
|
||||
$graph_titel .= "::messages";
|
||||
$unit_text = "Messages";
|
||||
|
||||
$colour_line_in = "008800FF";
|
||||
$colour_line_out = "000088FF";
|
||||
$colour_area_in = "CEFFCE66";
|
||||
$colour_area_out = "CECEFF66";
|
||||
$colour_area_in_max = "CC88CC";
|
||||
$colour_area_out_max = "FFEFAA";
|
||||
|
||||
$mailscanner_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mailscanner-" . $app['app_id'] . ".rrd";
|
||||
|
||||
if (is_file($mailscanner_rrd))
|
||||
{
|
||||
$rrd_filename = $mailscanner_rrd;
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
|
||||
?>
|
32
html/includes/graphs/application/mailscanner_spam.inc.php
Normal file
32
html/includes/graphs/application/mailscanner_spam.inc.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$scale_min = 0;
|
||||
$nototal = (($width < 550) ? 1 : 0);
|
||||
$unit_text = "Messages";
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mailscanner-" . $app['app_id'] . ".rrd";
|
||||
$array = array(
|
||||
'spam' => array('descr' => 'Spam', 'colour' => 'FF8800'),
|
||||
'virus' => array('descr' => 'Virus', 'colour' => 'FF0000')
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename))
|
||||
{
|
||||
foreach ($array as $ds => $vars)
|
||||
{
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
$rrd_list[$i]['colour'] = $vars['colour'];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo("file missing: $file");
|
||||
}
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user