My company hasn’t standardized on a username and passwords. We have around 8 combinations in use. I’m trying to map the IP address (which is also the hostname) to a group to use in the oxidized configuration. I’m just trying to get one to come back with the correct mapping when I query the API. I tried these combination so far for the one host.
$config[‘oxidized’][‘maps’][‘group’][‘hostname’][] = array(‘regex’ => ‘/^172.16.1.1/’, ‘group’ => ‘tacacs-internal’);
$config[‘oxidized’][‘maps’][‘group’][‘hostname’][] = array(‘regex’ => ‘/172.16.1.1/’, ‘group’ => ‘tacacs-internal’);
$config[‘oxidized’][‘maps’][‘group’][‘hostname’][] = array(‘regex’ => ‘172.16.1.1’, ‘group’ => ‘tacacs-internal’);
$config[‘oxidized’][‘maps’][‘group’][‘hostname’][] = array(‘match’ => ‘172.16.1.1’, ‘group’ => ‘tacacs-internal’);
I am still seeing the device in the default group.
oxidized@librenms:/home/oxidized$ curl -H ‘X-Auth-Token: xxxx’ http://localhost/api/v0/oxidized
{
"hostname": "172.16.16.1",
"os": "ios",
"ip": "",
"group": "default"
},
Thanks in advance