diff --git a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
index 667c86663..e1e77f7a1 100644
--- a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
+++ b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
@@ -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");
-?>
\ No newline at end of file
+?>
diff --git a/html/includes/graphs/device/mempool.inc.php b/html/includes/graphs/device/mempool.inc.php
index 720791010..bfdd4b271 100644
--- a/html/includes/graphs/device/mempool.inc.php
+++ b/html/includes/graphs/device/mempool.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))
{
diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php
index 3ddcca5b6..b323e1613 100644
--- a/html/includes/graphs/device/storage.inc.php
+++ b/html/includes/graphs/device/storage.inc.php
@@ -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,+";
diff --git a/html/includes/graphs/generic_simplex.inc.php b/html/includes/graphs/generic_simplex.inc.php
index b554f377d..2b839efe5 100644
--- a/html/includes/graphs/generic_simplex.inc.php
+++ b/html/includes/graphs/generic_simplex.inc.php
@@ -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)
diff --git a/html/includes/graphs/mempool/auth.inc.php b/html/includes/graphs/mempool/auth.inc.php
index 03f35a93b..830719808 100755
--- a/html/includes/graphs/mempool/auth.inc.php
+++ b/html/includes/graphs/mempool/auth.inc.php
@@ -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;
diff --git a/html/includes/graphs/processor/usage.inc.php b/html/includes/graphs/processor/usage.inc.php
index ba02668bf..3b8d317b0 100755
--- a/html/includes/graphs/processor/usage.inc.php
+++ b/html/includes/graphs/processor/usage.inc.php
@@ -1,11 +1,32 @@
\ No newline at end of file
+}
+?>
diff --git a/html/includes/graphs/storage/auth.inc.php b/html/includes/graphs/storage/auth.inc.php
index c2038c697..5b5b5119a 100755
--- a/html/includes/graphs/storage/auth.inc.php
+++ b/html/includes/graphs/storage/auth.inc.php
@@ -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']);
diff --git a/html/includes/graphs/storage/usage.inc.php b/html/includes/graphs/storage/usage.inc.php
index 715908439..8d65bc222 100644
--- a/html/includes/graphs/storage/usage.inc.php
+++ b/html/includes/graphs/storage/usage.inc.php
@@ -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";
+}
?>
diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php
index 2ff152580..3824880ba 100644
--- a/html/includes/print-menubar.php
+++ b/html/includes/print-menubar.php
@@ -402,11 +402,11 @@ if ($_SESSION['userlevel'] >= '5' && ($app_count) > "0")
'.$row['app_type'].' ');
+
'.$app['app_type'].' ');
}
?>
diff --git a/html/pages/apps.inc.php b/html/pages/apps.inc.php
new file mode 100644
index 000000000..423cb5adb
--- /dev/null
+++ b/html/pages/apps.inc.php
@@ -0,0 +1,46 @@
+Apps » ");
+
+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(""); }
+ $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";
+?>
diff --git a/html/pages/apps/default.inc.php b/html/pages/apps/default.inc.php
new file mode 100644
index 000000000..ff38b9e55
--- /dev/null
+++ b/html/pages/apps/default.inc.php
@@ -0,0 +1,51 @@
+'.$vars['app'].'');
+ echo('');
+ $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('');
+ echo('| '.generate_device_link($device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).' | ');
+ echo(''.$app_device['app_instance'].' | ');
+ echo(''.$app_device['app_status'].' | ');
+ echo(' | ');
+ echo('
');
+ echo('');
+ echo('| ');
+
+ 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(' | ');
+ echo('
');
+ }
+ echo('
');
+
+
+?>
diff --git a/html/pages/apps/overview.inc.php b/html/pages/apps/overview.inc.php
new file mode 100644
index 000000000..1e7712f62
--- /dev/null
+++ b/html/pages/apps/overview.inc.php
@@ -0,0 +1,53 @@
+');
+ echo(''.generate_link(ucfirst($app['app_type']),array('page'=>'apps','app'=>$app['app_type'])).'
');
+ $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']))."
";
+ $overlib_link .= generate_graph_tag($graph_array);
+ $overlib_content = generate_overlib_content($graph_array, $port['hostname'] . " - " . $port['label']);
+
+ echo("");
+ echo(overlib_link($link, $overlib_link, $overlib_content));
+ echo("
");
+ }
+ echo('');
+}
+
+?>
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index 0b31b6280..f245dd2e5 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -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
diff --git a/includes/polling/altiga-ssl.inc.php b/includes/polling/altiga-ssl.inc.php
index e4a0f526f..67a46b661 100755
--- a/includes/polling/altiga-ssl.inc.php
+++ b/includes/polling/altiga-ssl.inc.php
@@ -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);
}
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/applications/apache.inc.php b/includes/polling/applications/apache.inc.php
index 3dbd5eb71..87e8af58a 100644
--- a/includes/polling/applications/apache.inc.php
+++ b/includes/polling/applications/apache.inc.php
@@ -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");
diff --git a/includes/polling/applications/drbd.inc.php b/includes/polling/applications/drbd.inc.php
index 6ca722dbd..f62cbfb57 100644
--- a/includes/polling/applications/drbd.inc.php
+++ b/includes/polling/applications/drbd.inc.php
@@ -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']);
diff --git a/includes/polling/applications/mailscanner.inc.php b/includes/polling/applications/mailscanner.inc.php
index 60a95d355..0bafacc8c 100644
--- a/includes/polling/applications/mailscanner.inc.php
+++ b/includes/polling/applications/mailscanner.inc.php
@@ -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");
diff --git a/includes/polling/applications/mysql.inc.php b/includes/polling/applications/mysql.inc.php
index 75b8e4ad1..e2d6d74f9 100644
--- a/includes/polling/applications/mysql.inc.php
+++ b/includes/polling/applications/mysql.inc.php
@@ -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");
diff --git a/includes/polling/applications/nginx.inc.php b/includes/polling/applications/nginx.inc.php
index 921e93420..3341171ac 100644
--- a/includes/polling/applications/nginx.inc.php
+++ b/includes/polling/applications/nginx.inc.php
@@ -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");
diff --git a/includes/polling/applications/ntp-client.inc.php b/includes/polling/applications/ntp-client.inc.php
index c31467f7c..3a5bb8a06 100644
--- a/includes/polling/applications/ntp-client.inc.php
+++ b/includes/polling/applications/ntp-client.inc.php
@@ -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");
diff --git a/includes/polling/applications/ntpd-server.inc.php b/includes/polling/applications/ntpd-server.inc.php
index cc4cfc636..5a9bc7400 100644
--- a/includes/polling/applications/ntpd-server.inc.php
+++ b/includes/polling/applications/ntpd-server.inc.php
@@ -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");
diff --git a/includes/polling/applications/powerdns.inc.php b/includes/polling/applications/powerdns.inc.php
index be2c101a6..307c905c4 100644
--- a/includes/polling/applications/powerdns.inc.php
+++ b/includes/polling/applications/powerdns.inc.php
@@ -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");
diff --git a/includes/polling/applications/shoutcast.inc.php b/includes/polling/applications/shoutcast.inc.php
index a2fc581eb..80a747630 100644
--- a/includes/polling/applications/shoutcast.inc.php
+++ b/includes/polling/applications/shoutcast.inc.php
@@ -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");
diff --git a/includes/polling/bgp-peers.inc.php b/includes/polling/bgp-peers.inc.php
index 24e4685c8..bd9be8f1a 100755
--- a/includes/polling/bgp-peers.inc.php
+++ b/includes/polling/bgp-peers.inc.php
@@ -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");
diff --git a/includes/polling/cipsec-tunnels.inc.php b/includes/polling/cipsec-tunnels.inc.php
index 47ad4e205..87b7d9a42 100644
--- a/includes/polling/cipsec-tunnels.inc.php
+++ b/includes/polling/cipsec-tunnels.inc.php
@@ -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)
{
diff --git a/includes/polling/cisco-ace-loadbalancer.inc.php b/includes/polling/cisco-ace-loadbalancer.inc.php
index 0cc3d0305..37019e06a 100644
--- a/includes/polling/cisco-ace-loadbalancer.inc.php
+++ b/includes/polling/cisco-ace-loadbalancer.inc.php
@@ -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); }
diff --git a/includes/polling/cisco-ace-serverfarms.inc.php b/includes/polling/cisco-ace-serverfarms.inc.php
index 3c7d5c238..e8d5c722d 100644
--- a/includes/polling/cisco-ace-serverfarms.inc.php
+++ b/includes/polling/cisco-ace-serverfarms.inc.php
@@ -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)
{
diff --git a/includes/polling/cisco-cef.inc.php b/includes/polling/cisco-cef.inc.php
index f39efe5e6..eb789f3d3 100755
--- a/includes/polling/cisco-cef.inc.php
+++ b/includes/polling/cisco-cef.inc.php
@@ -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
diff --git a/includes/polling/cisco-ipsec-flow-monitor.inc.php b/includes/polling/cisco-ipsec-flow-monitor.inc.php
index f0ea6dff9..26ead9189 100755
--- a/includes/polling/cisco-ipsec-flow-monitor.inc.php
+++ b/includes/polling/cisco-ipsec-flow-monitor.inc.php
@@ -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'])
{
diff --git a/includes/polling/cisco-mac-accounting.inc.php b/includes/polling/cisco-mac-accounting.inc.php
index 608530800..64640aaf9 100755
--- a/includes/polling/cisco-mac-accounting.inc.php
+++ b/includes/polling/cisco-mac-accounting.inc.php
@@ -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);
diff --git a/includes/polling/cisco-remote-access-monitor.inc.php b/includes/polling/cisco-remote-access-monitor.inc.php
index 7c329700b..3ad87e1c5 100755
--- a/includes/polling/cisco-remote-access-monitor.inc.php
+++ b/includes/polling/cisco-remote-access-monitor.inc.php
@@ -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'])
{
diff --git a/includes/polling/cisco-sla.inc.php b/includes/polling/cisco-sla.inc.php
index 0e475e6e0..2dcb6cd05 100644
--- a/includes/polling/cisco-sla.inc.php
+++ b/includes/polling/cisco-sla.inc.php
@@ -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']]))
diff --git a/includes/polling/cisco-vpdn.inc.php b/includes/polling/cisco-vpdn.inc.php
index b7041478b..50aeeee75 100755
--- a/includes/polling/cisco-vpdn.inc.php
+++ b/includes/polling/cisco-vpdn.inc.php
@@ -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'])
{
diff --git a/includes/polling/entity-physical.inc.php b/includes/polling/entity-physical.inc.php
index 664a921d0..0b04e9b31 100644
--- a/includes/polling/entity-physical.inc.php
+++ b/includes/polling/entity-physical.inc.php
@@ -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");
diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php
index d7eba86e5..7c741790b 100644
--- a/includes/polling/functions.inc.php
+++ b/includes/polling/functions.inc.php
@@ -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");
diff --git a/includes/polling/hr-mib.inc.php b/includes/polling/hr-mib.inc.php
index 847f5f033..2e7cc34e6 100755
--- a/includes/polling/hr-mib.inc.php
+++ b/includes/polling/hr-mib.inc.php
@@ -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");
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/ipSystemStats.inc.php b/includes/polling/ipSystemStats.inc.php
index 01bb68f41..505f31a31 100755
--- a/includes/polling/ipSystemStats.inc.php
+++ b/includes/polling/ipSystemStats.inc.php
@@ -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");
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/ipmi.inc.php b/includes/polling/ipmi.inc.php
index 5f7279b0e..55f8c6ff8 100755
--- a/includes/polling/ipmi.inc.php
+++ b/includes/polling/ipmi.inc.php
@@ -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");
diff --git a/includes/polling/junose-atm-vp.inc.php b/includes/polling/junose-atm-vp.inc.php
index 3f4a46faa..c247e2901 100755
--- a/includes/polling/junose-atm-vp.inc.php
+++ b/includes/polling/junose-atm-vp.inc.php
@@ -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");
diff --git a/includes/polling/mempools.inc.php b/includes/polling/mempools.inc.php
index 7777c1034..80f7a20a3 100755
--- a/includes/polling/mempools.inc.php
+++ b/includes/polling/mempools.inc.php
@@ -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']),
diff --git a/includes/polling/netscaler-stats.inc.php b/includes/polling/netscaler-stats.inc.php
index 617b5241e..c52c96936 100644
--- a/includes/polling/netscaler-stats.inc.php
+++ b/includes/polling/netscaler-stats.inc.php
@@ -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)
{
diff --git a/includes/polling/netscaler-vsvr.inc.php b/includes/polling/netscaler-vsvr.inc.php
index 34a084a06..cc2cd99c9 100644
--- a/includes/polling/netscaler-vsvr.inc.php
+++ b/includes/polling/netscaler-vsvr.inc.php
@@ -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)
{
diff --git a/includes/polling/netstats-icmp.inc.php b/includes/polling/netstats-icmp.inc.php
index 013661112..7e2958714 100755
--- a/includes/polling/netstats-icmp.inc.php
+++ b/includes/polling/netstats-icmp.inc.php
@@ -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)
{
diff --git a/includes/polling/netstats-ip.inc.php b/includes/polling/netstats-ip.inc.php
index 42e2d4429..25d8d6c89 100755
--- a/includes/polling/netstats-ip.inc.php
+++ b/includes/polling/netstats-ip.inc.php
@@ -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)
{
diff --git a/includes/polling/netstats-snmp.inc.php b/includes/polling/netstats-snmp.inc.php
index 1adc18337..fb50c66d8 100755
--- a/includes/polling/netstats-snmp.inc.php
+++ b/includes/polling/netstats-snmp.inc.php
@@ -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)
{
diff --git a/includes/polling/netstats-tcp.inc.php b/includes/polling/netstats-tcp.inc.php
index b4fd32f80..e32105b76 100755
--- a/includes/polling/netstats-tcp.inc.php
+++ b/includes/polling/netstats-tcp.inc.php
@@ -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)
{
diff --git a/includes/polling/netstats-udp.inc.php b/includes/polling/netstats-udp.inc.php
index 4d1417d04..f0d948bcf 100755
--- a/includes/polling/netstats-udp.inc.php
+++ b/includes/polling/netstats-udp.inc.php
@@ -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)
{
diff --git a/includes/polling/os/fortigate.inc.php b/includes/polling/os/fortigate.inc.php
index 2c07d249c..b49d044a1 100755
--- a/includes/polling/os/fortigate.inc.php
+++ b/includes/polling/os/fortigate.inc.php
@@ -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");
diff --git a/includes/polling/os/panos.inc.php b/includes/polling/os/panos.inc.php
index 33d119470..a76793aad 100644
--- a/includes/polling/os/panos.inc.php
+++ b/includes/polling/os/panos.inc.php
@@ -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;
}
diff --git a/includes/polling/os/procurve.inc.php b/includes/polling/os/procurve.inc.php
index ef83f9b8e..9c05b412c 100755
--- a/includes/polling/os/procurve.inc.php
+++ b/includes/polling/os/procurve.inc.php
@@ -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 ");
}
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/os/screenos.inc.php b/includes/polling/os/screenos.inc.php
index 9053a3478..103387bb5 100755
--- a/includes/polling/os/screenos.inc.php
+++ b/includes/polling/os/screenos.inc.php
@@ -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;
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/os/snom.inc.php b/includes/polling/os/snom.inc.php
index 9e0ab3841..6478d5e75 100755
--- a/includes/polling/os/snom.inc.php
+++ b/includes/polling/os/snom.inc.php
@@ -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);
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/ospf.inc.php b/includes/polling/ospf.inc.php
index 7204090a6..d2ce9f728 100644
--- a/includes/polling/ospf.inc.php
+++ b/includes/polling/ospf.inc.php
@@ -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);
diff --git a/includes/polling/port-adsl.inc.php b/includes/polling/port-adsl.inc.php
index 49b06b029..c49064fda 100755
--- a/includes/polling/port-adsl.inc.php
+++ b/includes/polling/port-adsl.inc.php
@@ -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');
diff --git a/includes/polling/port-etherlike.inc.php b/includes/polling/port-etherlike.inc.php
index 0f110215f..9c8cc4928 100755
--- a/includes/polling/port-etherlike.inc.php
+++ b/includes/polling/port-etherlike.inc.php
@@ -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))
{
diff --git a/includes/polling/port-poe.inc.php b/includes/polling/port-poe.inc.php
index 76b8e54d4..80ccc83c5 100755
--- a/includes/polling/port-poe.inc.php
+++ b/includes/polling/port-poe.inc.php
@@ -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 ");
}
-?>
\ No newline at end of file
+?>
diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php
index e9ce18ee4..f945f04a1 100755
--- a/includes/polling/ports.inc.php
+++ b/includes/polling/ports.inc.php
@@ -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)
diff --git a/includes/polling/processors.inc.php b/includes/polling/processors.inc.php
index c21db6e12..f17d413bb 100755
--- a/includes/polling/processors.inc.php
+++ b/includes/polling/processors.inc.php
@@ -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));
diff --git a/includes/polling/storage.inc.php b/includes/polling/storage.inc.php
index 3c15d4740..d9659a95a 100755
--- a/includes/polling/storage.inc.php
+++ b/includes/polling/storage.inc.php
@@ -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']));
diff --git a/includes/polling/system.inc.php b/includes/polling/system.inc.php
index f990cc080..48ea20c6f 100755
--- a/includes/polling/system.inc.php
+++ b/includes/polling/system.inc.php
@@ -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);
diff --git a/includes/polling/toner.inc.php b/includes/polling/toner.inc.php
index bf2d22bce..798020022 100755
--- a/includes/polling/toner.inc.php
+++ b/includes/polling/toner.inc.php
@@ -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");
diff --git a/includes/polling/ucd-diskio.inc.php b/includes/polling/ucd-diskio.inc.php
index 961fe6073..321b98948 100644
--- a/includes/polling/ucd-diskio.inc.php
+++ b/includes/polling/ucd-diskio.inc.php
@@ -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");
diff --git a/includes/polling/ucd-mib.inc.php b/includes/polling/ucd-mib.inc.php
index a96696163..c1eb827f5 100755
--- a/includes/polling/ucd-mib.inc.php
+++ b/includes/polling/ucd-mib.inc.php
@@ -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");
diff --git a/includes/polling/wifi.inc.php b/includes/polling/wifi.inc.php
index 87e051873..66ee71b9f 100644
--- a/includes/polling/wifi.inc.php
+++ b/includes/polling/wifi.inc.php
@@ -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);