diff --git a/html/includes/graphs/application/memcached_commands.inc.php b/html/includes/graphs/application/memcached_commands.inc.php index 5f756cb2e4..e7f0788b32 100644 --- a/html/includes/graphs/application/memcached_commands.inc.php +++ b/html/includes/graphs/application/memcached_commands.inc.php @@ -3,32 +3,23 @@ include("memcached.inc.php"); include("includes/graphs/common.inc.php"); -$array = array( - 'cmd_set' => 'Set', - 'cmd_get' => 'Get', -); +$nototal = 1; -$i = 0; -if (is_file($rrd_filename)) -{ - foreach ($array as $ds => $vars) - { - $rrd_list[$i]['filename'] = $rrd_filename; - if (is_array($vars)) - { - $rrd_list[$i]['descr'] = $vars['descr']; - } else { - $rrd_list[$i]['descr'] = $vars; - } - $rrd_list[$i]['ds'] = $ds; - $i++; - } -} else { echo("file missing: $file"); } +$ds_in = "cmd_set"; +$ds_out = "cmd_get"; -$colours = "mixed"; -$nototal = 0; -$unit_text = ""; +$in_text = "Set"; +$out_text = "Get"; -include("includes/graphs/generic_multi_simplex_seperated.inc.php"); +$graph_title .= ":: Commands"; +$unit_text = "Commands"; +$colour_line_in = "008800FF"; +$colour_line_out = "000088FF"; +$colour_area_in = "bEFFbEAA"; +$colour_area_out = "bEbEFFAA"; +$colour_area_in_max = "CC88CC"; +$colour_area_out_max = "FFEFAA"; + +include("includes/graphs/generic_duplex.inc.php"); ?> diff --git a/html/includes/graphs/generic_duplex.inc.php b/html/includes/graphs/generic_duplex.inc.php index 1472808a99..f2f1b52b96 100644 --- a/html/includes/graphs/generic_duplex.inc.php +++ b/html/includes/graphs/generic_duplex.inc.php @@ -125,4 +125,6 @@ if($_GET['previous'] == "yes") $rrd_options .= " LINE1.25:dout".$format."X#666666:'Prev Out'"; } +$rrd_options .= " HRULE:0#999999"; + ?> diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php index 05e660373a..50a4ba8a83 100644 --- a/html/includes/graphs/generic_multi_line.inc.php +++ b/html/includes/graphs/generic_multi_line.inc.php @@ -53,11 +53,10 @@ foreach ($rrd_list as $rrd) { $rrd_options .= " CDEF:".$id."i=".$id.",-1,*"; $rrd_optionsb .= " LINE1.25:".$id."i#".$colour.":'$descr'"; -# $rrd_options .= " AREA:".$id."i#" . $colour . "10"; + if(!empty($rrd['areacolour'])) { $rrd_optionsb .= " AREA:".$id."i#" . $rrd['areacolour']; } } else { $rrd_optionsb .= " LINE1.25:".$id."#".$colour.":'$descr'"; -# $rrd_options .= " AREA:".$id."#" . $colour . "10"; - + if(!empty($rrd['areacolour'])) { $rrd_optionsb .= " AREA:".$id."#" . $rrd['areacolour']; } } $rrd_optionsb .= " GPRINT:".$id.":LAST:%5.2lf%s GPRINT:".$id."min:MIN:%5.2lf%s"; @@ -68,7 +67,6 @@ foreach ($rrd_list as $rrd) } $rrd_options .= $rrd_optionsb; - $rrd_options .= " HRULE:0#555555"; ?> diff --git a/html/pages/apps.inc.php b/html/pages/apps.inc.php index 423cb5adb5..50f928b160 100644 --- a/html/pages/apps.inc.php +++ b/html/pages/apps.inc.php @@ -1,5 +1,10 @@ Apps » "); diff --git a/html/pages/apps/default.inc.php b/html/pages/apps/default.inc.php index 0fcba8b239..76fc1d0d4f 100644 --- a/html/pages/apps/default.inc.php +++ b/html/pages/apps/default.inc.php @@ -1,9 +1,5 @@ diff --git a/includes/polling/unix-agent.inc.php b/includes/polling/unix-agent.inc.php index 3e46d69f28..01b4cda6cd 100755 --- a/includes/polling/unix-agent.inc.php +++ b/includes/polling/unix-agent.inc.php @@ -42,7 +42,7 @@ if($device['os_group'] == "unix") if($section == "apache") { $sa = "app"; $sb = "apache"; } if($section == "mysql") { $sa = "app"; $sb = "mysql"; } - if($section == "drbd") { $sa = "app"; $sb = "drbd"; } +# if($section == "drbd") { $sa = "app"; $sb = "drbd"; } if(!empty($sa) && !empty($sb)) { @@ -107,16 +107,15 @@ if($device['os_group'] == "unix") } ### DRBD - if (!empty($agent_data['app']['drbd'])) + if (!empty($agent_data['drbd'])) { - $agent_data['drbd_raw'] = $agent_data['drbd']; - $agent_data['drbd'] = array(); - foreach (explode("\n", $agent_data['drbd_raw']) as $drbd_entry) + $agent_data['app']['drbd'] = array(); + foreach (explode("\n", $agent_data['drbd']) as $drbd_entry) { list($drbd_dev, $drbd_data) = explode(":", $drbd_entry); if (preg_match("/^drbd/", $drbd_dev)) { - $agent_data['drbd'][$drbd_dev] = $drbd_data; + $agent_data['app']['drbd'][$drbd_dev] = $drbd_data; if (dbFetchCell("SELECT COUNT(*) FROM `applications` WHERE `device_id` = ? AND `app_type` = ? AND `app_instance` = ?", array($device['device_id'], 'drbd', $drbd_dev)) == "0") { echo("Found new application 'DRBd' $drbd_dev\n");