File tree Expand file tree Collapse file tree 7 files changed +30
-20
lines changed
internal/buildscripts/packaging/fpm Expand file tree Collapse file tree 7 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ commands:
18
18
bin/otelcol_linux_arm64
19
19
bin/otelcol_linux_amd64
20
20
bin/otelcol_windows_amd64.exe
21
- dist/splunk-otel-collector_*.amd64 .deb
22
- dist/splunk-otel-collector_*.arm64 .deb
21
+ dist/splunk-otel-collector_*_amd64 .deb
22
+ dist/splunk-otel-collector_*_arm64 .deb
23
23
dist/splunk-otel-collector-*.arm64.rpm
24
24
dist/splunk-otel-collector-*.x86_64.rpm
25
25
steps :
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ SPLUNK_CONFIG_REPO_PATH="$REPO_DIR/cmd/otelcol/config/collector/splunk_config.ya
25
25
SPLUNK_CONFIG_INSTALL_PATH=" /etc/otel/collector/splunk_config.yaml"
26
26
OTLP_CONFIG_REPO_PATH=" $REPO_DIR /cmd/otelcol/config/collector/otlp_config.yaml"
27
27
OTLP_CONFIG_INSTALL_PATH=" /etc/otel/collector/otlp_config.yaml"
28
- SPLUNK_ENV_REPO_PATH=" $REPO_DIR /internal/buildscripts/packaging/fpm/ splunk_env.sh .example"
29
- SPLUNK_ENV_INSTALL_PATH=" /etc/otel/collector/splunk_env.sh. example"
28
+ SPLUNK_ENV_REPO_PATH=" $FPM_DIR / splunk_env.example"
29
+ SPLUNK_ENV_INSTALL_PATH=" /etc/otel/collector/splunk_env.example"
30
30
31
31
32
32
get_version () {
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
if command -v systemctl > /dev/null 2>&1 ; then
4
+ systemctl daemon-reload
4
5
systemctl enable splunk-otel-collector.service
5
6
# only start the service after package is installed if the environment file exists
6
- if [ -f /etc/otel/collector/splunk_env.sh ]; then
7
+ if [ -f /etc/otel/collector/splunk_env ]; then
7
8
systemctl start splunk-otel-collector.service
8
9
fi
9
10
fi
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ Description=Splunk OpenTelemetry Collector
3
3
After =network.target
4
4
5
5
[Service]
6
- EnvironmentFile =/etc/otel/collector/splunk_env.sh
7
- ExecStart =/usr/bin/otelcol --config /etc/otel/collector/splunk_config.yaml
6
+ EnvironmentFile =/etc/otel/collector/splunk_env
7
+ ExecStart =/usr/bin/otelcol $OTELCOL_OPTIONS
8
8
KillMode =mixed
9
9
Restart =on-failure
10
10
Type =simple
Original file line number Diff line number Diff line change
1
+ # Sample environment file for passing variables to the splunk-otel-collector service.
2
+ # See /etc/otel/collector/splunk_config.yaml for how these variables will be consumed.
3
+
4
+ # To use this file, update the values below appropriately,
5
+ # and save the changes to "/etc/otel/collector/splunk_env".
6
+
7
+ # Then run the following commands to apply the changes and restart the service:
8
+ # sudo systemctl daemon-reload
9
+ # sudo systemctl restart splunk-otel-collector.service
10
+
11
+ # Command-line options for the splunk-otel-collector service. Run `/usr/bin/otelcol --help` to see all available options.
12
+ OTELCOL_OPTIONS="--config /etc/otel/collector/splunk_config.yaml"
13
+
14
+ # Access token to authenticate requests.
15
+ SPLUNK_ACCESS_TOKEN=12345
16
+
17
+ # Which realm to send the data to.
18
+ SPLUNK_REALM=us0
19
+
20
+ # How much memory to allocate to the ballast. This should be set to 1/3 to 1/2 of configured memory.
21
+ SPLUNK_BALLAST=683
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if $docker_exec systemctl --no-pager status $SERVICE_NAME; then
50
50
fi
51
51
52
52
# start the service with the sample env file
53
- $docker_exec cp /etc/otel/collector/splunk_env.sh. example /etc/otel/collector/splunk_env.sh
53
+ $docker_exec cp /etc/otel/collector/splunk_env.example /etc/otel/collector/splunk_env
54
54
$docker_exec systemctl daemon-reload
55
55
$docker_exec systemctl start splunk-otel-collector.service
56
56
You can’t perform that action at this time.
0 commit comments