From 091cc822deb32fa7d2b5e5497bf6570b39a4733d Mon Sep 17 00:00:00 2001 From: f0o Date: Thu, 5 May 2016 14:47:08 +0000 Subject: [PATCH] Added Hit/Misses graphs for memcached --- .../application/memcached_hitmiss.inc.php | 40 +++++++++++++++++++ html/pages/device/apps/memcached.inc.php | 1 + 2 files changed, 41 insertions(+) create mode 100644 html/includes/graphs/application/memcached_hitmiss.inc.php diff --git a/html/includes/graphs/application/memcached_hitmiss.inc.php b/html/includes/graphs/application/memcached_hitmiss.inc.php new file mode 100644 index 0000000000..f781224ee0 --- /dev/null +++ b/html/includes/graphs/application/memcached_hitmiss.inc.php @@ -0,0 +1,40 @@ + array( + 'descr' => 'Hits', + 'colour' => '555555', + ), + 'get_misses' => array( + 'descr' => 'Misses', + 'colour' => 'cc0000', + ), +); + +$i = 0; + +if (is_file($rrd_filename)) { + 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']; + if (!empty($vars['areacolour'])) { + $rrd_list[$i]['areacolour'] = $vars['areacolour']; + } + + $i++; + } +} +else { + echo "file missing: $file"; +} + +require 'includes/graphs/generic_multi_line.inc.php'; diff --git a/html/pages/device/apps/memcached.inc.php b/html/pages/device/apps/memcached.inc.php index 05a6a2df33..dbe3f57fb0 100644 --- a/html/pages/device/apps/memcached.inc.php +++ b/html/pages/device/apps/memcached.inc.php @@ -7,6 +7,7 @@ $graphs = array( 'memcached_commands' => 'Commands', 'memcached_data' => 'Data Size', 'memcached_items' => 'Items', + 'memcached_hitmiss' => 'Hits/Misses', 'memcached_uptime' => 'Uptime', 'memcached_threads' => 'Threads',