Merge branch 'ent-8860-mejora-wizard-snmp' into 'develop'

Applied fix for snmp

See merge request artica/pandorafms!4868
This commit is contained in:
Daniel Rodriguez 2022-06-16 11:46:53 +00:00
commit d400d5b7dc
1 changed files with 6 additions and 1 deletions

View File

@ -3572,7 +3572,12 @@ class AgentWizard extends HTML
if ($full_output === true) {
$output[] = $key.' = '.$oid_unit;
} else {
$index = [];
$index[] = preg_replace('/^'.$oid.'/', '', $key);
if (empty($index) === true) {
preg_match('/\.\d+$/', $key, $index);
}
$tmp = explode(': ', $oid_unit);
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
}