mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
move all RRA decisions to config. switch mempool/storage to new rrds (sorry, data lost, the old rrds sucked). added some more apps pages.
git-svn-id: http://www.observium.org/svn/observer/trunk@3068 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -3,18 +3,13 @@
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cipsec_flow.rrd";
|
||||
|
||||
$ds = "Tunnels";
|
||||
|
||||
$colour_area = "9999cc";
|
||||
$colour_line = "0000cc";
|
||||
|
||||
$colour_area_max = "aaaaacc";
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
$unit_text = "Active Tunnels";
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -18,7 +18,7 @@ foreach (dbFetchRows("SELECT * FROM `mempools` where `device_id` = ?", array($id
|
||||
|
||||
$descr = substr(str_pad(short_hrDeviceDescr($mempool['mempool_descr']), 22),0,22);
|
||||
$descr = str_replace(":", "\:", $descr);
|
||||
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempool-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd");
|
||||
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempoolX-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd");
|
||||
|
||||
if (is_file($rrd_filename))
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ foreach (dbFetchRows("SELECT * FROM storage where device_id = ?", array($id)) as
|
||||
|
||||
$descr = substr(str_pad($storage[storage_descr], 12),0,12);
|
||||
$descr = str_replace(":","\:",$descr);
|
||||
$rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("storage-".$storage['storage_mib']."-".$storage['storage_descr'].".rrd");
|
||||
$rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("storageX-".$storage['storage_mib']."-".$storage['storage_descr'].".rrd");
|
||||
$rrd_options .= " DEF:$storage[storage_id]used=$rrd:used:AVERAGE";
|
||||
$rrd_options .= " DEF:$storage[storage_id]free=$rrd:free:AVERAGE";
|
||||
$rrd_options .= " CDEF:$storage[storage_id]size=$storage[storage_id]used,$storage[storage_id]free,+";
|
||||
|
||||
@@ -12,11 +12,14 @@ if ($multiplier)
|
||||
{
|
||||
$rrd_options .= " DEF:".$ds."_o=".$rrd_filename.":".$ds.":AVERAGE";
|
||||
$rrd_options .= " DEF:".$ds."_max_o=".$rrd_filename.":".$ds.":MAX";
|
||||
$rrd_options .= " DEF:".$ds."_min_o=".$rrd_filename.":".$ds.":MIN";
|
||||
$rrd_options .= " CDEF:".$ds."=".$ds."_o,$multiplier,*";
|
||||
$rrd_options .= " CDEF:".$ds."_max=".$ds."_max_o,$multiplier,*";
|
||||
$rrd_options .= " CDEF:".$ds."_min=".$ds."_min_o,$multiplier,*";
|
||||
} else {
|
||||
$rrd_options .= " DEF:".$ds."=".$rrd_filename.":".$ds.":AVERAGE";
|
||||
$rrd_options .= " DEF:".$ds."_max=".$rrd_filename.":".$ds.":MAX";
|
||||
$rrd_options .= " DEF:".$ds."_min=".$rrd_filename.":".$ds.":MIN";
|
||||
}
|
||||
if ($print_total)
|
||||
{
|
||||
@@ -27,10 +30,6 @@ if ($percentile)
|
||||
{
|
||||
$rrd_options .= " VDEF:".$ds."_percentile=".$ds.",".$percentile.",PERCENT";
|
||||
}
|
||||
if ($graph_max)
|
||||
{
|
||||
$rrd_options .= " AREA:".$ds."_max#".$colour_area_max.":";
|
||||
}
|
||||
|
||||
if($_GET['previous'] == "yes")
|
||||
{
|
||||
@@ -62,8 +61,19 @@ if($_GET['previous'] == "yes")
|
||||
# }
|
||||
}
|
||||
|
||||
if($colour_minmax)
|
||||
{
|
||||
$rrd_options .= " AREA:".$ds."_max#c5c5c5";
|
||||
$rrd_options .= " AREA:".$ds."_min#ffffffff";
|
||||
} else {
|
||||
$rrd_options .= " AREA:".$ds."#".$colour_area.":";
|
||||
if ($graph_max)
|
||||
{
|
||||
$rrd_options .= " AREA:".$ds."_max#".$colour_area_max.":";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$rrd_options .= " AREA:".$ds."#".$colour_area.":";
|
||||
$rrd_options .= " COMMENT:'".$unit_text."Now Ave Max";
|
||||
|
||||
if ($percentile)
|
||||
|
||||
@@ -7,7 +7,7 @@ if (is_numeric($id))
|
||||
if (is_numeric($mempool['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($mempool['device_id'])))
|
||||
{
|
||||
$device = device_by_id_cache($mempool['device_id']);
|
||||
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempool-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd");
|
||||
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempoolX-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd");
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: Memory Pool :: " . htmlentities($mempool['mempool_descr']);
|
||||
$auth = TRUE;
|
||||
|
||||
@@ -1,11 +1,32 @@
|
||||
<?php
|
||||
$scale_min = "0";
|
||||
$scale_max = "100";
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$iter = "1";
|
||||
$scale_min = "0";
|
||||
|
||||
$ds = "usage";
|
||||
|
||||
$descr = substr(str_pad(short_hrDeviceDescr($proc['processor_descr']), 28),0,28);
|
||||
$descr = str_replace(":", "\:", $descr);
|
||||
|
||||
$colour_line = "cc0000";
|
||||
$colour_minmax = "c5c5c5";
|
||||
|
||||
$graph_max = 1;
|
||||
$unit_text = "Usage";
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
|
||||
|
||||
|
||||
if($poop)
|
||||
{
|
||||
|
||||
$scale_min = "0";
|
||||
$scale_max = "100";
|
||||
include("includes/graphs/common.inc.php");
|
||||
$iter = "1";
|
||||
$rrd_options .= " COMMENT:' Cur Max\\n'";
|
||||
|
||||
if ($iter=="1") { $colour="CC0000"; } elseif ($iter=="2") { $colour="008C00"; } elseif ($iter=="3") { $colour="4096EE"; }
|
||||
@@ -26,5 +47,5 @@ $rrd_options .= " LINE1:proc" . $proc['hrDeviceIndex'] . "#" . $colour . ":'" .
|
||||
$rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":LAST:%3.0lf%%";
|
||||
$rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":MAX:%3.0lf%%\\\l ";
|
||||
$iter++;
|
||||
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -7,7 +7,7 @@ if (is_numeric($id))
|
||||
if (is_numeric($storage['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($storage['device_id'])))
|
||||
{
|
||||
$device = device_by_id_cache($storage['device_id']);
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("storage-" . $storage['storage_mib'] . "-" . $storage['storage_descr'] . ".rrd");
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("storageX-" . $storage['storage_mib'] . "-" . $storage['storage_descr'] . ".rrd");
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: Storage :: " . htmlentities($storage['storage_descr']);
|
||||
|
||||
@@ -23,14 +23,34 @@ $percentage = round($storage['storage_perc'], 0);
|
||||
|
||||
$background = get_percentage_colours($percentage);
|
||||
|
||||
$rrd_options .= " DEF:$storage[storage_id]used=$rrd_filename:used:AVERAGE";
|
||||
$rrd_options .= " DEF:$storage[storage_id]free=$rrd_filename:free:AVERAGE";
|
||||
$rrd_options .= " CDEF:$storage[storage_id]size=$storage[storage_id]used,$storage[storage_id]free,+";
|
||||
$rrd_options .= " CDEF:$storage[storage_id]perc=$storage[storage_id]used,$storage[storage_id]size,/,100,*";
|
||||
$rrd_options .= " AREA:$storage[storage_id]perc#" . $background['right'] . ":";
|
||||
$rrd_options .= " LINE1.25:$storage[storage_id]perc#" . $background['left'] . ":'$descr'";
|
||||
$rrd_options .= " GPRINT:$storage[storage_id]size:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:$storage[storage_id]free:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:$storage[storage_id]perc:LAST:%5.2lf%%\\\\n";
|
||||
$rrd_options .= " DEF:used=$rrd_filename:used:AVERAGE";
|
||||
$rrd_options .= " DEF:free=$rrd_filename:free:AVERAGE";
|
||||
$rrd_options .= " CDEF:size=used,free,+";
|
||||
$rrd_options .= " CDEF:perc=used,size,/,100,*";
|
||||
$rrd_options .= " AREA:perc#" . $background['right'] . ":";
|
||||
$rrd_options .= " LINE1.25:perc#" . $background['left'] . ":'$descr'";
|
||||
$rrd_options .= " GPRINT:size:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:free:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:perc:LAST:%5.2lf%%\\\\n";
|
||||
|
||||
if($_GET['previous'])
|
||||
{
|
||||
$descr = substr(str_pad("Prev ".$storage[storage_descr], 12),0,12);
|
||||
$descr = str_replace(":","\:",$descr);
|
||||
|
||||
$colour="99999999";
|
||||
$colour_area="66666666";
|
||||
|
||||
$rrd_options .= " DEF:usedX=$rrd_filename:used:AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " DEF:freeX=$rrd_filename:free:AVERAGE:start=".$prev_from.":end=".$from;
|
||||
$rrd_options .= " SHIFT:usedX:$period";
|
||||
$rrd_options .= " SHIFT:freeX:$period";
|
||||
$rrd_options .= " CDEF:sizeX=usedX,freeX,+";
|
||||
$rrd_options .= " CDEF:percX=usedX,sizeX,/,100,*";
|
||||
$rrd_options .= " AREA:percX#" . $colour_area . ":";
|
||||
$rrd_options .= " LINE1.25:percX#" . $colour . ":'$descr'";
|
||||
$rrd_options .= " GPRINT:sizeX:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:freeX:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:percX:LAST:%5.2lf%%\\\\n";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -402,11 +402,11 @@ if ($_SESSION['userlevel'] >= '5' && ($app_count) > "0")
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
$rows = dbFetchRows("SELECT `app_type` FROM `applications` GROUP BY `app_type` ORDER BY `app_type`");
|
||||
foreach ($rows as $row)
|
||||
$app_list = dbFetchRows("SELECT `app_type` FROM `applications` GROUP BY `app_type` ORDER BY `app_type`");
|
||||
foreach ($app_list as $app)
|
||||
{
|
||||
echo('
|
||||
<li><a href="applications/app='.$row['app_type'].'/"><img src="images/icons/'.$row['app_type'].'.png" border="0" align="absmiddle" /> '.$row['app_type'].' </a></li>');
|
||||
<li><a href="applications/app='.$app['app_type'].'/"><img src="images/icons/'.$app['app_type'].'.png" border="0" align="absmiddle" /> '.$app['app_type'].' </a></li>');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
echo("<span style='font-weight: bold;'>Apps</span> » ");
|
||||
|
||||
unset($sep);
|
||||
|
||||
$link_array = array('page' => 'device',
|
||||
'device' => $device['device_id'],
|
||||
'tab' => 'apps');
|
||||
|
||||
foreach ($app_list as $app)
|
||||
{
|
||||
echo($sep);
|
||||
|
||||
# if (!$vars['app']) { $vars['app'] = $app['app_type']; }
|
||||
|
||||
if ($vars['app'] == $app['app_type'])
|
||||
{
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
#echo('<img src="images/icons/'.$app['app_type'].'.png" class="optionicon" />');
|
||||
} else {
|
||||
#echo('<img src="images/icons/greyscale/'.$app['app_type'].'.png" class="optionicon" />');
|
||||
}
|
||||
echo(generate_link(ucfirst($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])));
|
||||
if ($vars['app'] == $app['app_type']) { echo("</span>"); }
|
||||
$sep = " | ";
|
||||
}
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
if($vars['app'])
|
||||
{
|
||||
if (is_file("pages/apps/".mres($vars['app']).".inc.php"))
|
||||
{
|
||||
include("pages/apps/".mres($vars['app']).".inc.php");
|
||||
} else {
|
||||
include("pages/apps/default.inc.php");
|
||||
}
|
||||
} else {
|
||||
include("pages/apps/overview.inc.php");
|
||||
}
|
||||
|
||||
$pagetitle[] = "Apps";
|
||||
?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
$graphs['apache'] = array('bits', 'hits', 'scoreboard', 'cpu');
|
||||
$graphs['drbd'] = array('disk_bits', 'network_bits', 'queue', 'unsynced');
|
||||
$graphs['mysql'] = array('network_traffic', 'connections', 'command_counters', 'select_types');
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "220";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['from'] = $config['time']['day'];
|
||||
$graph_array_zoom = $graph_array;
|
||||
$graph_array_zoom['height'] = "150";
|
||||
$graph_array_zoom['width'] = "400";
|
||||
$graph_array['legend'] = "no";
|
||||
|
||||
|
||||
echo('<h2>'.$vars['app'].'</h2>');
|
||||
echo('<table cellpadding=5 cellspacing=0 class=devicetable width=100%>');
|
||||
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app']));
|
||||
foreach($app_devices as $app_device)
|
||||
{
|
||||
echo('<tr class="list-device">');
|
||||
echo('<td class="device-head" width=300px>'.generate_device_link($device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).'</td>');
|
||||
echo('<td class="device-head" width=100px>'.$app_device['app_instance'].'</td>');
|
||||
echo('<td class="device-head" width=100px>'.$app_device['app_status'].'</td>');
|
||||
echo('<td></td>');
|
||||
echo('</tr>');
|
||||
echo('<tr class="list-device">');
|
||||
echo('<td colspan=4>');
|
||||
|
||||
foreach($graphs[$vars['app']] as $graph_type)
|
||||
{
|
||||
$graph_array['type'] = "application_".$vars['app']."_".$graph_type;
|
||||
$graph_array['id'] = $app_device['app_id'];
|
||||
$graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type;
|
||||
$graph_array_zoom['id'] = $app_device['app_id'];
|
||||
|
||||
$link_array = $graph_array;
|
||||
$link_array['page'] = "graphs";
|
||||
unset($link_array['height'], $link_array['width']);
|
||||
$link = generate_url($link_array);
|
||||
|
||||
echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
echo('</td>');
|
||||
echo('</tr>');
|
||||
}
|
||||
echo('</table>');
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
$graphs['apache'] = array('bits', 'hits', 'scoreboard', 'cpu');
|
||||
$graphs['drbd'] = array('disk_bits', 'network_bits', 'queue', 'unsynced');
|
||||
$graphs['mysql'] = array('network_traffic', 'connections', 'command_counters', 'select_types');
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "218";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['from'] = $config['time']['day'];
|
||||
$graph_array_zoom = $graph_array;
|
||||
$graph_array_zoom['height'] = "150";
|
||||
$graph_array_zoom['width'] = "400";
|
||||
$graph_array['legend'] = "no";
|
||||
|
||||
|
||||
|
||||
foreach($app_list as $app)
|
||||
{
|
||||
echo('<div style="clear: both;">');
|
||||
echo('<h2>'.generate_link(ucfirst($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])).'</h2>');
|
||||
$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($app['app_type']));
|
||||
foreach($app_devices as $app_device)
|
||||
{
|
||||
|
||||
$graph_type = $graphs[$app['app_type']][0];
|
||||
|
||||
$graph_array['type'] = "application_".$app['app_type']."_".$graph_type;
|
||||
$graph_array['id'] = $app_device['app_id'];
|
||||
$graph_array_zoom['type'] = "application_".$app['app_type']."_".$graph_type;
|
||||
$graph_array_zoom['id'] = $app_device['app_id'];
|
||||
|
||||
$link_array = $graph_array;
|
||||
$link_array['page'] = "device";
|
||||
$link_array['device'] = $app_device['device_id'];
|
||||
$link_array['tab'] = "apps";
|
||||
$link_array['app'] = $app['app_type'];
|
||||
unset($link_array['height'], $link_array['width']);
|
||||
$link = generate_url($link_array);
|
||||
|
||||
$overlib_link = generate_device_link($device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$app['app_type']))."<br/>";
|
||||
$overlib_link .= generate_graph_tag($graph_array);
|
||||
$overlib_content = generate_overlib_content($graph_array, $port['hostname'] . " - " . $port['label']);
|
||||
|
||||
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: ".$width_div."px; max-width:".$width_div."px; min-height:180px; max-height:180px;
|
||||
text-align: center; float: left; background-color: #f5f5f5;'>");
|
||||
echo(overlib_link($link, $overlib_link, $overlib_content));
|
||||
echo("</div>");
|
||||
}
|
||||
echo('</div>');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -113,6 +113,13 @@ $config['ports_page_default'] = "details"; ## eg "details" or "basic"
|
||||
$config['snmp']['community'][0] = "public"; # Communities to try during adding hosts and discovery
|
||||
$config['snmp']['transports'] = array('udp', 'udp6', 'tcp', 'tcp6');
|
||||
|
||||
### RRD Settings
|
||||
|
||||
$config['rrd_rra'] = " RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 ";
|
||||
$config['rrd_rra'] .= " RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 ";
|
||||
$config['rrd_rra'] .= " RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 ";
|
||||
$config['rrd_rra'] .= " RRA:LAST:0.5:1:1440 ";
|
||||
|
||||
### Autodiscovery Settings
|
||||
|
||||
$config['autodiscovery']['xdp'] = TRUE; ## Autodiscover hosts via discovery protocols
|
||||
|
||||
@@ -11,11 +11,10 @@ if ($device['os'] == "asa" || $device['os'] == "pix")
|
||||
|
||||
$rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("altiga-ssl.rrd");
|
||||
|
||||
$rrd_create = " RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600";
|
||||
$rrd_create .= " RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create .= " DS:TotalSessions:COUNTER:600:U:100000 DS:ActiveSessions:GAUGE:600:0:U DS:MaxSessions:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:PreDecryptOctets:COUNTER:600:U:100000000000 DS:PostDecryptOctets:COUNTER:600:U:100000000000 DS:PreEncryptOctets:COUNTER:600:U:100000000000";
|
||||
$rrd_create .= " DS:PostEncryptOctets:COUNTER:600:U:100000000000";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
if (!file_exists($rrdfile))
|
||||
{
|
||||
@@ -45,4 +44,4 @@ if ($device['os'] == "asa" || $device['os'] == "pix")
|
||||
unset($rrdfile, $rrdupdate, $data_array);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -41,19 +41,7 @@ if (!is_file($rrd_filename))
|
||||
DS:sb_logging:GAUGE:600:0:125000000000 \
|
||||
DS:sb_graceful:GAUGE:600:0:125000000000 \
|
||||
DS:sb_idle:GAUGE:600:0:125000000000 \
|
||||
DS:sb_open:GAUGE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:sb_open:GAUGE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:$total_access:$total_kbyte:$cpuload:$uptime:$reqpersec:$bytespersec:$bytesperreq:$busyworkers:$idleworkers:$score_wait:$score_start:$score_reading:$score_writing:$score_keepalive:$score_dns:$score_closing:$score_logging:$score_graceful:$score_idle:$score_open");
|
||||
|
||||
@@ -27,19 +27,7 @@ $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-drbd-".$
|
||||
DS:pe:GAUGE:600:0:125000000000 \
|
||||
DS:ua:GAUGE:600:0:125000000000 \
|
||||
DS:ap:GAUGE:600:0:125000000000 \
|
||||
DS:oos:GAUGE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:3:600 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:oos:GAUGE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:".$drbd['ns'].":".$drbd['nr'].":".$drbd['dw'].":".$drbd['dr'].":".$drbd['al'].":".$drbd['bm'].":".$drbd['lo'].":".$drbd['pe'].":".$drbd['ua'].":".$drbd['ap'].":".$drbd['oop']);
|
||||
|
||||
@@ -21,19 +21,7 @@ if (!is_file($rrd_filename))
|
||||
DS:msg_sent:COUNTER:600:0:125000000000 \
|
||||
DS:msg_waiting:COUNTER:600:0:125000000000 \
|
||||
DS:spam:COUNTER:600:0:125000000000 \
|
||||
DS:virus:COUNTER:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:virus:COUNTER:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:$msg_recv:$msg_rejected:$msg_relay:$msg_sent:$msg_waiting:$spam:$virus");
|
||||
|
||||
@@ -199,19 +199,7 @@ if (!is_file($mysql_rrd))
|
||||
DS:CRSt:DERIVE:600:0:125000000000 \
|
||||
DS:CSt:DERIVE:600:0:125000000000 \
|
||||
DS:CUe:DERIVE:600:0:125000000000 \
|
||||
DS:CUMi:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:3:600 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:CUMi:DERIVE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($mysql_rrd, "N:$string");
|
||||
|
||||
@@ -17,19 +17,7 @@ if (!is_file($nginx_rrd)) {
|
||||
DS:Active:GAUGE:600:0:125000000000 \
|
||||
DS:Reading:GAUGE:600:0:125000000000 \
|
||||
DS:Writing:GAUGE:600:0:125000000000 \
|
||||
DS:Waiting:GAUGE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:3:600 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:Waiting:GAUGE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
print "active: $active reading: $reading writing: $writing waiting: $waiting Requests: $req";
|
||||
rrdtool_update($nginx_rrd, "N:$req:$active:$reading:$writing:$waiting");
|
||||
|
||||
@@ -19,19 +19,7 @@ if (!is_file($rrd_filename))
|
||||
DS:frequency:GAUGE:600:-1000:1000 \
|
||||
DS:jitter:GAUGE:600:-1000:1000 \
|
||||
DS:noise:GAUGE:600:-1000:1000 \
|
||||
DS:stability:GAUGE:600:-1000:1000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:stability:GAUGE:600:-1000:1000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:$offset:$frequency:$jitter:$noise:$stability");
|
||||
|
||||
@@ -28,19 +28,7 @@ if (!is_file($rrd_filename))
|
||||
DS:packets_drop:DERIVE:600:0:125000000000 \
|
||||
DS:packets_ignore:DERIVE:600:0:125000000000 \
|
||||
DS:packets_recv:DERIVE:600:0:125000000000 \
|
||||
DS:packets_sent:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:packets_sent:DERIVE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:$stratum:$offset:$frequency:$jitter:$noise:$stability:$uptime:$buffer_recv:$buffer_free:$buffer_used:$packets_drop:$packets_ignore:$packets_recv:$packets_sent");
|
||||
|
||||
@@ -38,19 +38,7 @@ if (!is_file($rrd_filename))
|
||||
DS:q_udp4Answers:DERIVE:600:0:125000000000 \
|
||||
DS:q_udp4Queries:DERIVE:600:0:125000000000 \
|
||||
DS:q_udp6Answers:DERIVE:600:0:125000000000 \
|
||||
DS:q_udp6Queries:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:q_udp6Queries:DERIVE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_filename, "N:$corrupt:$def_cacheInserts:$def_cacheLookup:$latency:$pc_hit:$pc_miss:$pc_size:$qsize:$qc_hit:$qc_miss:$rec_answers:$rec_questions:$servfail:$tcp_answers:$tcp_queries:$timedout:$udp_answers:$udp_queries:$udp4_answers:$udp4_queries:$udp6_answers:$udp6_queries");
|
||||
|
||||
@@ -39,19 +39,7 @@ foreach ($servers as $item=>$server)
|
||||
DS:status:GAUGE:600:0:125000000000 \
|
||||
DS:peak:GAUGE:600:0:125000000000 \
|
||||
DS:max:GAUGE:600:0:125000000000 \
|
||||
DS:unique:GAUGE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:unique:GAUGE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrdfile, "N:$bitrate:$traf_in:$traf_out:$current:$status:$peak:$max:$unique");
|
||||
|
||||
@@ -108,15 +108,7 @@ if ($config['enable_bgp'])
|
||||
DS:bgpPeerInUpdates:COUNTER:600:U:100000000000 \
|
||||
DS:bgpPeerOutTotal:COUNTER:600:U:100000000000 \
|
||||
DS:bgpPeerInTotal:COUNTER:600:U:100000000000 \
|
||||
DS:bgpPeerEstablished:GAUGE:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797";
|
||||
DS:bgpPeerEstablished:GAUGE:600:0:U " . $config['rrd_rra'];
|
||||
|
||||
rrdtool_create($peerrrd, $create_rrd);
|
||||
}
|
||||
@@ -223,15 +215,7 @@ if ($config['enable_bgp'])
|
||||
DS:DeniedPrefixes:GAUGE:600:U:100000000000 \
|
||||
DS:AdvertisedPrefixes:GAUGE:600:U:100000000000 \
|
||||
DS:SuppressedPrefixes:GAUGE:600:U:100000000000 \
|
||||
DS:WithdrawnPrefixes:GAUGE:600:U:100000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797";
|
||||
DS:WithdrawnPrefixes:GAUGE:600:U:100000000000 ".$config['rrd_rra'];
|
||||
rrdtool_create($cbgp_rrd, $rrd_create);
|
||||
}
|
||||
rrdtool_update("$cbgp_rrd", "N:$cbgpPeerAcceptedPrefixes:$cbgpPeerDeniedPrefixes:$cbgpPeerAdvertisedPrefixes:$cbgpPeerSuppressedPrefixes:$cbgpPeerWithdrawnPrefixes");
|
||||
|
||||
@@ -64,8 +64,7 @@ foreach ($ipsec_array as $index => $tunnel)
|
||||
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/ipsectunnel-".$address.".rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -29,9 +29,6 @@ foreach ($rserver_array as $index => $serverfarm)
|
||||
}
|
||||
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/rserver-".$serverfarms[$clean_index]['rserver_id'].".rrd";
|
||||
#echo $rrd_file."-\n";
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
@@ -52,6 +49,8 @@ foreach ($rserver_array as $index => $serverfarm)
|
||||
$rrdupdate .= ":$value";
|
||||
}
|
||||
|
||||
$rrd_create .= " ".$config['rrd_rra'];
|
||||
|
||||
if (isset($serverfarms[$clean_index]))
|
||||
{
|
||||
if (!file_exists($rrd_file)) { rrdtool_create($rrd_file, $rrd_create); }
|
||||
|
||||
@@ -34,8 +34,7 @@ foreach ($serverfarm_array as $index => $vserver)
|
||||
}
|
||||
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/vserver-".$classmap_id.".rrd";
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -60,11 +60,7 @@ if ($device['os_group'] == "cisco")
|
||||
rrdtool_create($filename, "--step 300 \
|
||||
DS:drop:DERIVE:600:0:1000000 \
|
||||
DS:punt:DERIVE:600:0:1000000 \
|
||||
DS:hostpunt:DERIVE:600:0:1000000 \
|
||||
RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 \
|
||||
RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797");
|
||||
DS:hostpunt:DERIVE:600:0:1000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
### Copy HC to non-HC if they exist
|
||||
|
||||
@@ -65,19 +65,7 @@ if ($device['os_group'] == "cisco")
|
||||
$rrd_create .= " DS:ProtocolUseFails:COUNTER:600:0:100000000000";
|
||||
$rrd_create .= " DS:NoSaFails:COUNTER:600:0:100000000000";
|
||||
$rrd_create .= " DS:SysCapFails:COUNTER:600:0:100000000000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:1200";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:6:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:24:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:1:1200";
|
||||
$rrd_create .= " RRA:MAX:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:1:1200";
|
||||
$rrd_create .= " RRA:MIN:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:288:2000";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
if (is_file($rrd_filename) || $data['cipSecGlobalActiveTunnels'])
|
||||
{
|
||||
|
||||
@@ -72,15 +72,7 @@ if ($device['os_group'] == "cisco")
|
||||
rrdtool_create($rrdfile,"DS:IN:COUNTER:600:0:12500000000 \
|
||||
DS:OUT:COUNTER:600:0:12500000000 \
|
||||
DS:PIN:COUNTER:600:0:12500000000 \
|
||||
DS:POUT:COUNTER:600:0:12500000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:POUT:COUNTER:600:0:12500000000 " . $config['rrd_rra']);
|
||||
}
|
||||
$woo = "N:".($b_in+0).":".($b_out+0).":".($p_in+0).":".($p_out+0);
|
||||
$ret = rrdtool_update("$rrdfile", $woo);
|
||||
|
||||
@@ -39,27 +39,13 @@ if ($device['os_group'] == "cisco")
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("cras_sessions.rrd");
|
||||
|
||||
$rrd_create = " RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797";
|
||||
$rrd_create .= " RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create .= " DS:email:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:ipsec:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:l2l:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:lb:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:svc:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:webvpn:GAUGE:600:0:U";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:1200";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:6:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:24:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:1:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:1:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:288:2000";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
if (is_file($rrd_filename) || $data['crasEmailNumSessions'] || $data['crasIPSecNumSessions'] || $data['crasL2LNumSessions'] || $data['crasLBNumSessions'] || $data['crasSVCNumSessions'] || $data['crasWebvpnSessions'])
|
||||
{
|
||||
|
||||
@@ -41,11 +41,7 @@ foreach (dbFetchRows("SELECT * FROM `slas` WHERE `device_id` = ? AND `deleted` =
|
||||
if (!is_file($slarrd))
|
||||
{
|
||||
rrdtool_create($slarrd, "--step 300 \
|
||||
DS:rtt:GAUGE:600:0:300000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:rtt:GAUGE:600:0:300000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
if (isset($sla_table[$sla['sla_nr']]))
|
||||
|
||||
@@ -19,19 +19,7 @@ if ($device['os_group'] == "cisco")
|
||||
$rrd_create = " DS:tunnels:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:sessions:GAUGE:600:0:U";
|
||||
$rrd_create .= " DS:denied:COUNTER:600:0:100000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:1200";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:6:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:24:2000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:1:1200";
|
||||
$rrd_create .= " RRA:MAX:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MAX:0.5:288:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:1:1200";
|
||||
$rrd_create .= " RRA:MIN:0.5:6:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:24:2000";
|
||||
$rrd_create .= " RRA:MIN:0.5:288:2000";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
if (is_file($rrd_filename) || $vpdn['cvpdnSystemTunnelTotal'] || $vpdn['cvpdnSystemSessionTotal'])
|
||||
{
|
||||
|
||||
@@ -47,19 +47,7 @@ if($device['os'] == "ios")
|
||||
DS:oututil:GAUGE:600:0:100 \
|
||||
DS:outdropped:DERIVE:600:0:125000000000 \
|
||||
DS:outerrors:DERIVE:600:0:125000000000 \
|
||||
DS:inerrors:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:inerrors:DERIVE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd,"N:$chan_update");
|
||||
|
||||
@@ -49,14 +49,7 @@ function poll_sensor($device, $class, $unit)
|
||||
if (!is_file($rrd_file))
|
||||
{
|
||||
rrdtool_create($rrd_file,"--step 300 \
|
||||
DS:sensor:GAUGE:600:-20000:20000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:AVERAGE:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:288:1200 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:MAX:0.5:288:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MIN:0.5:288:1200");
|
||||
DS:sensor:GAUGE:600:-20000:20000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
echo("$sensor_value $unit\n");
|
||||
|
||||
@@ -14,15 +14,7 @@ if (is_numeric($hrSystem[0]['hrSystemProcesses']))
|
||||
if (!is_file($rrd_file))
|
||||
{
|
||||
rrdtool_create($rrd_file,"--step 300 \
|
||||
DS:procs:GAUGE:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800");
|
||||
DS:procs:GAUGE:600:0:U ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_file, "N:".$hrSystem[0]['hrSystemProcesses']);
|
||||
@@ -36,15 +28,7 @@ if (is_numeric($hrSystem[0]['hrSystemNumUsers']))
|
||||
if (!is_file($rrd_file))
|
||||
{
|
||||
rrdtool_create($rrd_file, "--step 300 \
|
||||
DS:users:GAUGE:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800");
|
||||
DS:users:GAUGE:600:0:U ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd_file, "N:".$hrSystem[0]['hrSystemNumUsers']);
|
||||
@@ -54,4 +38,4 @@ if (is_numeric($hrSystem[0]['hrSystemNumUsers']))
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -72,7 +72,7 @@ if ($ipSystemStats)
|
||||
|
||||
$rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("ipSystemStats-".$af.".rrd");
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
$rrdupdate = "N";
|
||||
|
||||
foreach ($oids as $oid)
|
||||
@@ -98,4 +98,4 @@ if ($ipSystemStats)
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -45,19 +45,7 @@ if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
|
||||
if (!is_file($rrd_file))
|
||||
{
|
||||
rrdtool_create($rrd_file,"--step 300 \
|
||||
DS:sensor:GAUGE:600:-20000:20000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797\
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797");
|
||||
DS:sensor:GAUGE:600:-20000:20000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
echo($sensor . " $unit\n");
|
||||
|
||||
@@ -46,18 +46,7 @@ if (count($vp_rows))
|
||||
DS:outpacketoctets:DERIVE:600:0:125000000000 \
|
||||
DS:inpacketerrors:DERIVE:600:0:125000000000 \
|
||||
DS:outpacketerrors:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd,"N:$vp_update");
|
||||
|
||||
@@ -4,26 +4,7 @@ foreach (dbFetchRows("SELECT * FROM mempools WHERE device_id = ?", array($device
|
||||
{
|
||||
echo("Mempool ". $mempool['mempool_descr'] . ": ");
|
||||
|
||||
$mempoolrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("mempool-" . $mempool['mempool_type'] . "-" . $mempool['mempool_index'] . ".rrd");
|
||||
|
||||
if (!is_file($mempoolrrd))
|
||||
{
|
||||
rrdtool_create($mempoolrrd, "--step 300 \
|
||||
DS:used:GAUGE:600:-273:100000000000 \
|
||||
DS:free:GAUGE:600:-273:100000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
}
|
||||
$mempool_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("mempoolX-" . $mempool['mempool_type'] . "-" . $mempool['mempool_index'] . ".rrd");
|
||||
|
||||
$file = $config['install_dir']."/includes/polling/mempools/".$mempool['mempool_type'].".inc.php";
|
||||
if (is_file($file))
|
||||
@@ -44,7 +25,11 @@ foreach (dbFetchRows("SELECT * FROM mempools WHERE device_id = ?", array($device
|
||||
|
||||
echo($percent."% ");
|
||||
|
||||
rrdtool_update($mempoolrrd,"N:".$mempool['used'].":".$mempool['free']);
|
||||
if (!is_file($mempool_rrd))
|
||||
{
|
||||
rrdtool_create($mempool_rrd, "--step 300 DS:used:GAUGE:600:0:U DS:free:GAUGE:600:0:U DS:size:GAUGE:600:0:U DS:perc:GAUGE:600:0:100 ".$config['rrd_rra']);
|
||||
}
|
||||
rrdtool_update($mempool_rrd,"N:".$mempool['used'].":".$mempool['free'].":".$mempool['total'].":".$percent);
|
||||
|
||||
dbUpdate(array('mempool_used' => $mempool['used'], 'mempool_perc' => $percent, 'mempool_free' => $mempool['free'],
|
||||
'mempool_total' => $mempool['total'], 'mempool_largestfree' => $mempool['largestfree'], 'mempool_lowestfree' => $mempool['lowestfree']),
|
||||
|
||||
@@ -28,8 +28,7 @@ if ($device['os'] == "netscaler")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/netscaler-stats-tcp.rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids_gauge as $oid)
|
||||
{
|
||||
|
||||
@@ -44,8 +44,7 @@ if ($device['os'] == "netscaler")
|
||||
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids_gauge as $oid)
|
||||
{
|
||||
|
||||
@@ -15,8 +15,7 @@ if ($device['os'] != "Snom")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-icmp.rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -13,8 +13,7 @@ if ($device['os'] != "Snom")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-ip.rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,7 @@ if ($device['os'] != "Snom")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("netstats-snmp.rrd");
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,7 @@ if ($device['os'] != "Snom")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-tcp.rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -12,8 +12,7 @@ if ($device['os'] != "Snom")
|
||||
unset($snmpstring, $rrdupdate, $snmpdata, $snmpdata_cmd, $rrd_create);
|
||||
$rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-udp.rrd";
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
|
||||
@@ -23,9 +23,7 @@ if (is_numeric($sessions))
|
||||
{
|
||||
if (!is_file($sessrrd))
|
||||
{
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 \
|
||||
RRA:AVERAGE:0.5:1:800 RRA:AVERAGE:0.5:6:800 RRA:AVERAGE:0.5:24:800 RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 RRA:MAX:0.5:6:800 RRA:MAX:0.5:24:800 RRA:MAX:0.5:288:800");
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 ".$config['rrd_rra']);
|
||||
}
|
||||
print "Sessions: $sessions\n";
|
||||
rrdtool_update($sessrrd,"N:".$sessions);
|
||||
@@ -39,18 +37,7 @@ if (is_numeric($cpu_usage))
|
||||
{
|
||||
if (!is_file($cpurrd))
|
||||
{
|
||||
rrdtool_create($cpurrd," --step 300 DS:LOAD:GAUGE:600:-1:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:1:2000 \
|
||||
RRA:AVERAGE:0.5:6:2000 \
|
||||
RRA:AVERAGE:0.5:24:2000 \
|
||||
RRA:AVERAGE:0.5:288:2000 \
|
||||
RRA:MAX:0.5:1:2000 \
|
||||
RRA:MAX:0.5:6:2000 \
|
||||
RRA:MAX:0.5:24:2000 \
|
||||
RRA:MAX:0.5:288:2000 \
|
||||
RRA:MIN:0.5:1:2000 \
|
||||
RRA:MIN:0.5:6:2000 \
|
||||
RRA:MIN:0.5:24:2000 \
|
||||
RRA:MIN:0.5:288:2000");
|
||||
rrdtool_create($cpurrd," --step 300 DS:LOAD:GAUGE:600:-1:100 ".$config['rrd_rra']);
|
||||
}
|
||||
echo("CPU: $cpu_usage%\n");
|
||||
rrdtool_update($cpurrd, " N:$cpu_usage");
|
||||
|
||||
@@ -13,10 +13,7 @@ if (is_numeric($sessions))
|
||||
{
|
||||
if (!is_file($sessrrd))
|
||||
{
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 \
|
||||
RRA:AVERAGE:0.5:1:800 RRA:AVERAGE:0.5:6:800 RRA:AVERAGE:0.5:24:800 RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 RRA:MAX:0.5:6:800 RRA:MAX:0.5:24:800 RRA:MAX:0.5:288:800");
|
||||
}
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 ".$config['rrd_rra']); }
|
||||
rrdtool_update($sessrrd,"N:$sessions");
|
||||
$graphs['panos_sessions'] = TRUE;
|
||||
}
|
||||
|
||||
@@ -31,21 +31,7 @@ if (is_numeric($FdbAddressCount))
|
||||
if (!is_file($fdb_rrd_file))
|
||||
{
|
||||
rrdtool_create($fdb_rrd_file, " --step 300 \
|
||||
DS:value:GAUGE:600:-1:100000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:AVERAGE:0.5:1:2000 \
|
||||
RRA:AVERAGE:0.5:6:2000 \
|
||||
RRA:AVERAGE:0.5:24:2000 \
|
||||
RRA:AVERAGE:0.5:288:2000 \
|
||||
RRA:MAX:0.5:1:2000 \
|
||||
RRA:MAX:0.5:6:2000 \
|
||||
RRA:MAX:0.5:24:2000 \
|
||||
RRA:MAX:0.5:288:2000 \
|
||||
RRA:MIN:0.5:1:2000 \
|
||||
RRA:MIN:0.5:6:2000 \
|
||||
RRA:MIN:0.5:24:2000 \
|
||||
RRA:MIN:0.5:288:2000");
|
||||
}
|
||||
DS:value:GAUGE:600:-1:100000 ".$config['rrd_rra']); }
|
||||
|
||||
rrdtool_update($fdb_rrd_file, "N:$FdbAddressCount");
|
||||
|
||||
@@ -54,4 +40,4 @@ if (is_numeric($FdbAddressCount))
|
||||
echo("FDB Count ");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -14,23 +14,11 @@ if (!is_file($sessrrd))
|
||||
rrdtool_create($sessrrd, " --step 300 \
|
||||
DS:allocate:GAUGE:600:0:3000000 \
|
||||
DS:max:GAUGE:600:0:3000000 \
|
||||
DS:failed:GAUGE:600:0:1000 \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MIN:0.5:1:800 \
|
||||
RRA:MIN:0.5:6:800 \
|
||||
RRA:MIN:0.5:24:800 \
|
||||
RRA:MIN:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800");
|
||||
DS:failed:GAUGE:600:0:1000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update("$sessrrd", "N:$sessalloc:$sessmax:$sessfailed");
|
||||
|
||||
$graphs['screenos_sessions'] = TRUE;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -34,18 +34,10 @@ if (!is_file($rrdfile))
|
||||
DS:INPKTS:COUNTER:600:U:10000000000 \
|
||||
DS:OUTPKTS:COUNTER:600:U:10000000000 \
|
||||
DS:CALLS:COUNTER:600:U:10000000000 \
|
||||
DS:REGISTRATIONS:COUNTER:600:U:10000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:REGISTRATIONS:COUNTER:600:U:10000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$rrdupdate = "N:$rxbytes:$txbytes:$rxpkts:$rxbytes:$calls:$registrations";
|
||||
rrdtool_update("$rrdfile", $rrdupdate);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -328,12 +328,8 @@ if (!is_file($filename))
|
||||
DS:instances:GAUGE:600:0:1000000 \
|
||||
DS:areas:GAUGE:600:0:1000000 \
|
||||
DS:ports:GAUGE:600:0:1000000 \
|
||||
DS:neighbours:GAUGE:600:0:1000000 \
|
||||
RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 \
|
||||
RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797");
|
||||
}
|
||||
DS:neighbours:GAUGE:600:0:1000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$rrd_update = "N:".$ospf_instance_count.":".$ospf_area_count.":".$ospf_port_count.":".$ospf_neighbour_count;
|
||||
$ret = rrdtool_update("$filename", $rrd_update);
|
||||
|
||||
@@ -71,9 +71,7 @@ if (isset($port_stats[$port['ifIndex']]['adslLineCoding']))
|
||||
$rrd_create .= " DS:AtucChanUncorrectBl:COUNTER:600:U:100000000000";
|
||||
$rrd_create .= " DS:AturChanCorrectedBl:COUNTER:600:U:100000000000";
|
||||
$rrd_create .= " DS:AturChanUncorrectBl:COUNTER:600:U:100000000000";
|
||||
$rrd_create .= " RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797";
|
||||
$rrd_create .= " RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 ";
|
||||
$rrd_create .= " RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 ";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
$adsl_oids = array('AtucCurrSnrMgn','AtucCurrAtn','AtucCurrOutputPwr','AtucCurrAttainableRate','AtucChanCurrTxRate','AturCurrSnrMgn','AturCurrAtn','AturCurrOutputPwr','AturCurrAttainableRate','AturChanCurrTxRate','AtucPerfLofs','AtucPerfLoss','AtucPerfLprs','AtucPerfESs','AtucPerfInits','AturPerfLofs','AturPerfLoss','AturPerfLprs','AturPerfESs','AtucChanCorrectedBlks','AtucChanUncorrectBlks','AturChanCorrectedBlks','AturChanUncorrectBlks');
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ if ($port_stats[$port['ifIndex']] && $port['ifType'] == "ethernetCsmacd"
|
||||
$old_rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("etherlike-".$port['ifIndex'].".rrd");
|
||||
$rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("port-".$port['ifIndex']."-dot3.rrd");
|
||||
|
||||
$rrd_create = "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create = $config['rrd_rra'];
|
||||
|
||||
if (!file_exists($rrdfile))
|
||||
{
|
||||
|
||||
@@ -22,8 +22,7 @@ if ($port_stats[$port['ifIndex']] && $port['ifType'] == "ethernetCsmacd"
|
||||
|
||||
if (!file_exists($rrdfile))
|
||||
{
|
||||
$rrd_create .= "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
|
||||
$rrd_create .= $config['rrd_rra'];
|
||||
|
||||
# FIXME CISCOSPECIFIC
|
||||
$rrd_create .= " DS:PortPwrAllocated:GAUGE:600:0:U";
|
||||
@@ -40,4 +39,4 @@ if ($port_stats[$port['ifIndex']] && $port['ifType'] == "ethernetCsmacd"
|
||||
echo("PoE ");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -366,15 +366,7 @@ foreach ($ports as $port)
|
||||
DS:INBROADCASTPKTS:DERIVE:600:0:12500000000 \
|
||||
DS:OUTBROADCASTPKTS:DERIVE:600:0:12500000000 \
|
||||
DS:INMULTICASTPKTS:DERIVE:600:0:12500000000 \
|
||||
DS:OUTMULTICASTPKTS:DERIVE:600:0:12500000000 \
|
||||
RRA:AVERAGE:0.5:1:2400 \
|
||||
RRA:AVERAGE:0.5:6:1200 \
|
||||
RRA:AVERAGE:0.5:24:1200 \
|
||||
RRA:AVERAGE:0.5:288:1200 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:OUTMULTICASTPKTS:DERIVE:600:0:12500000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
foreach ($stat_oids as $oid)
|
||||
|
||||
@@ -17,11 +17,7 @@ foreach (dbFetchRows("SELECT * FROM processors WHERE device_id = ?", array($devi
|
||||
if (!is_file($procrrd))
|
||||
{
|
||||
rrdtool_create($procrrd, "--step 300 \
|
||||
DS:usage:GAUGE:600:-273:1000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:usage:GAUGE:600:-273:1000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$proc = trim(str_replace("\"", "", $proc));
|
||||
|
||||
@@ -6,25 +6,11 @@ foreach (dbFetchRows("SELECT * FROM storage WHERE device_id = ?", array($device[
|
||||
{
|
||||
echo("Storage ".$storage['storage_descr'] . ": ");
|
||||
|
||||
$storage_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("storage-" . $storage['storage_mib'] . "-" . safename($storage['storage_descr']) . ".rrd");
|
||||
$storage_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("storageX-" . $storage['storage_mib'] . "-" . safename($storage['storage_descr']) . ".rrd");
|
||||
|
||||
if (!is_file($storage_rrd))
|
||||
{
|
||||
rrdtool_create($storage_rrd, "--step 300 \
|
||||
DS:used:GAUGE:600:0:U \
|
||||
DS:free:GAUGE:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
rrdtool_create($storage_rrd, "--step 300 DS:used:GAUGE:600:0:U DS:free:GAUGE:600:0:U DS:size:GAUGE:600:0:U DS:perc:GAUGE:600:0:100 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$file = $config['install_dir']."/includes/polling/storage-".$storage['storage_mib'].".inc.php";
|
||||
@@ -48,7 +34,7 @@ foreach (dbFetchRows("SELECT * FROM storage WHERE device_id = ?", array($device[
|
||||
|
||||
echo($percent."% ");
|
||||
|
||||
rrdtool_update($storage_rrd,"N:".$storage['used'].":".$storage['free']);
|
||||
rrdtool_update($storage_rrd,"N:".$storage['used'].":".$storage['free'].":".$storage['size'].":".$percent);
|
||||
|
||||
$update = dbUpdate(array('storage_used' => $storage['used'], 'storage_free' => $storage['free'], 'storage_size' => $storage['size'], 'storage_units' => $storage['units'], 'storage_perc' => $percent),
|
||||
'storage', '`storage_id` = ?', array($storage['storage_id']));
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
if (!is_file($uptime_rrd))
|
||||
{
|
||||
rrdtool_create ($uptime_rrd, "DS:uptime:GAUGE:600:0:U RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797");
|
||||
rrdtool_create ($uptime_rrd, "DS:uptime:GAUGE:600:0:U ".$config['rrd_rra']);
|
||||
}
|
||||
rrdtool_update($uptime_rrd, "N:".$uptime);
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@ if ($config['enable_printers'])
|
||||
if (!is_file($tonerrrd))
|
||||
{
|
||||
rrdtool_create($tonerrrd,"--step 300 \
|
||||
DS:toner:GAUGE:600:0:20000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:toner:GAUGE:600:0:20000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
echo($tonerperc . " %\n");
|
||||
|
||||
@@ -32,19 +32,7 @@ if (count($diskio_data))
|
||||
DS:read:DERIVE:600:0:125000000000 \
|
||||
DS:written:DERIVE:600:0:125000000000 \
|
||||
DS:reads:DERIVE:600:0:125000000000 \
|
||||
DS:writes:DERIVE:600:0:125000000000 \
|
||||
RRA:AVERAGE:0.5:1:600 \
|
||||
RRA:AVERAGE:0.5:6:700 \
|
||||
RRA:AVERAGE:0.5:24:775 \
|
||||
RRA:AVERAGE:0.5:288:797 \
|
||||
RRA:MIN:0.5:1:600 \
|
||||
RRA:MIN:0.5:6:700 \
|
||||
RRA:MIN:0.5:24:775 \
|
||||
RRA:MIN:0.5:288:797 \
|
||||
RRA:MAX:0.5:1:600 \
|
||||
RRA:MAX:0.5:6:700 \
|
||||
RRA:MAX:0.5:24:775 \
|
||||
RRA:MAX:0.5:288:797");
|
||||
DS:writes:DERIVE:600:0:125000000000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($rrd,"N:$rrd_update");
|
||||
|
||||
@@ -40,15 +40,7 @@ $cpu_rrd_create = " --step 300 \
|
||||
DS:user:COUNTER:600:0:U \
|
||||
DS:system:COUNTER:600:0:U \
|
||||
DS:nice:COUNTER:600:0:U \
|
||||
DS:idle:COUNTER:600:0:U \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800";
|
||||
DS:idle:COUNTER:600:0:U ".$config['rrd_rra'];
|
||||
|
||||
### This is how we currently collect. We should collect one RRD per stat, for ease of handling differen formats,
|
||||
### and because it is per-host and no big performance hit. See new format below
|
||||
@@ -76,7 +68,7 @@ foreach ($collect_oids as $oid)
|
||||
$filename = $host_rrd . "/ucd_".$oid.".rrd";
|
||||
if (!is_file($filename))
|
||||
{
|
||||
rrdtool_create($filename, " --step 300 DS:value:COUNTER:600:0:U RRA:AVERAGE:0.5:1:800 RRA:AVERAGE:0.5:6:800 RRA:AVERAGE:0.5:24:800 RRA:AVERAGE:0.5:288:800 RRA:MAX:0.5:1:800 RRA:MAX:0.5:6:800 RRA:MAX:0.5:24:800 RRA:MAX:0.5:288:800");
|
||||
rrdtool_create($filename, " --step 300 DS:value:COUNTER:600:0:U ".$config['rrd_rra']);
|
||||
}
|
||||
rrdtool_update($filename, "N:".$value);
|
||||
$graphs['ucd_cpu'] = TRUE;
|
||||
@@ -114,15 +106,7 @@ $mem_rrd_create = " --step 300 \
|
||||
DS:totalfree:GAUGE:600:0:10000000000 \
|
||||
DS:shared:GAUGE:600:0:10000000000 \
|
||||
DS:buffered:GAUGE:600:0:10000000000 \
|
||||
DS:cached:GAUGE:600:0:10000000000 \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800";
|
||||
DS:cached:GAUGE:600:0:10000000000 ".$config['rrd_rra'];
|
||||
|
||||
$snmpdata = snmp_get_multi($device, "memTotalSwap.0 memAvailSwap.0 memTotalReal.0 memAvailReal.0 memTotalFree.0 memShared.0 memBuffer.0 memCached.0", "-OQUs", "UCD-SNMP-MIB");
|
||||
if (is_array($snmpdata[0]))
|
||||
@@ -150,18 +134,7 @@ if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTot
|
||||
#UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 429
|
||||
#UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 479
|
||||
|
||||
$la_load_create = " --step 300 \
|
||||
DS:1min:GAUGE:600:0:5000 \
|
||||
DS:5min:GAUGE:600:0:5000 \
|
||||
DS:15min:GAUGE:600:0:5000 \
|
||||
RRA:AVERAGE:0.5:1:800 \
|
||||
RRA:AVERAGE:0.5:6:800 \
|
||||
RRA:AVERAGE:0.5:24:800 \
|
||||
RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 \
|
||||
RRA:MAX:0.5:6:800 \
|
||||
RRA:MAX:0.5:24:800 \
|
||||
RRA:MAX:0.5:288:800";
|
||||
$la_load_create = " --step 300 DS:1min:GAUGE:600:0:5000 DS:5min:GAUGE:600:0:5000 DS:15min:GAUGE:600:0:5000 ".$config['rrd_rra'];
|
||||
|
||||
$load_get = "laLoadInt.1 laLoadInt.2 laLoadInt.3";
|
||||
$load_raw = snmp_get_multi($device, $load_get, "-OQUs", "UCD-SNMP-MIB");
|
||||
|
||||
@@ -63,11 +63,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
|
||||
if (!is_file($wificlientsrrd))
|
||||
{
|
||||
rrdtool_create($wificlientsrrd,"--step 300 \
|
||||
DS:wificlients:GAUGE:600:-273:1000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:wificlients:GAUGE:600:-273:1000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($wificlientsrrd,"N:".$wificlients1);
|
||||
@@ -82,11 +78,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
|
||||
if (!is_file($wificlientsrrd))
|
||||
{
|
||||
rrdtool_create($wificlientsrrd,"--step 300 \
|
||||
DS:wificlients:GAUGE:600:-273:1000 \
|
||||
RRA:AVERAGE:0.5:1:1200 \
|
||||
RRA:MIN:0.5:12:2400 \
|
||||
RRA:MAX:0.5:12:2400 \
|
||||
RRA:AVERAGE:0.5:12:2400");
|
||||
DS:wificlients:GAUGE:600:-273:1000 ".$config['rrd_rra']);
|
||||
}
|
||||
|
||||
rrdtool_update($wificlientsrrd,"N:".$wificlients2);
|
||||
|
||||
Reference in New Issue
Block a user