mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Merge pull request #2909 from tuxis-ie/fix_ceph_graph_array
Make ceph.inc.php compatible with the new graph_array-method....
This commit is contained in:
@@ -17,6 +17,8 @@ foreach ($graphs as $key => $text) {
|
|||||||
|
|
||||||
if ($key == "ceph_poolstats") {
|
if ($key == "ceph_poolstats") {
|
||||||
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-pool-*") as $rrd_filename) {
|
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)) {
|
if (preg_match("/.*-pool-(.+)\.rrd$/", $rrd_filename, $pools)) {
|
||||||
$pool = $pools[1];
|
$pool = $pools[1];
|
||||||
echo '<h3>'.$pool.' Reads/Writes</h3>';
|
echo '<h3>'.$pool.' Reads/Writes</h3>';
|
||||||
@@ -39,6 +41,8 @@ foreach ($graphs as $key => $text) {
|
|||||||
}
|
}
|
||||||
elseif ($key == "ceph_osdperf") {
|
elseif ($key == "ceph_osdperf") {
|
||||||
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-osd-*") as $rrd_filename) {
|
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)) {
|
if (preg_match("/.*-osd-(.+)\.rrd$/", $rrd_filename, $osds)) {
|
||||||
$osd = $osds[1];
|
$osd = $osds[1];
|
||||||
echo '<h3>'.$osd.' Latency</h3>';
|
echo '<h3>'.$osd.' Latency</h3>';
|
||||||
@@ -57,6 +61,8 @@ foreach ($graphs as $key => $text) {
|
|||||||
$pool = $pools[1];
|
$pool = $pools[1];
|
||||||
if ($pool == "c") {
|
if ($pool == "c") {
|
||||||
echo '<h3>Cluster Usage</h3>';
|
echo '<h3>Cluster Usage</h3>';
|
||||||
|
$graph_array['to'] = $config['time']['now'];
|
||||||
|
$graph_array['id'] = $app['app_id'];
|
||||||
$graph_array['type'] = 'application_ceph_pool_df';
|
$graph_array['type'] = 'application_ceph_pool_df';
|
||||||
$graph_array['pool'] = $pool;
|
$graph_array['pool'] = $pool;
|
||||||
|
|
||||||
@@ -66,6 +72,8 @@ foreach ($graphs as $key => $text) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo '<h3>'.$pool.' Usage</h3>';
|
echo '<h3>'.$pool.' Usage</h3>';
|
||||||
|
$graph_array['to'] = $config['time']['now'];
|
||||||
|
$graph_array['id'] = $app['app_id'];
|
||||||
$graph_array['type'] = 'application_ceph_pool_df';
|
$graph_array['type'] = 'application_ceph_pool_df';
|
||||||
$graph_array['pool'] = $pool;
|
$graph_array['pool'] = $pool;
|
||||||
|
|
||||||
@@ -74,6 +82,8 @@ foreach ($graphs as $key => $text) {
|
|||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
|
||||||
echo '<h3>'.$pool.' Objects</h3>';
|
echo '<h3>'.$pool.' Objects</h3>';
|
||||||
|
$graph_array['to'] = $config['time']['now'];
|
||||||
|
$graph_array['id'] = $app['app_id'];
|
||||||
$graph_array['type'] = 'application_ceph_pool_objects';
|
$graph_array['type'] = 'application_ceph_pool_objects';
|
||||||
$graph_array['pool'] = $pool;
|
$graph_array['pool'] = $pool;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user