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

Fix processes collector long int parsing #2112

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Aug 5, 2021

Update procfs library to include ignored fields ParseInt handling.

Wrap error returns so that the user can know more about what failed.
Returns from getAllocatedThreads() are errors anyway.

Fixes: #2110

Signed-off-by: Ben Kochie superq@gmail.com

Update procfs library to include ignored fields ParseInt handling.

Wrap error returns so that the user can know more about what failed.
Returns from getAllocatedThreads() are errors anyway.

Fixes: #2110

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ force-pushed the superq/debug_processes_errors branch from 47e9b77 to 5d2a4cf Compare August 6, 2021 03:56
@SuperQ SuperQ changed the title Wrap error returns in proccesses collector Fix processes collector long int parsing Aug 6, 2021
@SuperQ SuperQ marked this pull request as ready for review August 6, 2021 03:57
@@ -118,8 +118,8 @@ func (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, er
level.Debug(c.logger).Log("msg", "file not found when retrieving stats for pid", "pid", pid, "err", err)
continue
}
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid, "err", err)
return 0, nil, 0, err
level.Debug(c.logger).Log("msg", "error reading stat for pid", "pid", pid.PID, "err", err)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can drop this debug line, as the return of this func is an error anyway.

@SuperQ SuperQ merged commit 584972d into master Aug 6, 2021
@SuperQ SuperQ deleted the superq/debug_processes_errors branch August 6, 2021 09:15
SuperQ added a commit that referenced this pull request Aug 6, 2021
* [BUGFIX] Fix processes collector long int parsing #2112

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Aug 6, 2021
SuperQ added a commit that referenced this pull request Aug 6, 2021
* [BUGFIX] Fix processes collector long int parsing #2112

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Aug 6, 2021
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* [BUGFIX] Fix processes collector long int parsing prometheus#2112

Signed-off-by: Ben Kochie <superq@gmail.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* [BUGFIX] Fix processes collector long int parsing prometheus#2112

Signed-off-by: Ben Kochie <superq@gmail.com>
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.

processes collector is broken after upgrade to 1.2.0
2 participants