106 lines
4.3 KiB
Text
106 lines
4.3 KiB
Text
# 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"
|
|
## Supervisor service names of hypervisorctl management
|
|
# supervisor_units = ["webserver", "proxy"]
|
|
|
|
## 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"
|
|
|
|
## 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
|
|
## socket only options:
|
|
## protocol -- protocol type of the process socket
|
|
## state -- state of the process socket
|
|
## src -- source address of the process socket (non-unix sockets)
|
|
## src_port -- source port of the process socket (non-unix sockets)
|
|
## dest -- destination address of the process socket (non-unix sockets)
|
|
## dest_port -- destination port of the process socket (non-unix sockets)
|
|
## name -- name of the process socket (unix sockets only)
|
|
## Available for procstat_lookup:
|
|
## level -- level of the process filtering
|
|
# tag_with = []
|
|
|
|
## Properties to collect
|
|
## Available options are
|
|
## cpu -- CPU usage statistics
|
|
## limits -- set resource limits
|
|
## memory -- memory usage statistics
|
|
## mmap -- mapped memory usage statistics (caution: can cause high load)
|
|
## sockets -- socket statistics for protocols in 'socket_protocols'
|
|
# properties = ["cpu", "limits", "memory", "mmap"]
|
|
|
|
## Protocol filter for the sockets property
|
|
## Available options are
|
|
## all -- all of the protocols below
|
|
## tcp4 -- TCP socket statistics for IPv4
|
|
## tcp6 -- TCP socket statistics for IPv6
|
|
## udp4 -- UDP socket statistics for IPv4
|
|
## udp6 -- UDP socket statistics for IPv6
|
|
## unix -- Unix socket statistics
|
|
# socket_protocols = ["all"]
|
|
|
|
## 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"
|
|
|
|
## New-style filtering configuration (multiple filter sections are allowed)
|
|
# [[inputs.procstat.filter]]
|
|
# ## Name of the filter added as 'filter' tag
|
|
# name = "shell"
|
|
#
|
|
# ## Service filters, only one is allowed
|
|
# ## Systemd unit names (wildcards are supported)
|
|
# # systemd_units = []
|
|
# ## CGroup name or path (wildcards are supported)
|
|
# # cgroups = []
|
|
# ## Supervisor service names of hypervisorctl management
|
|
# # supervisor_units = []
|
|
# ## Windows service names
|
|
# # win_service = []
|
|
#
|
|
# ## Process filters, multiple are allowed
|
|
# ## Regular expressions to use for matching against the full command
|
|
# # patterns = ['.*']
|
|
# ## List of users owning the process (wildcards are supported)
|
|
# # users = ['*']
|
|
# ## List of executable paths of the process (wildcards are supported)
|
|
# # executables = ['*']
|
|
# ## List of process names (wildcards are supported)
|
|
# # process_names = ['*']
|
|
# ## Recursion depth for determining children of the matched processes
|
|
# ## A negative value means all children with infinite depth
|
|
# # recursion_depth = 0
|