mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix smart application parsing (#15672)
* fix smart application parsing * style fix * test * test * test * .
This commit is contained in:
@@ -13,13 +13,13 @@ try {
|
||||
$legacy = $e->getOutput();
|
||||
$lines = explode("\n", $legacy);
|
||||
|
||||
$data = ['disks'=>[], 'legacy'=>1];
|
||||
$data = ['disks' => [], 'legacy' => 1];
|
||||
|
||||
$int = 0;
|
||||
while (isset($lines[$int])) {
|
||||
[$disk, $id5, $id10, $id173, $id177, $id183, $id184, $id187, $id188, $id190, $id194,
|
||||
$id196, $id197, $id198, $id199, $id231, $id233, $completed, $interrupted, $read_failure,
|
||||
$unknown_failure, $extended, $short, $conveyance, $selective] = explode(',', $lines[$int]);
|
||||
$unknown_failure, $extended, $short, $conveyance, $selective, $id9] = explode(',', $lines[$int]);
|
||||
$int++;
|
||||
|
||||
// could really be any of these, but make sure we have something defined,
|
||||
@@ -110,24 +110,24 @@ $new_disks_with_failed_health = [];
|
||||
$data['disks_with_failed_tests'] = [];
|
||||
$data['disks_with_failed_health'] = [];
|
||||
$data['has'] = [
|
||||
'id5'=>0,
|
||||
'id9'=>0,
|
||||
'id10'=>0,
|
||||
'id173'=>0,
|
||||
'id177'=>0,
|
||||
'id183'=>0,
|
||||
'id184'=>0,
|
||||
'id187'=>0,
|
||||
'id188'=>0,
|
||||
'id190'=>0,
|
||||
'id194'=>0,
|
||||
'id196'=>0,
|
||||
'id197'=>0,
|
||||
'id198'=>0,
|
||||
'id199'=>0,
|
||||
'id231'=>0,
|
||||
'id232'=>0,
|
||||
'id233'=>0,
|
||||
'id5' => 0,
|
||||
'id9' => 0,
|
||||
'id10' => 0,
|
||||
'id173' => 0,
|
||||
'id177' => 0,
|
||||
'id183' => 0,
|
||||
'id184' => 0,
|
||||
'id187' => 0,
|
||||
'id188' => 0,
|
||||
'id190' => 0,
|
||||
'id194' => 0,
|
||||
'id196' => 0,
|
||||
'id197' => 0,
|
||||
'id198' => 0,
|
||||
'id199' => 0,
|
||||
'id231' => 0,
|
||||
'id232' => 0,
|
||||
'id233' => 0,
|
||||
];
|
||||
|
||||
$metrics = [
|
||||
|
Reference in New Issue
Block a user