How alexises/prometheus-enhanced-snmp-exporter works
Prometheus Enhanced SNMP exporter polls configured hosts and OIDs, converts results into cached template, label, and metric state, then exposes metrics through either a Prometheus HTTP endpoint or InfluxDB writes. The main workflow is configured and coordinated in the package entry point; scheduled SNMP collection owns cache and output updates. README capabilities include concurrent collection, caching, label conversion, VRF-aware queries, and both output drivers. Source excerpts are partial, so undocumented implementation links are omitted.
Main entry points: __init__.py Exporter startup · snmp.py SNMP querier · prometheus.py Prometheus driver · influxdb.py InfluxDB driver
Components 14
Configuration
- Config parser
prometheus_enhanced_snmp_exporter/config.py - Exporter startup
prometheus_enhanced_snmp_exporter/__init__.py
SNMP collection
- SNMP querier
prometheus_enhanced_snmp_exporter/snmp.py - OID converter
prometheus_enhanced_snmp_exporter/snmp.py
Cache and scheduling
- Job scheduler
prometheus_enhanced_snmp_exporter/scheduler.py - Template cache
prometheus_enhanced_snmp_exporter/storage.py - Label and join cache
prometheus_enhanced_snmp_exporter/storage.py
Metric output
- Output driver contract
prometheus_enhanced_snmp_exporter/driver.py - Prometheus driver
prometheus_enhanced_snmp_exporter/prometheus.py - InfluxDB driver
prometheus_enhanced_snmp_exporter/influxdb.py
Other components
- Operator
- SNMP hosts
- Prometheus scraper
- InfluxDB service
Connections 21
- Operator → Exporter startup: starts exporter
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → Config parser: parses settings
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → Job scheduler: creates scheduler
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → SNMP querier: creates querier
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → Template cache: creates cache
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → Label and join cache: creates cache
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → Output driver contract: selects output
prometheus_enhanced_snmp_exporter/__init__.py - SNMP querier → SNMP hosts: queries hosts
README.md - SNMP querier → OID converter: converts results
prometheus_enhanced_snmp_exporter/snmp.py - SNMP querier → Template cache: updates templates
prometheus_enhanced_snmp_exporter/snmp.py - SNMP querier → Label and join cache: resolves labels
prometheus_enhanced_snmp_exporter/snmp.py - SNMP querier → Job scheduler: schedules refresh
prometheus_enhanced_snmp_exporter/snmp.py - SNMP querier → Output driver contract: updates metrics
prometheus_enhanced_snmp_exporter/snmp.py - Exporter startup → Prometheus driver: serves output
prometheus_enhanced_snmp_exporter/__init__.py - Exporter startup → InfluxDB driver: selects driver
prometheus_enhanced_snmp_exporter/__init__.py - Prometheus driver → Prometheus scraper: serves scrape endpoint
README.md - Prometheus driver → Label and join cache: dumps cache
prometheus_enhanced_snmp_exporter/prometheus.py - InfluxDB driver → InfluxDB service: writes batches
prometheus_enhanced_snmp_exporter/influxdb.py - Prometheus driver → Output driver contract: implements interface
prometheus_enhanced_snmp_exporter/prometheus.py - InfluxDB driver → Output driver contract: implements interface
prometheus_enhanced_snmp_exporter/influxdb.py - InfluxDB driver → Job scheduler: uses scheduler
prometheus_enhanced_snmp_exporter/influxdb.py