We need to run a `show arp` command on all routers...
# best-practices
t
We need to run a
show arp
command on all routers at our ISP and get that data into our warehouse. Ansible is really good at communicating with network devices. It has profiles for each type and is able to recognize when a command starts/ends and parses that data for you. I don't think there's an equivalent tap for that with meltano. I'm wondering what the best way is to merge the two. Maybe I could make a tap that will call out to ansible and ansible can write what I want to a json file then my meltano tap can read from that json and pump it in to a raw table. Seems kind of weird at that point because all my tap is doing is just reading from a file. I could have ansible write directly to my postgres db but that feels like it'd be stepping on Meltano's toes. Looking for input
👀 1
v
I've also thought there was a super interesting overlap in "devops"y tools and meltano. What makes the most sense to me would be something like a
tap-ansible
and then you could have a configuration that allowed something like a config
{"custom_commands": [{"hosts": "routers", "command": "show arp", "inventory": "inventory_here"}]
Seems like a deleciate balanace, but out of the box getting the inventory data that Ansible pulls into a target would be a nice stream as well
The other taps that seem obvious are
tap-aws
,
tap-azure
tap-gcs
specifically Inventory, EC2 Configurations etc
Having all computers in from Active Directory / Intune would have been nice as well in my past life to just be able to search what we actually have quickly. The issue I would have had was a lack of SQL knowledge, but with LLM's the way they are now maybe that barrier is easier to get over. Curious about your thoughts!
t
I realized after posting this that the real thing that makes ansible appealing for this is that it can parse info from these network device clis. I realized that all ansible is really doing is calling python scripts. I can write a python script that uses those same parsing libraries and just make a tap that calls my python scripts. I can bypass ansible directly. For management we have all of our routers listed on some backend that I can query
v
That would work, but I think calling a
tap-ansible
makes a lot of sense if your team already uses it, could just hook into the existing setup you already have and pull valuable data from it
It could be a wrapper on ansible's CLI or some python API, maybe wrappping this https://ansible.readthedocs.io/projects/runner/en/latest/intro/
Simple way without writing a whole tap would probably be dumping the output to a file like you mentioned, you could have meltano call the ansible command which dumps a file, then call a tap that points to the directory the ansible output was just dumped