l8collector

Collector

Multi-protocol network data collection (SNMP, SSH, K8s, REST).

Overview

L8Collector is a multi-protocol network data collection service built on the Layer 8 ecosystem and the Pollaris model. It provides a unified framework for collecting data from network devices and systems using SNMP, SSH, Kubernetes, REST/RESTCONF, and GraphQL. Target management is handled by the Pollaris framework.

Architecture

CollectorService
Main orchestrator with SLA support. Receives L8PTarget messages to start/stop polling devices.
ExecuteService
Remote job execution and distribution across cluster nodes. Falls back to routing jobs to other collector instances.
HostCollector
Per-host orchestrator. Creates protocol collectors, runs the 5-stage boot sequence, and executes scheduled jobs.
JobsQueue
Ordered list of scheduled jobs with cadence-based round-robin execution.
Aggregator
Batches collection results before forwarding to the parser service.

Protocol Collectors

All collectors implement the ProtocolCollector interface: Init, Connect, Exec, Disconnect, Online.

SNMPv2
Community-based auth, OID normalization, walks and gets, net-snmp fallback for timeout resilience
SSH
Username/password auth, command execution with prompt detection, session management
Kubernetes
kubectl-based collection, context-aware, base64 kubeconfig, $variable parameter substitution
REST/RESTCONF
HTTP/HTTPS with token and basic auth, GET/POST/PUT/PATCH/DELETE, certificate support
GraphQL
Query execution with API key and token auth, typed response handling

Data Flow

  1. Target Arrival -- L8PTarget POST creates HostCollectors
  2. Boot Sequence -- 5 stages of progressive device discovery
  3. Steady-State Polling -- JobsQueue executes jobs based on cadence intervals
  4. Result Aggregation -- Batched forwarding to parser service
  5. Remote Execution -- On-demand jobs routed to the correct collector instance

Scalability

1,000-2,000 devices per instance (conservative), up to 5,000-10,000 (optimistic)
1:1 host-to-goroutine mapping with per-protocol collectors
Thread-safe SyncMap for device management
Connection reuse across multiple jobs
Smooth first collection -- randomized initial timing prevents thundering herd
Horizontal scaling via Layer 8 service mesh with automatic failover

Boot Sequence

5-stage progressive device discovery (stages 00-04). Each stage builds on the previous, gradually discovering device capabilities, protocols, and polling configuration.