process
Reference for the `process` collector.
process· collector · runnanook doc processfor the same content in your terminal.
Status, CPU, and memory usage for a specific process.
Options
| Option | Type | Default | Description |
|---|---|---|---|
pid | string | — | process ID to monitor (one of pid or name is required) |
name | string | — | substring matched against process name (one of pid or name is required) |
Metrics
| Metric | Kind | Unit | Description |
|---|---|---|---|
process.status | bool | — | true if the process is running. Labels: pid, process. |
process.state | enum | — | process state label. Labels: pid, process. |
process.cpu | numeric | % | CPU usage percentage. Labels: pid, process. |
process.mem | numeric | bytes | resident memory in bytes. Labels: pid, process. |
Examples
Watchdog for nginx
[[]]
= "nginx"
= "process"
= 10
[]
= "nginx"
Process gone
[[]]
= 'nginx::process.status is "false"'
= 1
= "ops"
= { = 120, = "oncall" }
Memory bloat in a worker
[[]]
= "worker"
= "process"
= 30
[]
= "myapp-worker"
[[]]
= "worker::process.mem > 1GiB"
= 3
= "ops"
= "{{ labels.process }} pid {{ labels.pid }} using {{ value }}"