Open trickeydan opened 4 years ago
Doing this from a netbox report would probably make sense. Random thought I just had - currently this is driven by a cron job that submits a bunch of info to auth2. One option might be to generate an SSH key on netbox, and configure it (via ansible) to run a check script as a forced command on all servers?
That way we could have the report collect data on-demand (using paramiko), without giving netbox any unnecessary access to servers.
I've started some work on this in the server-attributes
branch of the ansible repo.
It uses an SSH forced command to run a little script on each server (all deployed via ansible), netbox side is in /opt/netbox/netbox/reports/attributes.py
on netbox.
Seeing as this gives netbox (hopefully very restricted) root access to servers, I'd appreciate a second look over this before deploying it everywhere. Just testing with --limit AUTH2,VMS-B53-1,DATA1,NETBOX,vault-b53-1
for now.
Tim has some code on an old Mac mini that Dan wrote a couple of years ago. He is looking into recovering it.
We should check that the server attributes match that in netbox