process-exporter icon indicating copy to clipboard operation
process-exporter copied to clipboard

Remove process group when namedprocess_namegroup_num_procs = 0

Open zviRosenfeldRedis opened this issue 1 year ago • 4 comments

I'm tracking processes that die after a while, and are never expected to come back. So I don't want these process groups to appear in the stats once the process dies. But in practice I continue seeing it (and namedprocess_namegroup_num_procs for it is 0). It only disappears when I restart process-exporter. Is there a way I can cause the process group to disappear when namedprocess_namegroup_num_procs for it is 0?

zviRosenfeldRedis avatar Nov 14 '23 13:11 zviRosenfeldRedis

Update: I merged a fix for this into a fork: https://github.com/RedisLabs/process-exporter. I added a flag remove-empty-groups, and if that flag is true we forget any group with no processes (default is false).

I also opened a PR back upstream to with my fix, but seeing how this repository wasn't updated since 2021, I doubt it's ever getting it...

zviRosenfeldRedis avatar Nov 20 '23 17:11 zviRosenfeldRedis

It seems to have been removed, but as time went on, the exporter's memory footprint increased.

Alex-wwei avatar Nov 28 '23 06:11 Alex-wwei

I pushed a fix into the repository that probably fixed the issue. (into this repository: https://github.com/RedisLabs/process-exporter). @Alex-wwei, can you confirm if the bug was indeed fixed?

zviRosenfeldRedis avatar Nov 28 '23 08:11 zviRosenfeldRedis

I pushed a fix into the repository that probably fixed the issue. (into this repository: https://github.com/RedisLabs/process-exporter). @Alex-wwei, can you confirm if the bug was indeed fixed?

@zviRosenfeldRedis It`s much better now, But there may still be a slight increase in memory due to the constant changes in the process。

Alex-wwei avatar Nov 30 '23 02:11 Alex-wwei