# Not enough Privileges Elastic\_agent.metricbeat logs errors on Windows

**URL:** <https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321>\
**Category:** Elastic Agent\
**Created:** [December 23, 2024, 12:38pm UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321 "2024-12-23T12:38:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [December 23, 2024, 12:38pm UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/1 "2024-12-23T12:38:32Z")

</div>

Hello,

The elastic\_agent.metricbeat contains a lot of errors such as:

```auto
Error fetching data for metricset system.process_summary: Not enough privileges to fetch information: Not enough privileges to fetch information: GetInfoForPid: could not get all information for PID 0: error fetching name: OpenProcess failed for pid=0: The parameter is incorrect.
error fetching status: OpenProcess failed for pid=0: The parameter is incorrect.
GetInfoForPid: could not get all information for PID 4: error fetching name: GetProcessImageFileName failed for pid=4: GetProcessImageFileName failed: invalid argument
GetInfoForPid: could not get all information for PID 300: error fetching name: GetProcessImageFileName failed for pid=300: GetProcessImageFileName failed: invalid argument

```

and

```auto
Error fetching data for metricset system.process: Not enough privileges to fetch information: Not enough privileges to fetch information: GetInfoForPid: could not get all information for PID 0: error fetching name: OpenProcess failed for pid=0: The parameter is incorrect.
error fetching status: OpenProcess failed for pid=0: The parameter is incorrect.
GetInfoForPid: could not get all information for PID 4: error fetching name: GetProcessImageFileName failed for pid=4: GetProcessImageFileName failed: invalid argument
GetInfoForPid: could not get all information for PID 300: error fetching name: GetProcessImageFileName failed for pid=300: GetProcessImageFileName failed: invalid argument
non fatal error fetching PID some info for 348, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 1080, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 1336, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 1428, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 1504, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 1524, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: GetUserProcessParams failed: Invalid access to memory location.
non fatal error fetching PID some info for 1540, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: GetUserProcessParams failed: Access is denied.
non fatal error fetching PID some info for 3188, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 5644, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: GetUserProcessParams failed: Access is denied.
non fatal error fetching PID some info for 5680, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 14328, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 14180, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 2036, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 27984, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 26256, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.
non fatal error fetching PID some info for 18508, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.

```

This a on an Elastic Security serverless with Agent on a Windows Pro installed as Admin.

Willem

---

<div class="post-metadata">

**Author:** ![hermlam](https://avatars.discourse-cdn.com/v4/letter/h/8797f3/32.png) [@hermlam](https://discuss.elastic.co/u/hermlam)\
**Post date:** [December 28, 2024, 3:05am UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/2 "2024-12-28T03:05:02Z")

</div>

Same here for my Windows Servers (2019 and 2022) on and 'old' (non-serverless) Cloud environment. Errors since upgrading to 8.17.0

---

<div class="post-metadata">

**Author:** ![Eshwar\_K](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Eshwar\_K](https://discuss.elastic.co/u/Eshwar_K)\
**Post date:** [January 5, 2025, 4:57pm UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/3 "2025-01-05T16:57:08Z")

</div>

Hi @hermalam,

I am also facing same issue with fresh installation of elastic agent on windows 2019 server.

{"log.level":"error","@timestamp":"2025-01-05T22:25:14.332+0530","message":"Error fetching data for metricset system.process: Not enough privileges to fetch information: Not enough privileges to fetch information: GetInfoForPid: could not get all information for PID 0: error fetching name: OpenProcess failed for pid=0: The parameter is incorrect.\nerror fetching status: OpenProcess failed for pid=0: The parameter is incorrect.\nGetInfoForPid: could not get all information for PID 4: error fetching name: GetProcessImageFileName failed for pid=4: GetProcessImageFileName failed: invalid argument\nnon fatal error fetching PID some info for 172, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.\nnon fatal error fetching PID some info for 444, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.\nnon fatal error fetching PID some info for 584, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information: OpenProcess failed: Access is denied.\nnon fatal error fetching PID some info for 692, metrics are valid, but partial: FillMetricsRequiringMoreAccess: error fetching process args: Not enough privileges to fetch information:

If you have any solution kindly share with me that would be helpful for me.

Much Appreciated for your answers.

Regards,  
Eshwar

---

<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 5, 2025, 7:00pm UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/4 "2025-01-05T19:00:44Z")

</div>

Assuming you all read this...

> **[Install Elastic Agents | Fleet and Elastic Agent Guide \[8.17\] | Elastic](https://www.elastic.co/guide/en/fleet/current/elastic-agent-installation.html)**

I pinged internally to see if we get a response...

---

<div class="post-metadata">

**Author:** ![Eshwar\_K](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@Eshwar\_K](https://discuss.elastic.co/u/Eshwar_K)\
**Post date:** [January 6, 2025, 5:32am UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/5 "2025-01-06T05:32:40Z")

</div>

Yes, installation is done with Administrator user and single elastic agent has been installed on the server.

Regards,  
Eshwar

---

<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 6, 2025, 3:46pm UTC](https://discuss.elastic.co/t/not-enough-privileges-elastic-agent-metricbeat-logs-errors-on-windows/372321/6 "2025-01-06T15:46:15Z")

</div>

Here are some notes from internal...

> Some of these look like [[metricbeat/system][windows] - Metricbeat reports DEGRADED while running in privileged mode · Issue #40484 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/40484#issuecomment-2296095455) which looks like it was improved and will be in 8.17.1.It’s hard to say without knowing that all the PIDs in the discuss posts are Windows protected processes, but some of them are (e.g PID 4).
> 
> [Comment on #40484 [metricbeat/system][windows] - Metricbeat reports DEGRADED while running in privileged mode](https://github.com/elastic/beats/issues/40484#issuecomment-2296095455)
> 
> [@cmacknz](https://github.com/cmacknz) the errors reported are similar to [#40542 (comment)](https://github.com/elastic/beats/issues/40542#issue-2468808059) - id: system/metrics-default  
> state:  
> message: 'Healthy: communicating with pid ''1556'''  
> pid: 0  
> state: 2

> P.S. there has been a lot of improvement in this area and one of the improvements was making it so we can actually see this type of problem, likely this failure was happening silently in previous versions.
