How robotneo/networkdevice-monitor works
Project type and purpose
• This is a specialized monitoring/alerting stack for network devices (switches, wireless LAN controllers, firewalls, etc.) using Prometheus, SNMP Exporter, Grafana, and VictoriaMetrics.
• It includes a “generator” CLI tool that consumes MIB files and vendor templates to produce SNMP‐Exporter scrape configs (snmp.yml), plus ready‐made Prometheus alerting rules and full deployment manifests for VictoriaMetrics clusters, Prometheus, Grafana dashboards, Alertmanager, vmalert/vmagent/vmauth, and promxy.
File structure
• Top level:
• generator/ – MIBs, per-vendor generator.yml files, and the Go‐based generator utility
• prometheus/ – alerting rules broken out by environment (prod, vm)
• victoriametrics/ – binaries, cluster/docker-compose and provisioning for VM services (vminsert, vmselect, vmstorage, vmalert, vmagent, vmauth, Alertmanager, Grafana dashboards)
• promxy/ – a Prometheus proxy with its own alert rules, dashboards, and compose setup
Extract architecture insights from README
• The generator produces SNMP Exporter configs from MIBs.
• SNMP Exporter runs as a long-running service on a Linux host, exposing device metrics.
• Prometheus scrapes SNMP Exporter; uses supplied rules to fire alerts.
• VictoriaMetrics (single or clustered) is the long-term store.
• Grafana presents dashboards; vmalert sends PromQL-driven alerts to Alertmanager; Alertmanager delivers notifications.
• promxy can sit between Prometheus and VictoriaMetrics as a caching proxy.
Main components & their interactions
a. Network devices (SNMP agents)
b. generator CLI + MIB/templates → outputs snmp.yml
c. SNMP Exporter service (reads snmp.yml, serves metrics)
d. Prometheus server (scrapes SNMP Exporter + other exporters, applies rules)
e. VictoriaMetrics storage cluster (vminsert, vmselect, vmstorage) or single node
f. promxy (optional Prometheus/VictoriaMetrics proxy)
g. vmagent (optional remote write agent)
h. vmalert (PromQL alert runner) → Alertmanager
i. Grafana (dashboards + provisioning)
Data flows:
• Generator → SNMP Exporter config
• Devices →|SNMP|→ SNMP Exporter →|HTTP scrape|→ Prometheus →|remote_write / local|→ VictoriaMetrics
• Prometheus →|alerts|→ vmalert → Alertmanager →|notifications|→ external channels
• Grafana ←|queries|→ VictoriaMetrics / promxy
Architectural patterns & design principles
• Microservices via containerized components (each VM service, promxy, Grafana, Alertmanager runs in its own container or binary).
• Separation of concerns:
• Configuration generation (offline CLI)
• Metrics collection (SNMP Exporter)
• Scraping & rule evaluation (Prometheus, vmalert)
• Storage (VictoriaMetrics)
• Visualization & alert dispatching (Grafana, Alertmanager)
• Infrastructure as code: Docker Compose + provisioning YAMLs for dashboards & datasources.