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

Node Stats API returns string values for os.cgroup.memory stats #93429

Open
inqueue opened this issue Feb 1, 2023 · 3 comments
Open

Node Stats API returns string values for os.cgroup.memory stats #93429

inqueue opened this issue Feb 1, 2023 · 3 comments
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team

Comments

@inqueue
Copy link
Member

inqueue commented Feb 1, 2023

Elasticsearch Version

8.7.0-SNAPSHOT

Installed Plugins

No response

Java Version

bundled

OS Version

Ubuntu 20.04

Problem Description

Actual

The Node Stats API returns string values for os.cgroup.memory.limit_in_bytes and os.cgroup.memory.usage_in_bytes. Other cgroup stats are numeric as expected; only memory is affected.

Expected

Return numeric values for os.cgroup.memory.limit_in_bytes and os.cgroup.memory.usage_in_bytes.

Impact

Rally's node-stats telemetry device recursively walks node stats keys, returning only integer and float values.

Steps to Reproduce

GET /_nodes/stats?filter_path=**.os.cgroup.memory

    "0VowceokTa2yIegiCvFqAg": {
      "os": {
        "cgroup": {
          "memory": {
            "control_group": "/",
            "limit_in_bytes": "32000000000",
            "usage_in_bytes": "23180730368"
          }
        }
      }
    }

Logs (if relevant)

No response

@inqueue inqueue added >bug needs:triage Requires assignment of a team area label labels Feb 1, 2023
@inqueue
Copy link
Member Author

inqueue commented Feb 1, 2023

The docs state these two keys are intentionally strings. In light, I'll change the issue to an enhancement.

@inqueue inqueue added >enhancement :Core/Infra/Core Core issues without another label and removed >bug labels Feb 1, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Feb 1, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Feb 1, 2023
@grcevski
Copy link
Contributor

grcevski commented Feb 1, 2023

I think the issue is that long values in JSON don't translate well in certain programming languages. Namely, JavaScript internally uses double to represent longs, so not all long values can be correctly parsed. I think strings are the correct choice here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

3 participants