Skip to content

[chore][hostmetricsreceiver] Fix example config: uptime scraper renamed to system#46149

Merged
dmitryax merged 2 commits into
open-telemetry:mainfrom
osullivandonal:fix-hostmetricsreceiver-example-config
Feb 18, 2026
Merged

[chore][hostmetricsreceiver] Fix example config: uptime scraper renamed to system#46149
dmitryax merged 2 commits into
open-telemetry:mainfrom
osullivandonal:fix-hostmetricsreceiver-example-config

Conversation

@osullivandonal
Copy link
Copy Markdown
Contributor

Description

The hostmetricsreceiver uptime scraper was renamed to system awhile ago, see #36123 . However, the sample config was never updated to match this, if the users uses uptime in their config the collector will not run as the uptime scraper is no longer present, this scraper has been renamed to system.

Using uptime

Config
extensions:
  zpages:
    endpoint: 0.0.0.0:55679

receivers:
  hostmetrics:
    collection_interval: 1m
    scrapers:
      ...
      uptime:

exporters:
  debug:
  prometheus:
    endpoint: 0.0.0.0:8889

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      exporters: [prometheus, debug]

  extensions: [zpages]
Output
opentelemetry-collector-contrib main  ✗ make run otelcontribcol
cd ./cmd/otelcontribcol && GO111MODULE=on go run --race . --config ../../local/config.yaml
Error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):

'receivers' error reading configuration for "hostmetrics": '' invalid scraper key: uptime
exit status 1
make: *** [Makefile:359: run] Error 1

Fix

Use system instead of uptime, this is only an issue with the example-config.yaml for hostmetrics, this work just renames uptime to system.

The hostmetricsreceiver uptime scraper was renamed to system awhile ago.
However, the sample config was never updated to match this, if the users
uses `uptime` in their config the collector will not run as the `uptime`
scraper is no longer present, this scraper has been renamed to system.
@github-actions github-actions Bot requested a review from rogercoll February 17, 2026 15:25
@dmitryax dmitryax merged commit ed83b12 into open-telemetry:main Feb 18, 2026
192 of 194 checks passed
@osullivandonal osullivandonal deleted the fix-hostmetricsreceiver-example-config branch February 18, 2026 08:58
geekdave pushed a commit to oso-team/opentelemetry-collector-contrib that referenced this pull request Feb 20, 2026
…ed to system (open-telemetry#46149)

#### Description

The hostmetricsreceiver `uptime` scraper was renamed to system awhile
ago, see open-telemetry#36123 . However, the sample config was never updated to match
this, if the users uses `uptime` in their config the collector will not
run as the `uptime` scraper is no longer present, this scraper has been
renamed to system.

#### Using uptime

##### Config

```yaml
extensions:
  zpages:
    endpoint: 0.0.0.0:55679

receivers:
  hostmetrics:
    collection_interval: 1m
    scrapers:
      ...
      uptime:

exporters:
  debug:
  prometheus:
    endpoint: 0.0.0.0:8889

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      exporters: [prometheus, debug]

  extensions: [zpages]
```

##### Output

```bash
opentelemetry-collector-contrib main  ✗ make run otelcontribcol
cd ./cmd/otelcontribcol && GO111MODULE=on go run --race . --config ../../local/config.yaml
Error: failed to get config: cannot unmarshal the configuration: decoding failed due to the following error(s):

'receivers' error reading configuration for "hostmetrics": '' invalid scraper key: uptime
exit status 1
make: *** [Makefile:359: run] Error 1
```

#### Fix

Use `system` instead of uptime, this is only an issue with the
[example-config.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/example_config.yaml?plain=1#L18)
for hostmetrics, this work just renames `uptime` to `system`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants