Documentation forAppOptics

Processes

Solarwinds Snap Agent comes with Processes Collector preinstalled and enabled by default. It periodically lists system processes and gathers a few basic metrics for all of them. Normally you are not supposed to change anything here as this feature is used internally for the Host View with the collected processes data being handled by a dedicated publisher-processes.

Metrics

The following metrics are collected for each process:

Metric Description
cpu CPU usage of the process
memory Memory usage of the process
count Number of processes aggregated into one metric (depends on aggregation set)
uptime Total running time of the process (the longest one in case of aggregation)

Tags

The following tags are added to each metric:

Metric Description
process_user Name of the user who has started the process
process_id PID
process_parent_id PID of the parent process (if applicable)
process_name Name of the process

Configuration

Normally there's no need to touch this but if you want to play with the Processes Collector by yourself, you can change its configuration.

  1. Update configuration in /opt/SolarWinds/Snap/etc/task.d/task-processes.yaml task file with desired settings:
Copy
config:
  /processes:
    ## Processes aggregation/grouping option
    ## possible options:
    aggregation: system
    ##   reports kthreadd and all its children as one process
    # aggregation: noop
    ##   no grouping - passes all processes as read from OS
    # aggregation: sum
    ##   groups by user and binary name
    ##   sums CPU and memory usage, Count metric holds the number of aggregated processes

Aggregation

Processes Collector has an aggregation option implemented. It's intended to group processes prior to reporting them. Normally you don’t want to change those settings. Also keep in mind any changes are likely to affect the Host View in AppOptics.

Possible settings to be set in plugin configuration:

  • aggregation: system (default)

    reports kthreadd and all of its children as one process (summing up all metrics)

  • aggregation: noop

    no grouping - passes all processes as read from OS

  • aggregation: sum

    groups by user and binary name sums CPU and memory usage, Count metric holds the number of aggregated processes

Regular metrics reporting

Optionally, you can set Processes Collector for direct metrics reporting. For this, please follow the steps below.

  1. Make a copy of the default processes task configuration file to avoid breaking your Host View in AppOptics and at the same time add it to the autoload:
Copy
$ sudo cp /opt/SolarWinds/Snap/etc/tasks.d/task-processes.yaml /opt/SolarWinds/Snap/autoload/task-processes-as-metrics.yaml
  1. Update /opt/SolarWinds/Snap/autoload/task-processes-as-metrics.yaml configuration file by changing the publisher plugin name to publisher-appoptics:
Copy
---
version: 1
schedule:
  type: simple
  interval: "60s"
deadline: "55s"
workflow:
  collect:
    config:
      /processes:
        ## Processes aggregation/grouping option
        ## possible options:
        aggregation: system
        ##   reports kthreadd and all its children as one process
        # aggregation: noop
        ##   no grouping - passes all processes as read from OS
        # aggregation: sum
        ##   groups by user and binary name
        ##   sums CPU and memory usage, Count metric holds the number of aggregated processes
    metrics:
      /processes/*: {}
    publish:
    - plugin_name: publisher-appoptics
      config:
        period: 60
        floor_seconds: 60
  1. Restart the agent:
Copy
$ sudo service swisnapd restart
  1. Enable the Processes plugin in the AppOptics UI

On the Integrations Page you will see the Processes plugin available if the previous steps were successful. If you do not see the plugin, see Troubleshooting Linux.

Select the Processes plugin to open the configuration menu in the UI, and enable the plugin.

You should soon see the processes metrics reported to your dashboard.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.