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

Beat names longer than 16 characters break the process stats reporting #21297

Closed
eirc opened this issue Sep 24, 2020 · 3 comments
Closed

Beat names longer than 16 characters break the process stats reporting #21297

eirc opened this issue Sep 24, 2020 · 3 comments
Assignees
Labels
bug Team:Services (Deprecated) Label for the former Integrations-Services team

Comments

@eirc
Copy link

eirc commented Sep 24, 2020

For confirmed bugs, please report:

  • Version: 7.3.1
  • Operating System: Linux
  • Steps to Reproduce: Create a new beat with a name longer than 16 characters, run it. You'll get errors like:
DEBUG   [processes]     process/process.go:480  Process name does not matches the provided regex; pid=XXX; name=<ONLY THE FIRST 16 LETTERS OF THE BEAT NAME>: <nil>
ERROR   instance/metrics.go:92  Error while getting memory usage: error retrieving process stats: cannot find matching process for pid=XXX

The problem is in libbeat/metric/system/process/process.go#L487 where a check is made to ensure it has the right process. It checks the name of the process against the name given by elastic/go-sysinfo. The later one is taken from /proc/<pid>/comm which only provides the first 16 bytes of a process name. (I'm not sure where the other process name is taken from, I think from gosigar? but I got a bit lost in there)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 24, 2020
@andresrc andresrc added the Team:Services (Deprecated) Label for the former Integrations-Services team label Sep 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 24, 2020
@andresrc andresrc added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 24, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 24, 2020
@fearful-symmetry
Copy link
Contributor

Fix here: #22550

@andresrc andresrc added the bug label Nov 12, 2020
@fearful-symmetry
Copy link
Contributor

Fix has been merged, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

No branches or pull requests

4 participants