Skip to content

Commit

Permalink
Expose internal metrics at default localhost:8888 address
Browse files Browse the repository at this point in the history
Expose internal metrics at default `localhost:8888` address instead of `${SPLUNK_LISTEN_INTERFACE}:8888`

This can be changed by changing default values in `service::telemetry::metrics::section`:
```yaml
service:
  telemetry:
    metrics:
      readers:
        - pull:
            exporter:
              prometheus:
                host: localhost
                port: 8888
```
This also removes a warning about deprecated `service::telemetry::metrics::address`.
  • Loading branch information
dmitryax committed Dec 13, 2024
1 parent 82168c5 commit 9129fee
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@

- (Splunk) Automatic Discovery:
- Switch bundled NGINX discovery to create [OpenTelemetry NGINX receiver](https://docs.splunk.com/observability/en/gdi/opentelemetry/components/nginx-receiver.html#nginx-receiver) instead of the Smart Agent NGINX monitor ([#5689](https://github.com/signalfx/splunk-otel-collector/pull/5689))
- (Splunk) Expose internal metrics at default `localhost:8888` address instead of `${SPLUNK_LISTEN_INTERFACE}:8888` ([#5706](https://github.com/signalfx/splunk-otel-collector/pull/5706))
This can be changed in `service::telemetry::metrics` section:
```yaml
service:
telemetry:
metrics:
readers:
- pull:
exporter:
prometheus:
host: localhost
port: 8888
```
This also removes a warning about deprecated `service::telemetry::metrics::address`.

### 🚩Deprecations 🚩

Expand Down
5 changes: 1 addition & 4 deletions cmd/otelcol/config/collector/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ receivers:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ["${SPLUNK_LISTEN_INTERFACE}:8888"]
- targets: ["0.0.0.0:8888"]
metric_relabel_configs:
- source_labels: [ __name__ ]
regex: 'otelcol_rpc_.*'
Expand Down Expand Up @@ -166,9 +166,6 @@ exporters:
verbosity: detailed

service:
telemetry:
metrics:
address: "${SPLUNK_LISTEN_INTERFACE}:8888"
extensions: [health_check, http_forwarder, zpages, smartagent]
pipelines:
traces:
Expand Down
5 changes: 1 addition & 4 deletions cmd/otelcol/config/collector/gateway_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ receivers:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['${SPLUNK_LISTEN_INTERFACE}:8888']
- targets: ['0.0.0.0:8888']
metric_relabel_configs:
- source_labels: [ __name__ ]
regex: 'otelcol_rpc_.*'
Expand Down Expand Up @@ -127,9 +127,6 @@ exporters:
log_data_enabled: false

service:
telemetry:
metrics:
address: "${SPLUNK_LISTEN_INTERFACE}:8888"
extensions: [health_check, http_forwarder, zpages]
pipelines:
traces:
Expand Down
5 changes: 1 addition & 4 deletions cmd/otelcol/fips/config/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ receivers:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ["${SPLUNK_LISTEN_INTERFACE}:8888"]
- targets: ["0.0.0.0:8888"]
metric_relabel_configs:
- source_labels: [ __name__ ]
regex: 'otelcol_rpc_.*'
Expand Down Expand Up @@ -156,9 +156,6 @@ exporters:
verbosity: detailed

service:
telemetry:
metrics:
address: "${SPLUNK_LISTEN_INTERFACE}:8888"
extensions: [health_check, http_forwarder, zpages]
pipelines:
traces:
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcol/fips/config/gateway_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ receivers:
- job_name: 'otel-collector'
scrape_interval: 10s
static_configs:
- targets: ['${SPLUNK_LISTEN_INTERFACE}:8888']
- targets: ['0.0.0.0:8888']
metric_relabel_configs:
- source_labels: [ __name__ ]
regex: 'otelcol_rpc_.*'
Expand Down

0 comments on commit 9129fee

Please sign in to comment.