System architecture

The system overview shows the main components of Chantico, while the SNMP lifecycle below explains how a generated configuration reaches the exporter.

System overview

Start with the three custom resources above the controller and follow the flow downward. Solid arrows show configuration or metric flow and dashed arrows show reconciliation triggers or lifecycle actions. Green highlights SNMP configuration and export, the generation lifecycle is detailed in the next diagram.

The three custom resources drive different parts of the configuration:

Resource Controller output
MeasurementDevice SNMP generator input, Job, and exporter configuration
PhysicalMeasurement ScrapeConfig describing a scrape target
DataCenterResource PrometheusRule with energy-accounting recording rules

PromQL template ConfigMaps are optional inputs for DataCenterResource expressions. Changes to a directly referenced template ConfigMap trigger reconciliation of the referring resources; the controller reads these ConfigMaps.

SNMP configuration lifecycle

Read from top to bottom for step-by-step SNMP configuration procedure. Each arrow points from the participant performing an action to its target. The ConfigMaps participant represents the three distinct configurations listed below the diagram. The Job reads a mounted ConfigMap; it does not write ConfigMaps or need Kubernetes API credentials.

Configuration and storage

Configuration ConfigMap Written by Read by
Generator input <device>-generator Controller Generator Job, through its read-only mount
Per-device SNMP fragment <device>-snmp Controller Controller, when merging
Merged SNMP config chantico-snmp-config Controller SNMP exporter, through its read-only mount
  1. The file browser manages MIBs in snmp/mibs/ on the shared data PVC. The generator mounts that directory read-only.
  2. The Job writes to snmp/output/<device-uid>/<generation>.yml on the same PVC. The device UID and generation keep results separate.
  3. After Job completion, the controller validates the file and persists the fragment ConfigMap before deleting the temporary output. Missing or invalid output does not replace the previous fragment; a failed ConfigMap write leaves the file available for retry.
  4. The controller merges the fragments and triggers an exporter rollout when the merged configuration changes. The exporter mounts only the merged ConfigMap, not the shared PVC or the individual fragments.