2010-10-31 20:24:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
require 'includes/html/graphs/common.inc.php';
|
2010-10-31 20:24:21 +00:00
|
|
|
|
2022-07-22 16:01:55 -05:00
|
|
|
$mysql_rrd = Rrd::name($device['hostname'], ['app', 'mysql', $app->app_id]);
|
2010-10-31 20:24:21 +00:00
|
|
|
|
2021-03-28 17:25:30 -05:00
|
|
|
if (Rrd::checkRrdExists($mysql_rrd)) {
|
2015-07-10 13:36:21 +02:00
|
|
|
$rrd_filename = $mysql_rrd;
|
2010-10-31 20:24:21 +00:00
|
|
|
}
|
2011-03-17 14:27:03 +00:00
|
|
|
|
2010-10-31 20:24:21 +00:00
|
|
|
$rrd_options .= ' DEF:a=' . $rrd_filename . ':IDBLBSe:AVERAGE ';
|
|
|
|
|
$rrd_options .= ' DEF:b=' . $rrd_filename . ':IBLFh:AVERAGE ';
|
|
|
|
|
$rrd_options .= ' DEF:c=' . $rrd_filename . ':IBLWn:AVERAGE ';
|
|
|
|
|
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'COMMENT:" Current Average Maximum\n" ';
|
2010-10-31 20:24:21 +00:00
|
|
|
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'AREA:a#FAFD9E:"Buffer Size " ';
|
2010-10-31 20:24:21 +00:00
|
|
|
$rrd_options .= 'GPRINT:a:LAST:"%6.2lf %s" ';
|
|
|
|
|
$rrd_options .= 'GPRINT:a:AVERAGE:"%6.2lf %s" ';
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'GPRINT:a:MAX:"%6.2lf %s\\n" ';
|
2010-10-31 20:24:21 +00:00
|
|
|
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'LINE1:b#22FF22:"KB Flushed " ';
|
2010-10-31 20:24:21 +00:00
|
|
|
$rrd_options .= 'GPRINT:b:LAST:"%6.2lf %s" ';
|
|
|
|
|
$rrd_options .= 'GPRINT:b:AVERAGE:"%6.2lf %s" ';
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'GPRINT:b:MAX:"%6.2lf %s\\n" ';
|
2010-10-31 20:24:21 +00:00
|
|
|
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'LINE1:c#0022FF:"KB Written " ';
|
2010-10-31 20:24:21 +00:00
|
|
|
$rrd_options .= 'GPRINT:c:LAST:"%6.2lf %s" ';
|
|
|
|
|
$rrd_options .= 'GPRINT:c:AVERAGE:"%6.2lf %s" ';
|
2011-10-07 23:05:50 +00:00
|
|
|
$rrd_options .= 'GPRINT:c:MAX:"%6.2lf %s\\n" ';
|