# Monitoring specific processes via Elastic Agent?

**URL:** <https://discuss.elastic.co/t/monitoring-specific-processes-via-elastic-agent/350037>\
**Category:** Elastic Agent\
**Created:** [December 27, 2023, 10:32pm UTC](https://discuss.elastic.co/t/monitoring-specific-processes-via-elastic-agent/350037 "2023-12-27T22:32:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 12, 2024, 6:17pm UTC](https://discuss.elastic.co/t/monitoring-specific-processes-via-elastic-agent/350037/3 "2024-01-12T18:17:28Z")

</div>

Hi @jerrac

I have not looked closely... but if you want to monitor specific processes, you should not have Top N set at all... Either Specific Process OR Top N, not Both...

I have not done this with an agent but I have with Metricbeat. Should be the same logic...

Can you share the whole setting?

Not probably what you want to hear.. .but I might try with metricbeat first which is easier to debug then set the same for agent.

Perhaps take a quick look at

> [@Metricbeat doesn't recognize the process](https://discuss.elastic.co/t/metricbeat-doesnt-recognize-the-process/263176):
>
> HI, I have configured metricbeat to check the process status. I have noticed that it doesn't get the process info sometimes even if the process was running. It is possible that the process was not active some times but still running. What could be the possible reason ? Please suggest.

Update: With Agent

I also get your are trying to set Top N to a big number but that is not how I would do it.

First I would empty Top N (not set to 0) - I just tried this in Agent that seem to be the correct way.

Then, collect all processes and see if you see the processes you expect.

Then, narrow with regex

 ![Screenshot 2024-01-12 at 10.36.23 AM](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ffbf36bafb4b259bab047695645d78e213de586e.png)

---

_[View the full topic](https://discuss.elastic.co/t/monitoring-specific-processes-via-elastic-agent/350037)._
