Skip to content

Commit f24ee91

Browse files
committed
fix + reformat linux/macos collector commands
1 parent 03731b2 commit f24ee91

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/quickstart/self-managed/hosts_vms.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,25 @@ The quick start for Hosts / VMs with a self-managed Elastic Stack will guide you
2626
*Linux*
2727

2828
```bash
29-
ELASTICSEARCH_ENDPOINT=<ELASTICSEARCH_ENDPOINT> \
30-
ELASTIC_API_KEY=<ELASTIC_API_KEY> \
31-
rm ./otel.yml && cp ./otel_samples/logs_metrics_traces.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i 's#\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i 's#\${env:ELASTIC_ENDPOINT}#$ELASTICSEARCH_ENDPOINT' ./otel.yml && sed -i 's/\${env:ELASTIC_API_KEY}/$ELASTIC_API_KEY/g' ./otel.yml
29+
ELASTICSEARCH_ENDPOINT=<ELASTICSEARCH_ENDPOINT> && \
30+
ELASTIC_API_KEY=<ELASTIC_API_KEY> && \
31+
cp ./otel_samples/logs_metrics_traces.yml ./otel.yml && \
32+
mkdir -p ./data/otelcol && \
33+
sed -i "s#\${env:STORAGE_DIR}#${PWD}/data/otelcol#g" ./otel.yml && \
34+
sed -i "s#\${env:ELASTIC_ENDPOINT}#${ELASTICSEARCH_ENDPOINT}#g" ./otel.yml && \
35+
sed -i "s#\${env:ELASTIC_API_KEY}#$ELASTIC_API_KEY#g" ./otel.yml
3236
```
3337

3438
*MacOS*
3539

3640
```bash
37-
ELASTICSEARCH_ENDPOINT=<ELASTICSEARCH_ENDPOINT> \
38-
ELASTIC_API_KEY=<ELASTIC_API_KEY> \
39-
rm ./otel.yml && cp ./otel_samples/logs_metrics_traces.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i '' 's#\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i '' 's#\${env:ELASTIC_ENDPOINT}#'"$ELASTICSEARCH_ENDPOINT"'#g' ./otel.yml && sed -i '' 's#\${env:ELASTIC_API_KEY}#'"$ELASTIC_API_KEY"'#g' ./otel.yml
41+
ELASTICSEARCH_ENDPOINT=<ELASTICSEARCH_ENDPOINT> && \
42+
ELASTIC_API_KEY=<ELASTIC_API_KEY> && \
43+
cp ./otel_samples/logs_metrics_traces.yml ./otel.yml && \
44+
mkdir -p ./data/otelcol && \
45+
sed -i '' "s#\${env:STORAGE_DIR}#${PWD}/data/otelcol#g" ./otel.yml && \
46+
sed -i '' "s#\${env:ELASTIC_ENDPOINT}#${ELASTICSEARCH_ENDPOINT}#g" ./otel.yml && \
47+
sed -i '' "s#\${env:ELASTIC_API_KEY}#${ELASTIC_API_KEY}#g" ./otel.yml
4048
```
4149

4250
*Windows*

0 commit comments

Comments
 (0)