System process metricset
editSystem process metricset
editThe System process
metricset provides process statistics. One document is
provided for each process.
This metricset is available on:
- FreeBSD
- Linux
- macOS
- Windows
Configuration
edit-
processes
-
When the
process
metricset is enabled, you can use theprocesses
option to define a list of regexp expressions to filter the processes that are reported. For more complex filtering, you should use theprocessors
configuration option. See Processors for more information.The following example config returns metrics for all processes:
metricbeat.modules: - module: system metricsets: ["process"] processes: ['.*']
-
process.cgroups.enabled
-
When the
process
metricset is enabled, you can use this boolean configuration option to disable cgroup metrics. By default cgroup metrics collection is enabled.The following example config disables cgroup metrics on Linux.
metricbeat.modules: - module: system metricsets: ["process"] process.cgroups.enabled: false
-
process.cmdline.cache.enabled
-
This metricset caches the command line args
for a running process by default. This means if you alter the command line for a
process while this metricset is running, these changes are not detected. Caching
can be disabled by setting
process.cmdline.cache.enabled: false
in the configuration. -
process.env.whitelist
-
This metricset can collect the environment variables that were used to start the process. This feature is available on Linux, Darwin, and FreeBSD. No environment variables are collected by default because they could contain sensitive information. You must configure the environment variables that you wish to collect by specifying a list of regular expressions that match the variable name.
metricbeat.modules: - module: system metricsets: ["process"] process.env.whitelist: - '^PATH$' - '^SSH_.*'
-
process.include_cpu_ticks
-
By default the cumulative CPU tick values are not reported by this metricset (only percentages are reported). Setting this option to true will enable the reporting of the raw CPU tick values (for user, system, and total CPU time).
metricbeat.modules: - module: system metricsets: ["process"] process.include_cpu_ticks: true
-
process.include_per_cpu
- By default metrics per cpu are reported when available. Setting this option to false will disable the reporting of these metrics.
-
process.include_top_n
-
These options allow you to filter out all processes
that are not in the top N by CPU or memory, in order to reduce the number of
documents created. If both the
by_cpu
andby_memory
options are used, the union of the two sets is included. -
process.include_top_n.enabled
-
Set to false to disable the top N feature
and include all processes, regardless of the other options. The default is
true
, but nothing is filtered unless one of the other options (by_cpu
orby_memory
) is set to a non-zero value. -
process.include_top_n.by_cpu
-
How many processes to include from the top
by CPU. The processes are sorted by the
system.process.cpu.total.pct
field. The default is 0. -
process.include_top_n.by_memory
-
How many processes to include from the top
by memory. The processes are sorted by the
system.process.memory.rss.bytes
field. The default is 0.
This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.
Fields
editFor a description of each field in the metricset, see the exported fields section.
Here is an example document generated by this metricset:
{ "@timestamp": "2017-10-12T08:05:34.853Z", "agent": { "hostname": "host.example.com", "name": "host.example.com" }, "event": { "dataset": "system.process", "duration": 115000, "module": "system" }, "metricset": { "name": "process" }, "process": { "args": [ "/usr/bin/dockerd", "-H", "unix://" ], "executable": "/usr/bin/dockerd-ce", "name": "dockerd", "pgid": 2080, "pid": 2080, "ppid": 1, "working_directory": "/" }, "service": { "type": "system" }, "system": { "process": { "cgroup": { "blkio": { "id": "docker.service", "path": "/system.slice/docker.service", "total": { "bytes": 844576104448, "ios": 54869430 } }, "cpu": { "cfs": { "period": { "us": 100000 }, "quota": { "us": 0 }, "shares": 1024 }, "id": "docker.service", "path": "/system.slice/docker.service", "rt": { "period": { "us": 0 }, "runtime": { "us": 0 } }, "stats": { "periods": 0, "throttled": { "ns": 0, "periods": 0 } } }, "cpuacct": { "id": "docker.service", "path": "/system.slice/docker.service", "percpu": { "1": 7058282754012, "2": 7053634662537, "3": 7069386293853, "4": 7050055153087 }, "stats": { "system": { "ns": 7202920000000 }, "user": { "ns": 19573240000000 } }, "total": { "ns": 28231358863489 } }, "id": "docker.service", "memory": { "id": "docker.service", "kmem": { "failures": 0, "limit": { "bytes": 9223372036854771712 }, "usage": { "bytes": 21139456, "max": { "bytes": 480030720 } } }, "kmem_tcp": { "failures": 0, "limit": { "bytes": 9223372036854771712 }, "usage": { "bytes": 0, "max": { "bytes": 0 } } }, "mem": { "failures": 0, "limit": { "bytes": 9223372036854771712 }, "usage": { "bytes": 3337703424, "max": { "bytes": 5245300736 } } }, "memsw": { "failures": 0, "limit": { "bytes": 0 }, "usage": { "bytes": 0, "max": { "bytes": 0 } } }, "path": "/system.slice/docker.service", "stats": { "active_anon": { "bytes": 779677696 }, "active_file": { "bytes": 1753378816 }, "cache": { "bytes": 2127810560 }, "hierarchical_memory_limit": { "bytes": 9223372036854771712 }, "hierarchical_memsw_limit": { "bytes": 0 }, "inactive_anon": { "bytes": 409075712 }, "inactive_file": { "bytes": 374431744 }, "major_page_faults": 53164, "mapped_file": { "bytes": 7491584 }, "page_faults": 21923702, "pages_in": 57261049, "pages_out": 56521859, "rss": { "bytes": 1188753408 }, "rss_huge": { "bytes": 56623104 }, "swap": { "bytes": 0 }, "unevictable": { "bytes": 0 } } }, "path": "/system.slice/docker.service" }, "cmdline": "/usr/bin/dockerd -H unix://", "cpu": { "start_time": "2019-01-08T17:06:39.000Z", "total": { "norm": { "pct": 0.0049 }, "pct": 0.0195, "value": 27827810 } }, "fd": { "limit": { "hard": 1048576, "soft": 1048576 }, "open": 68 }, "memory": { "rss": { "bytes": 1187336192, "pct": 0.0716 }, "share": 8253440, "size": 4438523904 }, "state": "sleeping" } }, "user": { "name": "root" } }