Skip to content

Commit

Permalink
Split the logs pipeline in the default configuration
Browse files Browse the repository at this point in the history
Split the logs pipeline in the default configuration in a way that profiling data is always sent to Splunk Observability endpoint while other logs can be sent to another hec endpoint configured with `SPLUNK_HEC_URL` and `SPLUNK_HEC_TOKEN` environment variables.
  • Loading branch information
dmitryax committed Jul 10, 2023
1 parent bcaef3c commit 6cc59ef
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- (Splunk) Add bundled collectd/nginx Smart Agent receiver discovery rules ([#3321](https://github.com/signalfx/splunk-otel-collector/pull/3321))
- (Splunk) Support custom `--discovery-properties` file ([#3334](https://github.com/signalfx/splunk-otel-collector/pull/3334))
- (Splunk) Add `--discovery` to the Linux installer script ([#3365](https://github.com/signalfx/splunk-otel-collector/pull/3365))
- (Splunk) Starting from this version the logs pipeline is split in the default configuration in a way that profiling
data is always sent to Splunk Observability endpoint while other logs can be sent to another hec endpoint configured
with `SPLUNK_HEC_URL` and `SPLUNK_HEC_TOKEN` environment variables ([#3330](https://github.com/signalfx/splunk-otel-collector/pull/3330))

## v0.80.0

Expand Down
10 changes: 7 additions & 3 deletions cmd/otelcol/config/collector/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ exporters:
endpoint: "${SPLUNK_HEC_URL}"
source: "otel"
sourcetype: "otel"
profiling_data_enabled: false
# Profiling
splunk_hec/profiling:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false
# Send to gateway
otlp:
endpoint: "${SPLUNK_GATEWAY_URL}:4317"
Expand Down Expand Up @@ -181,15 +187,13 @@ service:
receivers: [signalfx, smartagent/processlist]
processors: [memory_limiter, batch, resourcedetection]
exporters: [signalfx]
# Use instead when sending to gateway
#exporters: [otlp]
logs:
receivers: [fluentforward, otlp]
processors:
- memory_limiter
- batch
- resourcedetection
#- resource/add_environment
exporters: [splunk_hec]
exporters: [splunk_hec, splunk_hec/profiling]
# Use instead when sending to gateway
#exporters: [otlp]
16 changes: 10 additions & 6 deletions cmd/otelcol/config/collector/ecs_ec2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,18 @@ exporters:
access_token: "${SPLUNK_ACCESS_TOKEN}"
realm: "${SPLUNK_REALM}"
correlation:
# Logs + Profiling
# Logs
splunk_hec:
token: "${SPLUNK_HEC_TOKEN}"
endpoint: "${SPLUNK_HEC_URL}"
source: "otel"
sourcetype: "otel"
profiling_data_enabled: false
# Profiling
splunk_hec/profiling:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false

service:
extensions: [health_check, http_forwarder, zpages, memory_ballast]
Expand All @@ -145,7 +151,7 @@ service:
- memory_limiter
- batch
- resourcedetection
# - resource/add_environment
#- resource/add_environment
exporters: [sapm, signalfx]
metrics:
receivers: [hostmetrics, signalfx, smartagent/signalfx-forwarder, smartagent/ecs-metadata]
Expand All @@ -161,7 +167,5 @@ service:
- memory_limiter
- batch
- resourcedetection
#- resource/add_environment
exporters: [splunk_hec]
# Use instead when sending to gateway
#exporters: [otlp]
#- resource/add_environment
exporters: [splunk_hec, splunk_hec/profiling]
16 changes: 10 additions & 6 deletions cmd/otelcol/config/collector/fargate_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,18 @@ exporters:
access_token: "${SPLUNK_ACCESS_TOKEN}"
realm: "${SPLUNK_REALM}"
correlation:
# Logs + Profiling
# Logs
splunk_hec:
token: "${SPLUNK_HEC_TOKEN}"
endpoint: "${SPLUNK_HEC_URL}"
source: "otel"
sourcetype: "otel"
profiling_data_enabled: false
# Profiling
splunk_hec/profiling:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false

service:
extensions: [health_check, http_forwarder, zpages, memory_ballast]
Expand All @@ -119,7 +125,7 @@ service:
- memory_limiter
- batch
- resourcedetection
# - resource/add_environment
#- resource/add_environment
exporters: [sapm, signalfx]
metrics:
receivers: [signalfx, smartagent/signalfx-forwarder, smartagent/ecs-metadata, prometheus/internal]
Expand All @@ -131,7 +137,5 @@ service:
- memory_limiter
- batch
- resourcedetection
#- resource/add_environment
exporters: [splunk_hec]
# Use instead when sending to gateway
#exporters: [otlp]
#- resource/add_environment
exporters: [splunk_hec, splunk_hec/profiling]
23 changes: 18 additions & 5 deletions cmd/otelcol/config/collector/gateway_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,18 @@ exporters:
access_token: "${SPLUNK_ACCESS_TOKEN}"
realm: "${SPLUNK_REALM}"
sync_host_metadata: true
# Debug
#logging:
#verbosity: detailed
# Logs
splunk_hec:
token: "${SPLUNK_HEC_TOKEN}"
endpoint: "${SPLUNK_HEC_URL}"
source: "otel"
sourcetype: "otel"
profiling_data_enabled: false
# Profiling
splunk_hec/profiling:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false

service:
extensions: [health_check, http_forwarder, zpages, memory_ballast]
Expand All @@ -129,7 +138,11 @@ service:
receivers: [prometheus/internal]
processors: [memory_limiter, batch, resourcedetection/internal]
exporters: [signalfx/internal]
logs:
receivers: [otlp, signalfx]
logs/signalfx:
receivers: [signalfx]
processors: [memory_limiter, batch]
exporters: [signalfx]
logs:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [splunk_hec, splunk_hec/profiling]

0 comments on commit 6cc59ef

Please sign in to comment.