Sync devices from Nautobot to LibreNMS
Currently the idea is to sync only Active devices from Nautobot.
The devices added to LibreNMS are filtered based on
- the role, with the environment variable
NAUTOBOT_FILTER_ROLE, - the tenant, with
NAUTOBOT_FILTER_TENANT.
The environment variables are comma-separated lists of roles/tenants to include, exclude by prefixing them with !.
For details, see nb2lnms/nautobot_df.py, NautobotAdapter#load.
Devices are added to LibreNMS, but not deleted, only disabled, to preserve the graphs as a basis for planning the next event.
If you wish to prevent nb2lnms from disabling a device that's not listed in Nautobot, add nb2lnms:dont-disable to its description.
cd HERE
# create venv
python3 -m venv venv
source venv/bin/activate
# install dependencies
# -e installs nb2lnms in "editable" mode, so the files here in the repo
# are still the ones that are used
pip3 install -e .
# populate env with required tokens & config values
cp .env.sample .env
editor .env