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

cgroup memory reporting not working under Elastic Agent #42816

Open
strawgate opened this issue Feb 20, 2025 · 1 comment
Open

cgroup memory reporting not working under Elastic Agent #42816

strawgate opened this issue Feb 20, 2025 · 1 comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@strawgate
Copy link
Contributor

strawgate commented Feb 20, 2025

I dont think cgroup memory reporting is working, perhaps it's an issue with cgroupv2 but I don't even see the cgroup limit in the non-zero metrics that agent prints

a really simple

docker run -d --memory=1gb --cpus=0.5 -v ./standalone.yml:/usr/share/elastic-agent/elastic-agent.yml docker.elastic.co/elastic-agent/elastic-agent:8.17.1

shows

cat /sys/fs/cgroup/memory.max 
1073741824

but the non-zero part of the beat process stats reports

        "cgroup": {
          "cpu": {
            "stats": {
              "periods": 209,
              "throttled": { "ns": 1208259, "periods": 2 }
            }
          },
          "memory": { "mem": { "usage": { "bytes": 756224000 } } }
        },

and the beat-stats reports

 "beat": {
    "cgroup": {
      "cpu": {
        "id": "/",
        "stats": {
          "periods": 19245,
          "throttled": {
            "ns": 6772325269,
            "periods": 13658
          }
        }
      },
      "memory": {
        "id": "/",
        "mem": {
          "usage": {
            "bytes": 924114944
          }
        }
      }
    },

which appears to be missing max/limit

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 20, 2025
@botelastic
Copy link

botelastic bot commented Feb 20, 2025

This issue doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant