Send netdisco-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: Using MakeRancidConf for Oxidized (Christian Ramseyer)
--- Begin Message ---
Hi Ricardo
On 11.05.20 05:37, Ricardo Stella wrote:
> Is thereĀ a
> way to create the routers.db or do some sort of csv export that I could
> then use with oxidized? At a minimum IP address and system name?
>
Yeah that's probably easier than the Rancid plugin route. You can easily
create such a custom report by sticking this into deplyoment.yml:
reports:
- tag: oxidized_hosts
label: 'Oxidized Hosts'
category: Device
columns:
- {dns: 'dns', _searchable: true}
- {ip: 'ip', _searchable: true}
- {vendor: 'vendor', _searchable: true}
- {os: 'os', _searchable: true}
- {os_ver: 'os_ver', _searchable: true}
query: |
SELECT dns, ip, vendor, os, os_ver
FROM device d
ORDER BY dns
It should then show up in the Reports -> Device, you might need to
restart netdisco-web.
To download it on your oxidized host, you can use the recently
introduced REST API, e.g. with this python3 bit:
import json
import requests
# see https://github.com/netdisco/netdisco/wiki/API#login
# for the Authorization token
r =
requests.get('http://localhost:5000/api/v1/report/device/oxidized_hosts',
headers={'Accept': 'application/json',
'Authorization': 'the_token'})
print(json.dumps(r.json(), indent=2, sort_keys=True))
It doesn't look that the API can do CSV right now, and not sure if
that's planned. But with just some mangling in python it should be easy
to achieve.
If you struggle somewhere you can find more doc here:
<https://github.com/netdisco/netdisco/wiki/API>
<https://github.com/netdisco/netdisco/wiki/Web-Plugins#reports
<https://github.com/netdisco/netdisco/wiki/Configuration#reports>
Cheers
Christian
--
Christian Ramseyer, netnea ag
Network Management. Security. OpenSource.
https://www.netnea.com
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users