Added support for os in oxidized groups

This commit is contained in:
laf
2016-03-05 00:48:51 +00:00
parent 7ea7bd4c92
commit f0fb602046
2 changed files with 15 additions and 1 deletions

View File

@ -953,6 +953,14 @@ function list_oxidized() {
break;
}
}
if (empty($device['group'])) {
foreach ($config['oxidized']['group']['os'] as $host_group) {
if ($host_group['match'] === $device['os']) {
$device['group'] = $host_group['group'];
break;
}
}
}
if (empty($device['group'])) {
foreach ($config['oxidized']['group']['location'] as $host_group) {
if (preg_match($host_group['regex'].'i', $device['location'])) {