Collect resource usage metrics for specific running processes on any host: CPU, memory, I/O, number of threads, etc.
Use Process Monitors: configure thresholds for how many instances of a specific process ought to be running and get alerts when the thresholds aren’t met (see Service Checks below).
The Process Check is included in the Datadog Agent package, so you don’t need to install anything else on your server.
Unlike many checks, the Process Check doesn’t monitor anything useful by default. You must configure which processes you want to monitor, and how.
While there’s no standard default check configuration, here’s an example process.d/conf.yaml that monitors SSH/SSHD processes. See the sample process.d/conf.yaml for all available configuration options:
init_config:instances:## @param name - string - required## Used to uniquely identify your metrics as they are tagged with this name in Datadog.#- name:ssh## @param search_string - list of strings - optional## If one of the elements in the list matches, it returns the count of## all the processes that match the string exactly by default. Change this behavior with the## parameter `exact_match: false`.#### Note: Exactly one of search_string, pid or pid_file must be specified per instance.#search_string:- ssh- sshd
Some process metrics require either running the Datadog collector as the same user as the monitored process or privileged access to be retrieved. Where the former option is not desired, and to avoid running the Datadog collector as `root`, the `try_sudo` option lets the Process Check try using `sudo` to collect this metric. As of now, only the `open_file_descriptors` metric on Unix platforms is taking advantage of this setting. Note: the appropriate sudoers rules have to be configured for this to work:
The number of major page faults per second for children of this process. Shown as occurrence
The process memory consumption. Shown as percent
The non-swapped physical memory a process has used and cannot be shared with another process (Linux only). Shown as byte
The non-swapped physical memory a process has used. aka "Resident Set Size". Shown as byte
The total amount of virtual memory used by the process. aka "Virtual Memory Size". Shown as byte
The number of processes. Shown as process
The number of file descriptors used by this process (only available for processes run as the dd-agent user)
The number of handles used by this process.
The number of threads used by this process. Shown as thread
The number of voluntary context switches performed by this process. Shown as event
The average running time of all instances of this process Shown as second
The longest running time of all instances of this process Shown as second
The shortest running time of all instances of this process Shown as second
The Process Check does not include any events.
process.up Returns OK if the check is within the warning thresholds, CRITICAL if it’s outside of the critical thresholds, and WARNING if it’s outside of the warning thresholds. Statuses: ok, warning, critical