Documentation forAppOptics

Processes

Overview

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.

This integration was updated to V2 plugin framework. If you are still using depreciated way of configuring it, please refer to Linux or Windows documentation.

Setup

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.

Configuration

  1. Edit processes task file with desired settings:

    On Windows:

    Copy
    > C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-processes.yaml

    On Linux:

    Copy
    $ /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-processes.yaml

     

    Copy
    ---
    version: 2
     
    schedule:
     type: simple
     interval: "60s"
     
    plugins:
     - plugin_name: processes
       config:
         ## Processes aggregation/grouping option. Default value is system.
         ## possible options:
         # aggregation: system
         ##   reports kthreadd/svchost.exe 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
         ##   NOTE: sum aggregation should *NOT* be used with publisher-processes, but can be safely used with
         ##         other publishers (eg publisher-appoptics)
         ##
         ## Timeout for gathering processes information. Default value is 30s.
         # processes_check_timeout: "30s"
         ##
         ## Regexp used to sanitize command by replacing common sensitive information (eg. passwords) with "***"
         ## If commented out, the default will be used.
         ## If set to empty string, command string will not be sanitized. This might be useful for improving performance but is discouraged as it may affect security.
         # sanitize_command_regexp: ""
         ##
         ## Number of workers spawned to fetch processes metrics. Default value is 10.
         # workers_count: 10
     
       metrics:
         - /processes/[process_name]/cpu
         - /processes/[process_name]/memory
         - /processes/[process_name]/count
         - /processes/[process_name]/uptime
     
       publish:
       - plugin_name: publisher-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 or svchost.exe and all of their 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.

    It should not be used with publisher-processes, but can be safely used with other publishers (eg publisher-appoptics)

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge plugin in debug mode:

On Windows:

Copy
> C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-processes.exe --debug-mode --plugin-config "{}"

On Linux:

Copy
$ /opt/SolarWinds/Snap/bin/snap-plugin-collector-processes --debug-mode --plugin-config "{}"

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 file to avoid breaking your Host View in AppOptics and at the same time add it to the tasks-autoload.d:

    On Windows, using Explorer or PowerShell:

    Copy
    > copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-processes-as-metrics-v2.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-processes-as-metrics-v2.yaml.yaml"

    On Linux using command line:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-processes-as-metrics-v2.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-processes-as-metrics-v2.yaml.yaml
  2. Edit task-processes-as-metrics-v2.yaml.yaml configuration file by changing the publisher plugin name to publisher-appoptics:

    Copy
    ---
    version: 2

    schedule:
      type: simple
      interval: "60s"

    plugins:
      - plugin_name: processes
        config:
          ## Processes aggregation/grouping option. Default value is system.
          ## possible options:
          # aggregation: system
          ##   reports kthreadd/svchost.exe 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
          ##   NOTE: sum aggregation should *NOT* be used with publisher-processes, but can be safely used with
          ##         other publishers (eg publisher-appoptics)      
          ##
          ## Timeout for gathering processes information. Default value is 30s.
          # processes_check_timeout: "30s"
          ##
          ## Regexp used to sanitize command by replacing common sensitive information (eg. passwords) with "***"
          ## If commented out, the default will be used.
          ## If set to empty string, command string will not be sanitized. This might be useful for improving performance but is discouraged as it may affect security.
          # sanitize_command_regexp: ""
          ##
          ## Number of workers spawned to fetch processes metrics. Default value is 10.
          # workers_count: 10

        metrics:
          - /processes/[process_name]/cpu
          - /processes/[process_name]/memory
          - /processes/[process_name]/count
          - /processes/[process_name]/uptime

        publish:
        - plugin_name: publisher-appoptics
  3. Restart the agent:

    On Windows command line:

    Copy
    > net stop swisnapd
    > net start swisnapd

    On Linux command line:

    Copy
    $ sudo service swisnapd restart
  4. 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.

Metrics and Tags

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

Troubleshooting

Timeout For Querying Processes Statistics

If you encounter issues with timeouts collecting processes metrics, you can use processes_check_timeout setting. By default it is set to 30s.

When the APM Integrated Experience is enabled, AppOptics shares a common navigation and settings with the other integrated experiences' products. How you navigate AppOptics and access its features may vary from these instructions. For more information, go to the APM Integrated Experience documentation.

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.