Network Intelligence and Auto-Remediation Platform
netmeta is a production-grade Go application that monitors and manages BGP, OSPF, and MPLS in multi-vendor network environments. It provides real-time monitoring, topology visualization, and automated remediation capabilities.
- π BGP Monitoring: Real-time peer state tracking, prefix counting, and flap detection using GoBGP
- π OSPF Topology: Live packet parsing and in-memory topology graph construction
- π·οΈ MPLS Validation: Label stack validation and corruption detection
- π€ Auto-Remediation: Rule-based engine for automatic network issue resolution
- π Prometheus Metrics: Comprehensive metrics export for monitoring
- π₯οΈ Web Dashboard: Real-time WebSocket-based UI with topology visualization
- π³ Container Ready: Docker and Kubernetes deployment configurations
- π Grafana Integration: Pre-configured dashboards for network metrics
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β netmeta Platform β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββ ββββββββββββ ββββββββββββ β
β β BGP β β OSPF β β MPLS β β
β β Monitor β β Parser β βValidator β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ β
β β β β β
β βββββββββββββββΌββββββββββββββ β
β β β
β ββββββββΌβββββββ β
β β Auto-Remed β β
β β Engine β β
β ββββββββ¬βββββββ β
β β β
β βββββββββββββββΌββββββββββββββ β
β β β β β
β ββββββΌβββββ ββββββΌβββββ ββββββΌβββββ β
β βPrometheusβ β Web β β API β β
β β Exporter β β UI β β Layer β β
β βββββββββββ βββββββββββ βββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Go 1.21 or later
- Docker (optional, for containerized deployment)
- Kubernetes cluster (optional, for K8s deployment)
git clone https://github.com/namesarnav/netmeta.git
cd netmeta
go mod download
go build -o netmeta ./cmd/netmetadocker build -t netmeta:latest -f deploy/docker/Dockerfile .
docker run -p 8080:8080 netmeta:latest servekubectl apply -f deploy/k8s/deployment.yamlCreate a config.yaml file (see config.yaml for example):
bgp:
peers:
- address: 10.0.0.1
asn: 65001
port: 179
ospf:
interface: eth0
pcap_file: capture.pcap
mpls:
enabled: true
auto:
enabled: true
flap_threshold: 3
flap_window_sec: 300
api:
host: 0.0.0.0
port: 8080
db:
path: /var/lib/netmeta# Start the server (API + UI)
netmeta serve
# List BGP peers
netmeta bgp peers
# Show OSPF topology
netmeta ospf topology
# Trigger manual remediation
netmeta remediate --peer 10.0.0.1 --reason flap
netmeta remediate --prefix 203.0.113.0/24 --reason rpki
# Show version
netmeta versionAccess the dashboard at: http://localhost:8080/dashboard
Features:
- Real-time BGP peer status
- Live OSPF topology graph
- Remediation event stream
- WebSocket-based updates
GET /api/v1/bgp/peers- List all BGP peersGET /api/v1/ospf/topology- Get OSPF topologyGET /api/v1/remediation/events- Get remediation eventsGET /metrics- Prometheus metricsGET /ws- WebSocket stream
Key metrics exported:
bgp_peer_up{peer="..."}- BGP peer up status (1=up, 0=down)bgp_prefix_count{peer="...", afi="ipv4"}- Prefix count per peerbgp_session_flaps_total{peer="..."}- Total session flapsmpls_corruption_events_total- MPLS corruption eventsnetmeta_remediation_total{reason="...", success="..."}- Remediation actions
The auto-remediation engine monitors network conditions and automatically triggers remediation actions:
- BGP Flaps: If a peer flaps more than 3 times in 5 minutes, all prefixes are withdrawn
- RPKI Invalid: Invalid prefixes are automatically withdrawn
- OSPF Adjacency: Down adjacencies trigger interface restarts
Rules can be configured in config.yaml:
auto:
enabled: true
flap_threshold: 3
flap_window_sec: 300Run the demo script to see netmeta in action:
./scripts/demo.shThis will:
- Start the netmeta server
- List BGP peers
- Show OSPF topology
- Trigger a remediation action
- Display access URLs
netmeta/
βββ cmd/netmeta/ # Main application entry point
βββ pkg/
β βββ api/ # REST + gRPC handlers
β βββ auto/ # Auto-remediation logic
β βββ bgp/ # GoBGP wrapper + monitoring
β βββ mpls/ # MPLS label validation
β βββ ospf/ # OSPF packet parser + topology
β βββ monitor/ # Prometheus exporter
β βββ ui/ # Gin + WebSocket dashboard
βββ internal/
β βββ config/ # Viper config
β βββ db/ # BadgerDB for state
β βββ telemetry/ # Event logging
βββ deploy/
β βββ docker/ # Dockerfile
β βββ k8s/ # Kubernetes manifests
β βββ grafana/ # Grafana dashboard
βββ scripts/ # Utility scripts
Use Containerlab or FRR in Docker to set up test BGP/OSPF peers:
# Example with FRR
docker run -d --name frr-router frrouting/frrdocker build -t netmeta:latest -f deploy/docker/Dockerfile .
docker run -d -p 8080:8080 \
-v $(pwd)/config.yaml:/etc/netmeta/config.yaml \
netmeta:latest servekubectl apply -f deploy/k8s/deployment.yamlThe deployment includes:
- 3 replicas for high availability
- Prometheus scraping annotations
- Health checks (liveness/readiness probes)
- ConfigMap for configuration
Import the dashboard from deploy/grafana/dashboard.json into your Grafana instance.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Built for Meta NPE (Network Production Engineering) interview demonstration.
Note: This is a demonstration project showcasing production-grade network tooling capabilities in Go.