How to register an SNMP device type

In the current setting, a type of device using SNMP is configured by uploading MIBs and defining a MeasurementDevice custom resource. The operator generates SNMP module config (snmp.yml) and triggers a reload of chantico-snmp. In our First use-case (see goal.md) this corresponds to the registerPDU phase.

  1. Upload the MIBS:
  2. Port-forward the filebrowser
kubectl port-forward -n chantico deployment/chantico-filebrowser 18888:80
  1. Login with (user: admin, password: admin)
  2. Upload your MIBS files in snmp/mibs
  3. Create the MeasurementDevice matching the required type of MeasurementDevice
  4. Create a measurement_device.yaml file
apiVersion: chantico.ci.tno.nl/v1alpha1
kind: MeasurementDevice
metadata:
  labels:
    app.kubernetes.io/name: chantico
    app.kubernetes.io/managed-by: kustomize
  name: example-measurement-device
  namespace: chantico
spec:
  auth:
    community: public
    version: 2
  walks:
    - sdbDevInKWhTotal
  1. Apply the yaml file
kubectl apply -f measurement_device.yaml
  1. Verify the new device setting
  2. Wait for the SNMP generator job to complete
kubectl get jobs -n chantico | grep update-snmp
  1. The generated config is stored on the shared volume at snmp/yml/snmp.yml.
  2. Port-forward the SNMP exporter
kubectl port-forward -n chantico deployment/chantico-snmp 9116:9116
  1. Check that the config (http://localhost:9116/config) include the registered device as a module