You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--configd`| none | disabled | Whether to enable `config.d` functionality for final Collector config content. |
47
+
|`--config-dir`|`SPLUNK_CONFIG_DIR`|`/etc/otel/collector/config.d`| The root `config.d` directory to walk for component directories and yaml mapping files. |
48
+
|`--dry-run`| none | disabled | Whether to report the final assembled config contents to stdout before immediately exiting. This can be used with or without `config.d`|
49
+
50
+
To source only `config.d` content and not an additional or default configuration file, the `--config` option or
51
+
`SPLUNK_CONFIG` environment variable must be set to `/dev/null` or an arbitrary empty file:
52
+
53
+
```bash
54
+
$ # run the Collector without a config file using components from a local ./config.d config directory,
55
+
$ # printing the config to stdout before exiting instead of starting the Collector service:
2023/02/24 19:54:23 settings.go:331: Set config to [/dev/null]
58
+
2023/02/24 19:54:23 settings.go:384: Set ballast to 168 MiB
59
+
2023/02/24 19:54:23 settings.go:400: Set memory limit to 460 MiB
60
+
exporters:
61
+
logging:
62
+
verbosity: detailed
63
+
otlp:
64
+
endpoint: 1.2.3.4:2345
65
+
extensions:
66
+
health_check:
67
+
path: /health
68
+
zpages:
69
+
endpoint: 0.0.0.0:1234
70
+
processors:
71
+
batch: {}
72
+
resourcedetection:
73
+
detectors:
74
+
- system
75
+
receivers:
76
+
otlp:
77
+
protocols:
78
+
grpc: null
79
+
service:
80
+
pipelines:
81
+
metrics:
82
+
exporters:
83
+
- logging
84
+
receivers:
85
+
- otlp
86
+
```
87
+
88
+
## Discovery Mode
89
+
90
+
This component also provides a `--discovery [--dry-run]` option compatible with `config.d` that attempts to instantiate
91
+
any `.discovery.yaml` receivers using corresponding `.discovery.yaml` observers in a "preflight" Collector service.
92
+
Discovery mode will:
93
+
94
+
1. Load and attempt to start any observers in `config.d/extensions/<name>.discovery.yaml`.
95
+
1. Load and attempt to start any receiver blocks in `config.d/receivers/<name>.discovery.yaml` in a
96
+
[Discovery Receiver](../../receiver/discoveryreceiver/README.md) instance to receive discovery events from all
97
+
successfully started observers.
98
+
1. Wait 10s or the configured `SPLUNK_DISCOVERY_DURATION` environment variable [`time.Duration`](https://pkg.go.dev/time#ParseDuration).
99
+
1. Embed any receiver instances' configs resulting in a `discovery.status` of `successful` inside a `receiver_creator/discovery` receiver's configuration to be passed to the final Collector service config (or outputted w/ `--dry-run`).
100
+
1. Log any receiver resulting in a `discovery.status` of `partial` with the configured guidance for setting any relevant discovery properties.
101
+
1. Stop all temporary components before continuing on to the actual Collector service (or exiting early with `--dry-run`).
102
+
103
+
104
+
By default, the Discovery mode is provided with pre-made discovery config components in [`bundle.d`](./bundle/README.md).
0 commit comments