Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose internal metrics at default localhost:8888 address #5706

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
jinja2 marked this conversation as resolved.
Show resolved Hide resolved
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
6 changes: 2 additions & 4 deletions tests/general/default_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func TestDefaultGatewayConfig(t *testing.T) {
"scrape_interval": "10s",
"static_configs": []any{
map[string]any{
"targets": []any{fmt.Sprintf("%s:8888", ip)},
"targets": []any{"0.0.0.0:8888"},
},
},
},
Expand All @@ -177,7 +177,6 @@ func TestDefaultGatewayConfig(t *testing.T) {
},
},
"service": map[string]any{
"telemetry": map[string]any{"metrics": map[string]any{"address": fmt.Sprintf("%s:8888", ip)}},
"extensions": []any{"health_check", "http_forwarder", "zpages"},
"pipelines": map[string]any{
"logs": map[string]any{
Expand Down Expand Up @@ -369,7 +368,7 @@ func TestDefaultAgentConfig(t *testing.T) {
"scrape_interval": "10s",
"static_configs": []any{
map[string]any{
"targets": []any{fmt.Sprintf("%s:8888", ip)},
"targets": []any{"0.0.0.0:8888"},
},
},
},
Expand All @@ -382,7 +381,6 @@ func TestDefaultAgentConfig(t *testing.T) {
"nop": nil,
},
"service": map[string]any{
"telemetry": map[string]any{"metrics": map[string]any{"address": fmt.Sprintf("%s:8888", ip)}},
"extensions": []any{"health_check", "http_forwarder", "zpages", "smartagent"},
"pipelines": map[string]any{
"logs": map[string]any{
Expand Down
Loading