2022-05-19 00:31:34 +08:00
|
|
|
# Monitor process cpu and memory usage
|
|
|
|
|
[[inputs.procstat]]
|
|
|
|
|
## PID file to monitor process
|
|
|
|
|
pid_file = "/var/run/nginx.pid"
|
|
|
|
|
## executable name (ie, pgrep <exe>)
|
|
|
|
|
# exe = "nginx"
|
|
|
|
|
## pattern as argument for pgrep (ie, pgrep -f <pattern>)
|
|
|
|
|
# pattern = "nginx"
|
|
|
|
|
## user as argument for pgrep (ie, pgrep -u <user>)
|
|
|
|
|
# user = "nginx"
|
|
|
|
|
## Systemd unit name, supports globs when include_systemd_children is set to true
|
|
|
|
|
# systemd_unit = "nginx.service"
|
|
|
|
|
# include_systemd_children = false
|
|
|
|
|
## CGroup name or path, supports globs
|
|
|
|
|
# cgroup = "systemd/system.slice/nginx.service"
|
2023-11-14 07:11:31 +08:00
|
|
|
## Supervisor service names of hypervisorctl management
|
|
|
|
|
# supervisor_units = ["webserver", "proxy"]
|
2022-05-19 00:31:34 +08:00
|
|
|
|
|
|
|
|
## Windows service name
|
|
|
|
|
# win_service = ""
|
|
|
|
|
|
|
|
|
|
## override for process_name
|
|
|
|
|
## This is optional; default is sourced from /proc/<pid>/status
|
|
|
|
|
# process_name = "bar"
|
|
|
|
|
|
|
|
|
|
## Field name prefix
|
|
|
|
|
# prefix = ""
|
|
|
|
|
|
|
|
|
|
## Mode to use when calculating CPU usage. Can be one of 'solaris' or 'irix'.
|
|
|
|
|
# mode = "irix"
|
|
|
|
|
|
2023-12-01 07:23:35 +08:00
|
|
|
## Add the given information tag instead of a field
|
|
|
|
|
## This allows to create unique metrics/series when collecting processes with
|
|
|
|
|
## otherwise identical tags. However, please be careful as this can easily
|
|
|
|
|
## result in a large number of series, especially with short-lived processes,
|
|
|
|
|
## creating high cardinality at the output.
|
|
|
|
|
## Available options are:
|
|
|
|
|
## cmdline -- full commandline
|
|
|
|
|
## pid -- ID of the process
|
|
|
|
|
## ppid -- ID of the process' parent
|
|
|
|
|
## status -- state of the process
|
|
|
|
|
## user -- username owning the process
|
|
|
|
|
# tag_with = []
|
|
|
|
|
|
2022-05-19 00:31:34 +08:00
|
|
|
|
|
|
|
|
## Method to use when finding process IDs. Can be one of 'pgrep', or
|
|
|
|
|
## 'native'. The pgrep finder calls the pgrep executable in the PATH while
|
|
|
|
|
## the native finder performs the search directly in a manor dependent on the
|
|
|
|
|
## platform. Default is 'pgrep'
|
|
|
|
|
# pid_finder = "pgrep"
|