Users that enable the process check in a Datadog Agent running on Linux OSs notice that the
system.processes.open_file_descriptors metric is not collected or reported by default. This occurs when the process being monitored by the process check runs under a different user than the Agent - the
dd-agent user doesn’t have full access to all files in
/proc, which is where the Agent looks to collect data for this metric. A workaround for this can be achieved by running the Agent as
NOTE: We do not recommend running the Agent as
root; this isn’t specific to the Datadog Agent or due to any concern that something untrustworthy is happening in any way. Instead, we don’t recommend running the daemon as ‘root’ as this is best practice for most processes on Linux. If you have any personal cause for concern the Agent is open source and may be audited by you or your team if you’d like to review or build it from source yourselves.
That said, if you’re okay elevating the Datadog Agent privileges you could do the following:
/etc/systemd/system/multi-user.target.wants/datadog-agent.serviceand change the
rooton both of these lines (Do this again if you upgrade or reinstall the agent):
See the following Github issues for more info on this matter as well as other potential methods of capturing this metric on Linux machines.