Files
librenms-librenms/includes/html/graphs/application/mysql_query_cache.inc.php
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
PHP
Raw Normal View History

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
$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)) {
$rrd_filename = $mysql_rrd;
2010-10-31 20:24:21 +00:00
$array = [
'QCQICe' => [
'descr' => 'Queries in cache',
'colour' => '22FF22',
],
'QCHs' => [
'descr' => 'Cache hits',
'colour' => '0022FF',
],
'QCIs' => [
'descr' => 'Inserts',
'colour' => 'FF0000',
],
'QCNCd' => [
'descr' => 'Not cached',
'colour' => '00AAAA',
],
'QCLMPs' => [
'descr' => 'Low-memory prunes',
'colour' => 'FF00FF',
],
];
$rrd_list = [];
2017-02-24 15:22:15 +00:00
foreach ($array as $ds => $var) {
$rrd_list[] = [
'filename' => $rrd_filename,
2017-02-24 15:22:15 +00:00
'descr' => $var['descr'],
'ds' => $ds,
2017-02-24 15:22:15 +00:00
// 'colour' => $var['colour']
];
}
2016-08-18 20:28:22 -05:00
} else {
echo "data missing: $mysql_rrd";
}
2011-11-03 12:51:57 +00:00
$colours = 'mixed';
2011-11-03 12:51:57 +00:00
$nototal = 1;
$unit_text = 'Commands';
2011-11-03 12:51:57 +00:00
2019-04-11 23:26:42 -05:00
require 'includes/html/graphs/generic_multi_simplex_seperated.inc.php';