Monitoring Processes

This article will help you get the Processes plugin for sd-agent configured and returning metrics

Installing the processes plugin package

Install the processes plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-process

Install the processes plugin on RHEL/CentOS:

sudo yum install sd-agent-process

Read more about agent plugins.

Configuring the agent to monitor processes

1. Configure /etc/sd-agent/conf.d/process.yaml

init_config:
  # used to override the default procfs path, e.g. for docker
  # containers to see the processes of the host at /host/proc
  # procfs_path: /proc
instances:
  - name: ssh
    search_string: ['ssh', 'sshd']

  - name: postgres
    search_string: ['postgres']

  - name: pid_process
    pid: 1278
    # Do not use search_string when searching by pid or multiple processes will be grabbed

The above example config will monitor the ssh, sshd, and postgres processes and process ID 1278. More examples are also avaiable in the example configuration shipped with the plugin.

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

processes
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check process

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the processes metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
serverdensity.processes.not_running

/
Type: string
system.processes.cpu.pct

The process CPU utilization.
percent / None
Type: float
system.processes.instances

/
Type: int
system.processes.involuntary_ctx_switches

The number of involuntary context switches performed by this process.
event / None
Type: float
system.processes.ioread_bytes

The number of bytes read from disk by this process.
byte / None
Type: float
system.processes.ioread_count

The number of disk reads by this process.
read / None
Type: float
system.processes.iowrite_bytes

The number of bytes written to disk by this process.
byte / None
Type: float
system.processes.iowrite_count

The number of disk writes by this process.
write / None
Type: float
system.processes.mem.page_faults.children_major_faults

The number of major page faults per second for children of this process.
occurrence / second
Type: float
system.processes.mem.page_faults.children_minor_faults

The number of minor page faults per second for children of this process.
occurrence / second
Type: float
system.processes.mem.page_faults.major_faults

The number of major page faults per second for this process.
occurrence / second
Type: float
system.processes.mem.page_faults.minor_faults

The number of minor page faults per second for this process.
occurrence / second
Type: float
system.processes.mem.pct

The process memory consumption.
percent / None
Type: float
system.processes.mem.real

The non-swapped physical memory a process has used and cannot be shared with another process.
byte / None
Type: float
system.processes.mem.rss

The non-swapped physical memory a process has used. aka "Resident Set Size".
byte / None
Type: float
system.processes.mem.vms

The total amount of virtual memory used by the process. aka "Virtual Memory Size".
byte / None
Type: float
system.processes.number

The number of processes.
process / None
Type: float
system.processes.open_file_descriptors

The number of file descriptors used by this process.
None / None
Type: float
system.processes.open_handles

The number of handles used by this process.
None / None
Type: float
system.processes.threads

The number of threads used by this process.
thread / None
Type: float
system.processes.voluntary_ctx_switches

The number of voluntary context switches performed by this process.
event / None
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.