Skip to content

Changes in PR #11093 Broke Disabling Internal Telemety For OSes On Which It Isn't Implemented (ie. AIX) #12098

Closed
@Dylan-M

Description

@Dylan-M

Describe the bug
Previously, I had the contrib collector running on AIX. However, after #11093, specifically this commit, this is now broken with the following error:

# ./collector_aix_ppc64 --config config.yaml
2025-01-14T13:20:29.921-0600    info    [email protected]/service.go:164 Setting up own telemetry...
2025-01-14T13:20:29.921-0600    info    [email protected]/service.go:207 Skipped telemetry setup.
Error: failed to register process metrics: not implemented yet
2025/01/14 13:20:29 collector server run finished with error: failed to register process metrics: not implemented yet

This is because the gopsutil library doesn't yet support AIX for these metrics.

I have this in my config, which should disable the internal telemetry, and as noted above previously worked:

    telemetry:
        metrics:
            level: none

Steps to reproduce
Build contrib for AIX (GOOS=AIX GOARCH=ppc64), scp binary to a suitable (I have 7.3 TL3) AIX system, and run it with the config below.

What did you expect to see?
A running collector.

What did you see instead?
Collector attempts to start, and this logged to stdout:

# ./collector_aix_ppc64 --config config.yaml
2025-01-14T13:20:29.921-0600    info    [email protected]/service.go:164 Setting up own telemetry...
2025-01-14T13:20:29.921-0600    info    [email protected]/service.go:207 Skipped telemetry setup.
Error: failed to register process metrics: not implemented yet
2025/01/14 13:20:29 collector server run finished with error: failed to register process metrics: not implemented yet

What version did you use?
v0.116.0

What config did you use?

receivers:
    filelog/clcomd:
        encoding: utf-8
        fingerprint_size: 1kb
        force_flush_period: 500ms
        include:
            - /var/log/clcomd/*
        include_file_name: true
        include_file_name_resolved: false
        include_file_path: false
        include_file_path_resolved: false
        max_concurrent_files: 1024
        max_log_size: 1MiB
        operators:
            - field: attributes.log_type
              type: add
              value: file
        poll_interval: 200ms
        retry_on_failure:
            enabled: false
        start_at: beginning
processors:
exporters:
    nop/BlackHole: null
service:
    pipelines:
        logs:
            receivers:
                - filelog/clcomd
            exporters:
                - nop/BlackHole
    telemetry:
        metrics:
            level: none

Environment
OS: AIX 7.3 TL3 Standard w/yum,dnf,xlc (can rented from SiteOx, if anyone needs to be able to rent a system for testing purposes)
Compiler: go version go1.23.4 linux/amd64
Using Collector Builder 0.116.0 cross building under Fedora Linux

Additional context
It has been an ongoing struggle to keep the collector working on AIX (and other UNIXes) with lack of due consideration on how changes might affect things when they're "not implemented" in the libraries for a given OS. This is a critical path for us. This previously happened with a change around using Flock(), for example.

I do plan on adding this capability to the gopsutil library so that it will be available in the future. I've been slowly working through enriching the AIX support in that library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions