mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
api: Map LibreNMS OS' to known Oxidized models (#8758)
This commit is contained in:
parent
cb9077a983
commit
08022aae7a
@ -876,6 +876,8 @@ Output:
|
||||
|
||||
List devices for use with Oxidized. If you have group support enabled then a group will also be returned based on your config.
|
||||
|
||||
> LibreNMS will automatically map the OS to the Oxidized model name if they don't match.
|
||||
|
||||
Route: `/api/v0/oxidized(/:hostname)`
|
||||
|
||||
Input (JSON):
|
||||
|
@ -14,6 +14,8 @@ Then you can procede to the LibreNMS Web UI and go to Oxidized Settings in the E
|
||||
|
||||
To have devices automatically added, you will need to configure oxidized to pull them from LibreNMS [Feeding Oxidized](#feeding-oxidized)
|
||||
|
||||
LibreNMS will automatically map the OS to the Oxidized model name if they don't match. this means you shouldn't need to use the model_map config option within Oxidized.
|
||||
|
||||
### Detailed integration information
|
||||
---
|
||||
|
||||
|
@ -1264,6 +1264,14 @@ function list_oxidized()
|
||||
}
|
||||
}
|
||||
|
||||
// We remap certain device OS' that have different names with Oxidized models
|
||||
$models = [
|
||||
'arista_eos' => 'eos',
|
||||
'vyos' => 'vyatta',
|
||||
];
|
||||
|
||||
$device['os'] = str_replace(array_keys($models), array_values($models), $device['os']);
|
||||
|
||||
unset($device['location']);
|
||||
unset($device['sysname']);
|
||||
$devices[] = $device;
|
||||
|
Loading…
Reference in New Issue
Block a user