Skip to content

Commit 90579e8

Browse files
author
Ryan Fitzpatrick
committed
Full adopt default collectd config directory
1 parent 528ceb8 commit 90579e8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cmd/otelcol/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN mkdir -p "$(dirname "/usr/lib/splunk-otel-collector/agent-bundle")" && \
2525

2626
FROM scratch
2727
ENV SPLUNK_BUNDLE_DIR=/usr/lib/splunk-otel-collector/agent-bundle
28-
ENV SPLUNK_COLLECTD_DIR=$SIGNALFX_BUNDLE_DIR/run/collectd
28+
ENV SPLUNK_COLLECTD_DIR=${SPLUNK_BUNDLE_DIR}/run/collectd
2929
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
3030
COPY --from=otelcol /otelcol /
3131
# Maintaining interpreter location as required.

internal/extension/smartagentextension/factory.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func createDefaultConfig() config.Extension {
7373
}
7474
cfg.BundleDir = bundleDir
7575
cfg.Collectd.BundleDir = bundleDir
76+
cfg.Collectd.ConfigDir = filepath.Join(bundleDir, "run", "collectd")
77+
7678
return &Config{
7779
ExtensionSettings: config.ExtensionSettings{
7880
TypeVal: typeStr,

internal/receiver/smartagentreceiver/receiver_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func TestSmartAgentConfigProviderOverrides(t *testing.T) {
327327
IntervalSeconds: 10,
328328
WriteServerIPAddr: "127.9.8.7",
329329
WriteServerPort: 0,
330-
ConfigDir: "/etc/",
330+
ConfigDir: "/opt/run/collectd",
331331
BundleDir: "/opt/",
332332
HasGenericJMXMonitor: false,
333333
InstanceName: "",

internal/receiver/smartagentreceiver/testdata/extension_config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ extensions:
66
readThreads: 1
77
writeThreads: 4
88
writeQueueLimitHigh: 5
9-
configDir: /etc/
109
smartagent/extra:
1110
bundleDir: /opt/
1211
collectd:
1312
timeout: 10
1413
readThreads: 1
1514
writeThreads: 4
1615
writeQueueLimitHigh: 5
17-
configDir: /etc/
1816

1917
receivers:
2018
nop:

0 commit comments

Comments
 (0)