
Modern enterprise networks are complex ecosystems that demand intelligent automation for effective management. However, network automation data collection presents the most fundamental challenge that organizations must solve first. The journey from raw device outputs to actionable insights requires systematic data collection processes that can handle the scale and complexity of modern network infrastructures.
Managing modern networks requires automation, but establishing reliable network automation data collection processes is often the first and most critical hurdle. Network engineers face the daily reality of gathering information from dozens or hundreds of devices, running commands manually, and interpreting outputs that were designed for human consumption, not automated data collection systems. This approach doesn’t scale, introduces human error, and prevents the systematic analysis necessary for strategic network decisions.

Structured data forms the foundation of effective network automation. While raw command outputs provide information, they lack the consistency and format needed for programmatic analysis. Without structured data, network teams cannot build reliable automation workflows, perform trend analysis, or generate meaningful reports for management. The transformation from unstructured text to organized, query-able data is the critical first step toward intelligent network operations.

At Netodata, we’ve developed a practical demonstration that showcases multiple approaches to network automation data collection, parsing, and reporting. Repository exemplifies our philosophy of providing flexible, scalable network automation data collection solutions that address real-world challenges. Our Simple Facts toolkit, available at:

Network engineers face several fundamental challenges when implementing network automation data collection:
Raw command outputs present several problems for automation:
Effective network automation requires data in formats that programs can reliably process:
Structured data provides a systematic way to convert raw text into organized information, making it easier to manage and use within various network automation tasks. With properly structured data, network teams can:
Network automation projects frequently encounter these obstacles:
Our Simple Facts toolkit demonstrates four distinct approaches to network automation data collection and processing, each highlighting different aspects of modern network automation. This isn’t just academic exercise – these approaches reflect real-world scenarios where different technical requirements demand different network automation data collection strategies.
Project Philosophy: The toolkit embodies our belief that network automation should be:
Complete Workflow Architecture
The project follows a logical progression: Data Collection → Parsing → Reporting. Each stage builds upon the previous, creating a complete pipeline from raw device access to executive-ready reports. This architecture mirrors the approach we use in client network automation data collection engagements.
Technical Implementation
Our simple_facts.py script demonstrates direct SSH connectivity using Python’s Paramiko library. Paramiko provides a handy Python SSH library for connecting to devices, offering fine-grained control over the connection process.
Key Features
When to Use This Approach
Direct Paramiko implementation works best for network automation data collection when:
Code Architecture Highlights
The implementation handles connection establishment, command execution, and graceful disconnection while providing detailed logging for troubleshooting. Error handling ensures that authentication failures or connection timeouts don’t crash the entire network automation data collection process.
Framework Advantages
Nornir is a Python framework explicitly made for network devices, developed and maintained by the same people who created NAPALM and Netmiko. Our nornir_facts.py implementation showcases the framework’s strengths in production environments.
Scalability Features
Nornir is multi-threaded and significantly faster compared to serial execution approaches. Key capabilities include:
Production Benefits
Nornir allows multi-threaded task execution without using a domain-specific language, built with Python and designed to be used with Python. This approach provides network automation data collection capabilities including:
Inventory Management
The Nornir approach includes structured inventory files that separate device information from automation logic. This separation enables teams to manage device credentials and groupings independently from the network automation data collection scripts.
The Parsing Challenge
TextFSM provides a systematic way to convert raw text into structured data, making it easier to manage and use within various network automation tasks. Our structured_facts.py demonstrates how to transform vendor-specific command outputs into consistent data structures.
TextFSM Integration
TextFSM parser helps extract structured output from show monitoring commands sent to network devices, allowing information to be easily extracted without using regular expressions. The implementation includes:
Template Ecosystem
The ntc_templates repository on GitHub contains a collection of pre-built templates for many common network commands across different vendors. This community resource significantly reduces development time by providing tested parsing templates for standard network commands.
Vendor-Agnostic Benefits
The TextFSM approach enables consistent data structures regardless of the underlying device platform. A structured interface list looks the same whether it comes from Cisco IOS, Juniper JUNOS, or Arista EOS, enabling unified analysis and reporting.
Professional Output Generation
Our report.py script transforms collected and parsed data into professional reports suitable for both technical teams and management. The reporting engine includes:
Below we have a report example generated by the script.
# Network Discovery Report
## Overview
* **Report Generated**: 2025-05-24 14:02:35
* **Data Collected**: 2025-05-24 11:10:35
* **Total Devices**: 3
* **Total Interfaces**: 8
* **Total LLDP Neighbors**: 18
## Device Inventory
### Device Types
* **Arista**: 2
### OS Versions
* **4.29.9.1M-38626060.42991M (engineering build)**: 2
## Interface Statistics
### Interface Types
* **Ethernet**: 4
* **Loopback**: 2
* **Management**: 2
### Interface Status
* **up**: 8
## IP Addressing
### router1
| Interface | IP Address |
|-----------|------------|
| Ethernet1 | 10.1.1.1/30 |
| Ethernet2 | 10.1.2.1/30 |
| Loopback0 | 1.1.1.1/32 |
| Management0 | 172.20.20.11/24 |
### router2
| Interface | IP Address |
|-----------|------------|
| Ethernet1 | 10.1.1.2/30 |
| Ethernet2 | 10.1.4.1/30 |
| Loopback0 | 2.2.2.2/32 |
| Management0 | 172.20.20.12/24 |
Data Analysis Features
Beyond simple data presentation, the reporting module performs analysis:
Business Value Communication
The reports translate technical data into business language, helping management understand network investment needs, compliance status, and operational efficiency metrics. This translation is crucial for securing automation project funding and demonstrating ongoing value.
Python Environment Configuration
The toolkit requires specific Python packages that work together effectively:
# Core automation libraries
pip install paramiko nornir nornir-netmiko
pip install textfsm ntc-templates
pip install pyyaml jinja2 markdownInventory Structure Design
Proper inventory organization enables scalable automation:
# hosts.yaml structure
router_001:
hostname: 192.168.1.10
platform: cisco_ios
groups: [core_routers, building_a]
switch_001:
hostname: 192.168.1.20
platform: cisco_ios
groups: [access_switches, building_a]Security Best Practices
Using environment variables for credential management provides security while maintaining automation capability:
export NET_USERNAME="automation_user"
export NET_PASSWORD="secure_password"Network Automation Data Collection Process
Each approach provides different capabilities for network automation data collection:
Execution Workflow
The typical network automation data collection execution follows this pattern:
# Collect raw data using network automation
python simple_facts.py
# Parse with TextFSM for structured data collection
python3 structured_facts.py output/simple_facts_YYYYMMDD_HHMMSS.json
# Generate reports from collected data
python3 report.py output/structured/structured_facts_YYYYMMDD_HHMMSS.jsonError Handling Strategy
Production implementations must handle common failure scenarios:
Adding Device Support
Extending support for new device types involves:
Custom Analysis Integration
The modular architecture supports custom analysis modules:
Enterprise Integration
Production deployments often require integration with existing systems:
The transformation from raw network device data to actionable insights requires systematic approaches that address the realities of modern network environments. Our Simple Facts toolkit demonstrates that effective network automation data collection doesn’t require expensive proprietary tools – it requires thoughtful architecture, appropriate technology selection, and professional implementation practices.
The Foundation of Success
Reliable network automation data collection provides the foundation for all advanced automation workflows. Without systematic data collection and parsing capabilities, organizations cannot build comprehensive automation strategies. The approaches demonstrated in our toolkit provide this foundation while remaining accessible to network teams with varying automation experience.
Benefits of Modular Solutions
The multi-approach nature of our solution reflects real-world requirements where different scenarios demand different technical approaches. Whether you need the simplicity of direct SSH connections or the scalability of framework-based automation, having multiple options ensures that your automation strategy can adapt to changing requirements.
Adapting to Your Environment
Every network environment presents unique challenges. The examples in our Simple Facts toolkit provide starting points that teams can customize for their specific requirements. The combination of direct device access, structured parsing, and professional reporting creates a complete automation foundation.
Next Steps for Network Automation
Organizations beginning their automation journey should start with data collection and structured parsing before moving to more advanced workflows. The Simple Facts approach provides immediate value while building the foundation for more sophisticated automation projects.
The path from manual network management to intelligent automation starts with reliable data. Our toolkit demonstrates practical approaches that network engineering teams can implement immediately, providing both technical capability and business value from day one.
Project Repository
Technical Documentation
Community Resources