Steps to Reproduce: We are running some pre-release testing for Elastic Defend and hit the following error in our policy validation testing since the 8.16.0 BC when running sudo /Library/Elastic/Agent/elastic-agent status:
Still applying policy. Agent status:
┌─ fleet
│ └─ status: (HEALTHY) Connected
└─ elastic-agent
├─ status: (DEGRADED) 1 or more components/units in a degraded state
├─ endpoint-default
│ ├─ status: (HEALTHY) Healthy: communicating with endpoint service
│ ├─ endpoint-default
│ │ └─ status: (STARTING) Starting: endpoint service runtime
│ └─ endpoint-default-d25430f8-9b3b-4bcd-a05b-b8cb1af7837f
│ └─ status: (STARTING) Starting: endpoint service runtime
└─ system/metrics-default
├─ status: (HEALTHY) Healthy: communicating with pid '3571'
└─ system/metrics-default-system/metrics-system-e0c4530d-82d3-4b34-98f0-7f68e16dfa1e
└─ status: (DEGRADED) Error fetching data for metricset system.process: process stats: error gathering PIDs: FillPidMetrics: error fetching string data from process: error reading process information from KERN_PROCARGS2: %!w(<nil>)
sudo /Library/Elastic/Agent/elastic-agent status
:We appear to be hitting https://github.com/elastic/elastic-agent-system-metrics/blob/65ce6bcf259701b36c14e3f4e631940e9aa90efd/metric/system/process/process_darwin.go#L233