From 4150b862058e2130f94b2cdb743bf9aa33253e69 Mon Sep 17 00:00:00 2001 From: Mark Schouten Date: Tue, 2 Feb 2016 11:05:59 +0100 Subject: [PATCH] Make ceph.inc.php compatible with the new graph_array-method, which gets reset after each include. --- html/pages/device/apps/ceph.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/html/pages/device/apps/ceph.inc.php b/html/pages/device/apps/ceph.inc.php index 988d648030..50dedc8c48 100644 --- a/html/pages/device/apps/ceph.inc.php +++ b/html/pages/device/apps/ceph.inc.php @@ -17,6 +17,8 @@ foreach ($graphs as $key => $text) { if ($key == "ceph_poolstats") { foreach (glob($rrddir."/app-ceph-".$app['app_id']."-pool-*") as $rrd_filename) { + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $app['app_id']; if (preg_match("/.*-pool-(.+)\.rrd$/", $rrd_filename, $pools)) { $pool = $pools[1]; echo '

'.$pool.' Reads/Writes

'; @@ -39,6 +41,8 @@ foreach ($graphs as $key => $text) { } elseif ($key == "ceph_osdperf") { foreach (glob($rrddir."/app-ceph-".$app['app_id']."-osd-*") as $rrd_filename) { + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $app['app_id']; if (preg_match("/.*-osd-(.+)\.rrd$/", $rrd_filename, $osds)) { $osd = $osds[1]; echo '

'.$osd.' Latency

'; @@ -57,6 +61,8 @@ foreach ($graphs as $key => $text) { $pool = $pools[1]; if ($pool == "c") { echo '

Cluster Usage

'; + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $app['app_id']; $graph_array['type'] = 'application_ceph_pool_df'; $graph_array['pool'] = $pool; @@ -66,6 +72,8 @@ foreach ($graphs as $key => $text) { } else { echo '

'.$pool.' Usage

'; + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $app['app_id']; $graph_array['type'] = 'application_ceph_pool_df'; $graph_array['pool'] = $pool; @@ -74,6 +82,8 @@ foreach ($graphs as $key => $text) { echo ''; echo '

'.$pool.' Objects

'; + $graph_array['to'] = $config['time']['now']; + $graph_array['id'] = $app['app_id']; $graph_array['type'] = 'application_ceph_pool_objects'; $graph_array['pool'] = $pool;