mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix mysql graphs
git-svn-id: http://www.observium.org/svn/observer/trunk@2713 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -29,7 +29,7 @@ if (is_file($rrd_filename))
|
|||||||
|
|
||||||
$colours = "mixed";
|
$colours = "mixed";
|
||||||
$nototal = 1;
|
$nototal = 1;
|
||||||
$unit_text = "Commands";
|
$unit_text = "Connections";
|
||||||
|
|
||||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ if (is_file($rrd_filename))
|
|||||||
|
|
||||||
$colours = "mixed";
|
$colours = "mixed";
|
||||||
$nototal = 1;
|
$nototal = 1;
|
||||||
$unit_text = "Commands";
|
$unit_text = "";
|
||||||
|
|
||||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ if (is_file($rrd_filename))
|
|||||||
|
|
||||||
$colours = "mixed";
|
$colours = "mixed";
|
||||||
$nototal = 1;
|
$nototal = 1;
|
||||||
$unit_text = "Commands";
|
$unit_text = "activity";
|
||||||
|
|
||||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ if (is_file($rrd_filename))
|
|||||||
|
|
||||||
$colours = "mixed";
|
$colours = "mixed";
|
||||||
$nototal = 1;
|
$nototal = 1;
|
||||||
$unit_text = "Commands";
|
$unit_text = "";
|
||||||
|
|
||||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ if (is_file($rrd_filename))
|
|||||||
|
|
||||||
$colours = "mixed";
|
$colours = "mixed";
|
||||||
$nototal = 1;
|
$nototal = 1;
|
||||||
$unit_text = "Commands";
|
$unit_text = "";
|
||||||
|
|
||||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
|
@@ -2,44 +2,37 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array('IDBRDd' => 'Deletes',
|
||||||
|
'IDBRId' => 'Inserts',
|
||||||
|
'IDBRRd' => 'Reads',
|
||||||
|
'IDBRUd' => 'Updates',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':IDBRDd:AVERAGE ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':IDBRId:AVERAGE ';
|
$nototal = 0;
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':IDBRRd:AVERAGE ';
|
$unit_text = "Rows";
|
||||||
$rrd_options .= ' DEF:d='.$rrd_filename.':IDBRUd:AVERAGE ';
|
|
||||||
$rrd_options .= ' CDEF:e=a,b,c,d,+,+,+ ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'AREA:a#22FF22:"Deletes"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:b#0022FF:"Inserts":STACK ';
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:c#FF0000:"Reads":STACK ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:d#00AAAA:"Updates":STACK ';
|
|
||||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:e#000000:"Total":STACK ';
|
|
||||||
$rrd_options .= 'GPRINT:e:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -2,32 +2,37 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array('IBSRs' => 'Spin Rounds',
|
||||||
|
'IBSWs' => 'Spin Waits',
|
||||||
|
'IBOWs' => 'OS Waits',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':IBSRs:AVERAGE ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':IBSWs:AVERAGE ';
|
$nototal = 1;
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':IBOWs:AVERAGE ';
|
$unit_text = "Semaphores";
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#22FF22:"Spin Rounds"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:b#0022FF:"Spin Waits"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:c#FF0000:"OS Waits"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -2,21 +2,33 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array('IBTNx' => 'Transactions created',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' -b 1000 ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':IBTNx:AVERAGE ';
|
$nototal = 1;
|
||||||
|
$unit_text = "transactions";
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE1:a#22FF22:"Transactions created"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s" ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -2,38 +2,36 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array( 'KRRs' => 'read requests',
|
||||||
|
'KRs' => 'reads',
|
||||||
|
'KWR' => 'write requests',
|
||||||
|
'KWs' => 'writes',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':KRRs:AVERAGE ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':KRs:AVERAGE ';
|
$nototal = 1;
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':KWR:AVERAGE ';
|
$unit_text = "Keys";
|
||||||
$rrd_options .= ' DEF:d='.$rrd_filename.':KWs:AVERAGE ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE1:a#22FF22:"Key read requests"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE1:b#0022FF:"Key reads"\ \ ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE1:c#FF0000:"Key write requests"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE1:d#00AAAA:"Key writes"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -9,38 +9,33 @@ if (is_file($mysql_rrd))
|
|||||||
$rrd_filename = $mysql_rrd;
|
$rrd_filename = $mysql_rrd;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rrd_options .= ' -b 1024 ';
|
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':QCQICe:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':QCHs:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':QCIs:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:d='.$rrd_filename.':QCNCd:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:e='.$rrd_filename.':QCLMPs:AVERAGE ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
$array = array('QCQICe' => array('descr' => 'Queries in cache', 'colour' => '22FF22'),
|
||||||
|
'QCHs' => array('descr' => 'Cache hits', 'colour' => '0022FF'),
|
||||||
|
'QCIs' => array('descr' => 'Inserts', 'colour' => 'FF0000'),
|
||||||
|
'QCNCd' => array('descr' => 'Not cached', 'colour' => '00AAAA'),
|
||||||
|
'QCLMPs' => array('descr' => 'Low-memory prunes', 'colour' => 'FF00FF'),
|
||||||
|
);
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#22FF22:"Queries in cache"\ \ ';
|
$i = 0;
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
if (is_file($rrd_filename))
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
{
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
foreach ($array as $ds => $vars)
|
||||||
|
{
|
||||||
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||||
|
$rrd_list[$i]['descr'] = $vars['descr'];
|
||||||
|
$rrd_list[$i]['ds'] = $ds;
|
||||||
|
# $rrd_list[$i]['colour'] = $vars['colour'];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
} else { echo("file missing: $file"); }
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:b#0022FF:"Cache hits"\ \ ';
|
$colours = "mixed";
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
$nototal = 1;
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
$unit_text = "Commands";
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:c#FF0000:"Inserts"\ \ ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:d#00AAAA:"Not cached"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:e#FF00FF:"Low-memory prunes"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:e:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -2,28 +2,34 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array( 'QCs' => 'Cache size',
|
||||||
|
'QCeFy' => 'Free mem',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' -b 1024 ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' -l 0 ';
|
$nototal = 1;
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':QCs:AVERAGE ';
|
$unit_text = "Bytes";
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':QCeFy:AVERAGE ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'AREA:a#22FF22:"Cache size"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:b#0022FF:"Free mem"\ \ ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -2,52 +2,37 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
|
$array = array( 'SFJn' => 'Full Join',
|
||||||
|
'SFRJn' => 'Full Range',
|
||||||
|
'SRe' => 'Range',
|
||||||
|
'SRCk' => 'Range Check',
|
||||||
|
'SSn' => 'Scan',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' -b 1024 ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' -l 0 ';
|
$nototal = 0;
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':SFJn:AVERAGE ';
|
$unit_text = "Queries";
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':SFRJn:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':SRe:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:d='.$rrd_filename.':SRCk:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:e='.$rrd_filename.':SSn:AVERAGE ';
|
|
||||||
$rrd_options .= ' CDEF:total=a,b,c,d,e,+,+,+,+ ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'AREA:a#22FF22:"Full Join"\ \ ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:b#0022FF:"Full Range"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:c#FF0000:"Range"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:d#00AAAA:"Range Check"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:e#FF00FF:"Scan"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:e:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:e:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'AREA:total#000000:"Total"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:total:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:total:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:total:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -2,21 +2,34 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array(
|
||||||
|
'SQs' => 'Slow queries',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
/* $rrd_options .= ' -b 1024 '; */
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':SQs:AVERAGE ';
|
$nototal = 1;
|
||||||
|
$unit_text = "Queries";
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#22FF22:"Slow queries"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -2,39 +2,38 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array(
|
||||||
|
'SRows' => 'Rows Sorted',
|
||||||
|
'SRange' => 'Range',
|
||||||
|
'SMPs' => 'Merge Passes',
|
||||||
|
'SScan' => 'Scan',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
$rrd_options .= ' -b 1000 ';
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':SRows:AVERAGE ';
|
$nototal = 0;
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':SRange:AVERAGE ';
|
$unit_text = "";
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':SMPs:AVERAGE ';
|
|
||||||
$rrd_options .= ' DEF:d='.$rrd_filename.':SScan:AVERAGE ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:"\t Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#22FF22:"Rows Sorted"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= "LINE2:b#0022FF:Range\ \ ";
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:c#FF0000:"Merge Passes"\ \ ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= "LINE2:d#FF0000:Scan\ \ ";
|
|
||||||
$rrd_options .= 'GPRINT:d:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:d:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@@ -2,27 +2,36 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array(
|
||||||
|
'TLIe' => 'immed',
|
||||||
|
'TLWd' => 'waited',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
/* $rrd_options .= ' -b 1024 '; */
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':TLIe:AVERAGE ';
|
$nototal = 0;
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':TLWd:AVERAGE ';
|
$unit_text = "Table locks";
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#00FF00:"Table locks immed"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:b#0022FF:"Table locks waited"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -2,33 +2,37 @@
|
|||||||
|
|
||||||
include("includes/graphs/common.inc.php");
|
include("includes/graphs/common.inc.php");
|
||||||
|
|
||||||
$mysql_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id'].".rrd";
|
$rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd';
|
||||||
|
|
||||||
if (is_file($mysql_rrd))
|
$array = array(
|
||||||
|
'CTMPDTs' => 'disk tables',
|
||||||
|
'CTMPTs' => 'tables',
|
||||||
|
'CTMPFs' => 'files',
|
||||||
|
);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
if (is_file($rrd_filename))
|
||||||
{
|
{
|
||||||
$rrd_filename = $mysql_rrd;
|
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"); }
|
||||||
|
|
||||||
/* $rrd_options .= ' -b 1024 '; */
|
$colours = "mixed";
|
||||||
$rrd_options .= ' DEF:a='.$rrd_filename.':CTMPDTs:AVERAGE ';
|
$nototal = 0;
|
||||||
$rrd_options .= ' DEF:b='.$rrd_filename.':CTMPTs:AVERAGE ';
|
$unit_text = "Temp";
|
||||||
$rrd_options .= ' DEF:c='.$rrd_filename.':CTMPFs:AVERAGE ';
|
|
||||||
|
|
||||||
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:a#22FF22:"Temp disk tables"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:b#0022FF:"Temp tables"\ \ ';
|
|
||||||
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
$rrd_options .= 'LINE2:c#FF0000:"Temp files"\ \ ';
|
?>
|
||||||
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
|
||||||
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\n" ';
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
Reference in New Issue
Block a user