process
Use case
Confirm a service’s process is alive, and (optionally) report its memory/CPU
usage. Run cmt available process to list every running process’s name and
command line on this host, to help pick a psname/search_arg.
Configuration
| Field | Type | Meaning |
|---|---|---|
psname |
string | required - process name to match (as reported by the OS, e.g. sshd) |
search_arg |
string | optional - additionally require this exact string as one of the process’s command-line arguments (not a substring match); default: not checked |
Scans every running process for psname; if search_arg is also set, keeps
scanning past name-only matches until it finds one whose command line also
contains search_arg.
A process that’s found but whose memory/CPU stats can’t be read (e.g. a
root-owned process denying them to a non-root caller) is reported as its own
critical condition, distinct from “missing” - use root_required: yes (see
Configuration) if
that’s the case.
Output
| Item | Type | Meaning |
|---|---|---|
process_name |
string | the configured psname (tag) |
process_memory |
int (bytes) | RSS of the matched process (datapoint) |
process_cpu |
float (sec) | user CPU time of the matched process (datapoint) |
Example
checks:
- module: process
name: ssh
conf:
psname: sshd
#search_arg: "-D"