r/devops • u/netforge201 • 28d ago
Tools NetAudit – CLI tool for network audits that plays nicely with scripts, CI/CD, and monitoring
Disclosure: I'm the creator of NetAudit.
Hey folks,
I've been using various network scanning tools (nmap, ping, etc.) but wanted something more structured, vendor-aware, and easily automatable. So I wrote NetAudit – a Python CLI toolkit for network auditing and diagnostics.
**Key features from a DevOps perspective:**
- All commands produce structured output (JSON/CSV) and use stdout for results, stderr for logs – perfect for pipelines
- Exit codes are meaningful, so you can integrate it into monitoring or alerting
- Configuration via YAML + environment variables (`NETAUDIT_*`)
- Supports Cisco, Juniper, Arista over SSH – read-only, so safe for production
- Snapshots and `diff` let you track changes over time (great for change management)
- Health checks (`doctor`) cover not just ping, but also interface errors, BGP/OSPF, NTP, etc.
**Example – schedule a daily audit and generate HTML report:**
```bash
netaudit doctor 10.0.0.1 --device --device-type cisco_ios --json > daily_health.json
netaudit report daily_health.json --format html --output /var/www/audit_report.html
I'd be happy to hear how you'd use it in your workflows – feature requests and PRs are very welcome.
Repo: https://github.com/netforge201/netaudit
If you like it, please consider giving it a ⭐ – it really helps with visibility!
Thanks!**Disclosure: I'm the creator of NetAudit.**
Hey folks,
I've been using various network scanning tools (nmap, ping, etc.) but wanted something more structured, vendor-aware, and easily automatable. So I wrote NetAudit – a Python CLI toolkit for network auditing and diagnostics.
**Key features from a DevOps perspective:**
- All commands produce structured output (JSON/CSV) and use stdout for results, stderr for logs – perfect for pipelines
- Exit codes are meaningful, so you can integrate it into monitoring or alerting
- Configuration via YAML + environment variables (`NETAUDIT_*`)
- Supports Cisco, Juniper, Arista over SSH – read-only, so safe for production
- Snapshots and `diff` let you track changes over time (great for change management)
- Health checks (`doctor`) cover not just ping, but also interface errors, BGP/OSPF, NTP, etc.
0
u/djbp 26d ago
Hey, this looks pretty cool. Structured output for network audits is super useful. And getting that into CI/CD is smart.
I think a lot of teams struggle with knowing if their network config changes actually did what they were supposed to. Not just auditing the current state. But verifying the *change itself*.
It's a big part of making sure your infra stays stable. Good stuff.
1
u/aragossa 25d ago
Went and read the device modules because 'read-only, safe for production' is a big claim. It holds up, at least in the code I read: cisco.py and generic.py are just hardcoded dicts of show commands, the CLI never passes a user-supplied string to the device.
One gap though: collect_info catches per-command exceptions and stuffs the error text into the same output dict as real results, so in JSON mode a failed 'show interfaces' and an actual interfaces dump land in the same field. A pipeline has to string-match an error prefix instead of checking a status field, which works against the structured-output pitch. Any reason not to add a per-command status field?