go.d/sd: enable dyncfg integration and update config format (#21730)
Ilya Mashchenko committed
Feb 10, 2026 at 17:26 UTC
be56b5de5c30d7dd9f997eaa1f0c8747e14eafe6
4 files changed
+47
-49
src/go/plugin/go.d/agent/discovery/sd/sd.go
+1
-1
@@ -28,7 +28,7 @@ var isTerminal = isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsTerminal(os.Stdin
28
// When true (default): templates are not registered, file configs auto-start without dyncfg.
29
// When false: full dyncfg integration (used in tests).
30
// TODO: Remove this flag after SD dyncfg feature is validated in production.
31
-var disableDyncfg = true
31
+var disableDyncfg = false
32
33
type Config struct {
34
ConfigDefaults confgroup.Registry
src/go/plugin/go.d/config/go.d/sd/docker.conf
+3
-4
@@ -2,10 +2,9 @@ disabled: no
2
3
name: 'docker'
4
5
-discover:
6
- - discoverer: docker
7
- docker:
8
- address: "unix:///var/run/docker.sock"
5
+discoverer:
6
+ docker:
7
+ address: "unix:///var/run/docker.sock"
8
9
services:
10
- id: "skip"
src/go/plugin/go.d/config/go.d/sd/net_listeners.conf
+1
-1
@@ -4,7 +4,7 @@ name: 'network listeners'
4
5
6
discoverer:
7
- net_listeners: {}
7
+ net_listeners: { }
8
9
services:
10
- id: "activemq"
src/go/plugin/go.d/config/go.d/sd/snmp.conf
+42
-43
@@ -8,55 +8,54 @@ disabled: yes
8
9
name: 'snmp'
10
11
-discover:
12
- - discoverer: snmp
13
- snmp:
14
- ## how often to scan the networks for devices (default: 30m)
15
- ## Set to 0 to perform a single discovery scan and exit
16
- #rescan_interval: "30m"
11
+discoverer:
12
+ snmp:
13
+ ## how often to scan the networks for devices (default: 30m)
14
+ ## Set to 0 to perform a single discovery scan and exit
15
+ #rescan_interval: "30m"
16
18
- ## the maximum time to wait for SNMP device responses (default: 1s)
19
- #timeout: "1s"
17
+ ## the maximum time to wait for SNMP device responses (default: 1s)
18
+ #timeout: "1s"
19
21
- ## How long to trust cached discovery results before requiring a new probe (default: 12h)
22
- ## Set to 0 to never expire cached results (devices will never be re-probed once discovered)
23
- #device_cache_ttl: "12h"
20
+ ## How long to trust cached discovery results before requiring a new probe (default: 12h)
21
+ ## Set to 0 to never expire cached results (devices will never be re-probed once discovered)
22
+ #device_cache_ttl: "12h"
23
25
- ## how many IPs to scan concurrently within each subnet (default: 32)
26
- #parallel_scans_per_network: 32
24
+ ## how many IPs to scan concurrently within each subnet (default: 32)
25
+ #parallel_scans_per_network: 32
26
28
- ## ==========================================================
29
- ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN CREDENTIALS BELOW
30
- ## The example credentials will not work in most environments
31
- ## ==========================================================
32
- credentials:
33
- - name: "public-v2c"
34
- version: "2"
35
- community: "public"
27
+ ## ==========================================================
28
+ ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN CREDENTIALS BELOW
29
+ ## The example credentials will not work in most environments
30
+ ## ==========================================================
31
+ credentials:
32
+ - name: "public-v2c"
33
+ version: "2"
34
+ community: "public"
35
37
- - name: "secure-v3"
38
- version: "3"
39
- ## one of: "noAuthNoPriv", "authNoPriv", or "authPriv"
40
- security_level: "authPriv"
41
- username: "admin"
42
- ## one of: "md5", "sha", "sha224", "sha256", "sha384", "sha512"
43
- auth_protocol: "sha"
44
- auth_password: "secret123"
45
- ## one of: "des", "aes", "aes192", "aes256", "aes192C", "aes256C"
46
- priv_protocol: "aes"
47
- priv_password: "encrypt123"
36
+ - name: "secure-v3"
37
+ version: "3"
38
+ ## one of: "noAuthNoPriv", "authNoPriv", or "authPriv"
39
+ security_level: "authPriv"
40
+ username: "admin"
41
+ ## one of: "md5", "sha", "sha224", "sha256", "sha384", "sha512"
42
+ auth_protocol: "sha"
43
+ auth_password: "secret123"
44
+ ## one of: "des", "aes", "aes192", "aes256", "aes192C", "aes256C"
45
+ priv_protocol: "aes"
46
+ priv_password: "encrypt123"
47
49
- ## ========================================================
50
- ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN NETWORKS BELOW
51
- ## By default, no networks will be scanned until configured
52
- ## Maximum size is limited to 512 IPs per subnet (/23 CIDR)
53
- ## ========================================================
54
- networks:
55
- ## Subnet is the IP range to scan, supporting various formats:
56
- ## https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/iprange#supported-formats
57
- - subnet: "192.168.1.0/24"
58
- ## Credential is the name of a credential from the Credentials list
59
- credential: "public-v2c"
48
+ ## ========================================================
49
+ ## IMPORTANT: YOU MUST CONFIGURE YOUR OWN NETWORKS BELOW
50
+ ## By default, no networks will be scanned until configured
51
+ ## Maximum size is limited to 512 IPs per subnet (/23 CIDR)
52
+ ## ========================================================
53
+ networks:
54
+ ## Subnet is the IP range to scan, supporting various formats:
55
+ ## https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/iprange#supported-formats
56
+ - subnet: "192.168.1.0/24"
57
+ ## Credential is the name of a credential from the Credentials list
58
+ credential: "public-v2c"
59
60
services:
61
- id: "snmp"