A high-performance, async Rust-based distributed network monitoring solution designed for deploying multiple lightweight agents that collect and report network performance metrics to a centralized server.
RELEASE CANDIDATE VERSION: LinkSense is currently in RC. The software is feature-complete and fully functional. It has undergone long run testing. All agent and server tasks are being actively tested. Note: The SQL and SNMP task features are in beta stage and require the sql-tasks and snmp-tasks feature flags respectively.
LinkSense was created as an open-source project by the Sycope team. If youβd like to learn more about Sycope and our approach to network monitoring and security, visit π Sycope
LinkSense enables organizations to monitor network health and performance across distributed infrastructure through a simple yet powerful agent-server architecture:
- Deploy agents anywhere in your network infrastructure
- Collect metrics centrally from all agents
- Monitor continuously with minimal resource overhead
- Scale effortlessly to hundreds of monitoring targets per agent
- Run standalone when centralized collection isn't needed
LinkSense supports eight task types, each optimized for specific monitoring needs:
| Task Type | Purpose | Key Metrics |
|---|---|---|
| ICMP Ping | Network connectivity | RTT, packet loss |
| TCP | TCP port connectivity | Connection time, success/failure |
| TLS Handshake | SSL/TLS certificate validation | Handshake time, certificate validity |
| HTTP GET | Web service health | DNS, TCP, TLS, TTFB timing |
| HTTP Content | Response validation | Status code, regex match |
| DNS Query | Resolution performance | Query time, record count |
| Bandwidth | Throughput testing | Mbps, transfer time |
| SQL QueryΒΉ | Database health | Query time, row count |
| SNMP QueryΒ² | Network device monitoring | Response time, OID values |
ΒΉ Requires sql-tasks feature flag
Β² Requires snmp-tasks feature flag and OpenSSL (libssl-dev)
Each task type has detailed documentation in TASK_*.md files.
Agents are lightweight monitoring services that:
- Execute network tests (ping, TCP, TLS, HTTP, DNS, bandwidth, SQL)
- Store metrics locally in SQLite
- Aggregate raw measurements into 60-second summaries
- Send aggregated metrics to the central server
- Automatically sync configuration from server
- Can operate standalone without server connection
Server is the central coordination point that:
- Receives and stores metrics from all agents
- Manages agent-specific configurations
- Coordinates bandwidth tests to prevent conflicts
- Validates and distributes configuration updates
- Provides RESTful API for agent communication
The system operates on a continuous cycle:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AGENT - Continuous Monitoring β
β β
β 1. Execute Tasks (ping, HTTP, DNS, etc.) β
β βββ Store raw measurements in SQLite β
β β
β 2. Every 60 seconds: Aggregate β
β βββ SQL GROUP BY β 1-minute summaries β
β β
β 3. Send to Server β
β βββ POST /api/v1/metrics β
β βββ Include BLAKE3 hash of current config β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SERVER - Central Collection β
β β
β 1. Authenticate agent (API key validation) β
β β
β 2. Compare configuration hash β
β βββ Match: Store metrics normally β
β βββ Mismatch: Agent downloads new config β
β β
β 3. Store metrics in SQLite (tagged with agent_id) β
β β
β 4. Update agent status (last_seen, metric counts) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Local-First Architecture: Agents store all metrics locally before sending to server. This ensures:
- No data loss if server is temporarily unavailable
- Agents continue monitoring during network issues
- Local querying capability for debugging
Aggregation Strategy: Raw measurements are aggregated into 60-second summaries:
- Reduces network bandwidth
- Decreases server storage requirements
- Maintains statistical accuracy (min, max, avg, stddev)
Configuration as Code: All monitoring tasks defined in TOML files:
- Version-controllable configuration
- Bulk updates across multiple agents
- Automatic validation before distribution
- Hash-based change detection
Agents automatically detect configuration changes through BLAKE3 hash comparison:
- Agent sends current config hash with every metric batch
- Server compares hash with master configuration
- On mismatch, agent downloads new configuration
- Agent validates, backs up old config, and applies new config
- Configuration errors are reported back to server
This enables zero-downtime reconfiguration of monitoring tasks.
Update multiple agents simultaneously by placing files in server's reconfigure/ directory:
# Create agent list and new configuration
echo -e "agent1\nagent2\nagent3" > reconfigure/agent_list.txt
cp new_monitoring_tasks.toml reconfigure/tasks.toml
# Server processes within 10 seconds
# - Validates configuration
# - Backs up existing configs
# - Distributes to all listed agentsSee README_RECONFIGURE_FEATURE.md for details.
Authentication: All agent-server communication requires API key validation via X-API-Key header.
Authorization: Optional agent ID whitelist restricts which agents can connect to server.
Configuration Validation: Server validates all configurations before distribution:
- TOML syntax checking
- Task parameter validation
- Interval constraint enforcement (e.g., bandwidth β₯60s)
Backups: Automatic configuration backups prevent data loss during updates.
SQL Tasks: Read-only database accounts recommended for monitoring queries.
The async architecture enables impressive scalability:
- Single agent: Monitors 100+ targets with minimal CPU/memory
- Concurrent execution: Tokio runtime handles thousands of simultaneous tasks
- Staggered scheduling: Prevents resource spikes and thundering herd
- Efficient aggregation: 60-second summaries reduce data volume by 98%+
- Bandwidth coordination: Server prevents test conflicts across agents
Real-world performance: A single agent can monitor hundreds of endpoints while using less than 50MB RAM.
LinkSense is built with performance and security as top priorities:
- Language: Pure Rust for memory safety and zero-cost abstractions
- Runtime: Tokio async runtime for efficient concurrency
- Memory Allocator: jemalloc via tikv-jemallocator for superior memory management and reduced fragmentation
- TLS Implementation: rustls with AWS-LC crypto provider for modern, secure TLS without OpenSSL dependencies
- Database: SQLite with bundled builds for portability
- HTTP Client: reqwest with rustls backend for secure communications
Why These Choices?
- jemalloc: Provides better performance for multi-threaded workloads, reduces memory fragmentation, and offers superior scalability compared to system allocators
- rustls + AWS-LC: Modern TLS implementation with better security posture, no C dependencies (OpenSSL), and excellent performance from AWS's battle-tested crypto library
- Rust 1.83+ and Cargo
- SQLite (bundled with Rust builds)
- Network connectivity between agents and server (for centralized mode)
- Linux: For ICMP ping, add user to ping group or grant CAP_NET_RAW
# Build all components (core features only)
cargo build --release
# Build with SQL monitoring support
cargo build --release --features sql-tasks
# Build with SNMP monitoring support (requires libssl-dev)
cargo build --release --features snmp-tasks
# Build with all optional features
cargo build --release --features "sql-tasks,snmp-tasks"- Server Setup: See README_SERVER.md
- Agent Setup: See README_AGENT.md
- README_AGENT.md - Agent installation, configuration, and operation
- README_SERVER.md - Server setup, API, and management
- TASK_PING.md - ICMP ping monitoring
- TASK_TCP.md - TCP port connectivity monitoring
- TASK_TLS.md - TLS handshake and certificate validation
- TASK_HTTP_GET.md - HTTP/HTTPS endpoint monitoring
- TASK_HTTP_CONTENT.md - HTTP response validation
- TASK_DNS.md - DNS query monitoring
- TASK_BANDWIDTH.md - Bandwidth testing
- TASK_SQL.md - Database query monitoring (requires
sql-tasksfeature) - TASK_SNMP.md - SNMP device monitoring (requires
snmp-tasksfeature)
- README_DATABASE.md - Database schema and design
- README_BANDWIDTH_IMPLEMENTATION.md - Bandwidth test coordination
- README_RECONFIGURE_FEATURE.md - Bulk reconfiguration system
For component-specific issues:
- Agent problems: See README_AGENT.md troubleshooting section
- Server problems: See README_SERVER.md troubleshooting section
MIT License - see LICENSE file for details.
Built with Rust for performance, safety, and reliability.
