mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Fix if-then-else
This commit is contained in:
@@ -36,7 +36,8 @@ foreach ($graphs as $key => $text) {
|
||||
echo '</td></tr>';
|
||||
}
|
||||
}
|
||||
} elseif ($key == "ceph_osdperf") {
|
||||
}
|
||||
elseif ($key == "ceph_osdperf") {
|
||||
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-osd-*") as $rrd_filename) {
|
||||
if (preg_match("/.*-osd-(.+)\.rrd$/", $rrd_filename, $osds)) {
|
||||
$osd = $osds[1];
|
||||
@@ -49,7 +50,8 @@ foreach ($graphs as $key => $text) {
|
||||
echo '</td></tr>';
|
||||
}
|
||||
}
|
||||
} elseif ($key == "ceph_df") {
|
||||
}
|
||||
elseif ($key == "ceph_df") {
|
||||
foreach (glob($rrddir."/app-ceph-".$app['app_id']."-df-*") as $rrd_filename) {
|
||||
if (preg_match("/.*-df-(.+)\.rrd$/", $rrd_filename, $pools)) {
|
||||
$pool = $pools[1];
|
||||
@@ -61,7 +63,8 @@ foreach ($graphs as $key => $text) {
|
||||
echo "<tr bgcolor='$row_colour'><td colspan=5>";
|
||||
include 'includes/print-graphrow.inc.php';
|
||||
echo '</td></tr>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<h3>'.$pool.' Usage</h3>';
|
||||
$graph_array['type'] = 'application_ceph_pool_df';
|
||||
$graph_array['pool'] = $pool;
|
||||
|
||||
@@ -27,7 +27,8 @@ if (!empty($agent_data['app']['ceph'])) {
|
||||
print "Ceph Pool: $pool, IOPS: $ops, Wr bytes: $wrbytes, R bytes: $rbytes\n";
|
||||
rrdtool_update($ceph_rrd, array("ops" => $ops, "wrbytes" => $wrbytes, "rbytes" => $rbytes));
|
||||
}
|
||||
} elseif ($section == "osdperformance") {
|
||||
}
|
||||
elseif ($section == "osdperformance") {
|
||||
foreach (explode("\n", $data) as $line) {
|
||||
if (empty($line))
|
||||
continue;
|
||||
@@ -45,7 +46,8 @@ if (!empty($agent_data['app']['ceph'])) {
|
||||
print "Ceph OSD: $osd, Apply: $apply, Commit: $commit\n";
|
||||
rrdtool_update($ceph_rrd, array("apply_ms" => $apply, "commit_ms" => $commit));
|
||||
}
|
||||
} elseif ($section == "df") {
|
||||
}
|
||||
elseif ($section == "df") {
|
||||
foreach (explode("\n", $data) as $line) {
|
||||
if (empty($line))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user