@cryptotaxi247 / netdata-1 / commits / b06ddfede

docs(go.d/snmp): add multi-device SNMPv3 config example with YAML anchors (#21955)

Ilya Mashchenko committed Mar 16, 2026 at 22:54 UTC b06ddfede8c65e373bab0e0cc0e62a4e9945e13e
1 file changed +30
src/go/plugin/go.d/collector/snmp/metadata.yaml
+30
@@ -481,6 +481,36 @@ modules:
481 auth_key: auth_protocol_passphrase
482 priv_proto: aes256
483 priv_key: priv_protocol_passphrase
484 + - name: SNMPv3 with multiple devices
485 + description: |
486 + This example monitors multiple SNMP devices that share the same SNMPv3 credentials.
487 +
488 + It uses [YAML anchors](https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases) to define the
489 + full job once (`&snmp_v3_job`) and then reuse it with `<<: *snmp_v3_job`,
490 + overriding only `name` and `hostname` for each additional device.
491 + config: |
492 + jobs:
493 + - &snmp_v3_job
494 + name: switch1
495 + update_every: 10
496 + hostname: 192.0.2.1
497 + options:
498 + version: 3
499 + user:
500 + name: username
501 + level: authPriv
502 + auth_proto: sha256
503 + auth_key: auth_protocol_passphrase
504 + priv_proto: aes256
505 + priv_key: priv_protocol_passphrase
506 +
507 + - <<: *snmp_v3_job
508 + name: switch2
509 + hostname: 192.0.2.2
510 +
511 + - <<: *snmp_v3_job
512 + name: switch3
513 + hostname: 192.0.2.3
514 alerts: []
515 functions:
516 description: |