The Service Map for APM is here!

Why don't I see the 'system.processes.open_file_descriptors' metric?

Users that enable the process check in a Datadog Agent running on a Linux OS 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 (dd-agent). The user doesn’t have full access to all files in /proc, which is where the Agent looks to collect data for this metric.

Users can enable the try_sudo option in the process check configuration and add the appropriate sudoers rules:

dd-agent ALL=NOPASSWD: /bin/ls /proc/*/fd/

This allows the process check to use sudo to execute the ls command but only to the list of contents of the path /proc/*/fd/.

If users see this line in the Datadog error.log: sudo: sorry, you must have a tty to run sudo, users should visudo and comment out the line Default requiretty.

If you are running Agent v6 less than 6.3, try updating the Agent and using the try_sudo option. If you are unable to update, a workaround for this issue is running the Agent as root.

NOTE: It is not recommended to run 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, but it isn’t recommended to run 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 via the GitHub repository.

  1. Stop the Agent

  2. Open /etc/systemd/system/multi-user.target.wants/datadog-agent.service and change the user​ attribute under [Service]

  3. Start the Agent

If you are running Agent v5, try updating to the latest version of Agent 6 and using the try_sudo option. If you are unable to update, a workaround for this issue is running the Agent as root.

NOTE: It is not recommended to run 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, but it isn’t recommended to run 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 via the GitHub repository.

  1. Stop the Agent

  2. Open /etc/dd-agent/supervisor.conf and replace dd-agent with root on line 20 and line 30. Do this again if you upgrade or reinstall the Agent.

  3. Start the Agent

See the following GitHub issues for more information and other potential methods of capturing this metric on Linux machines.

Table of Contents