Documentation forAppOptics

Publisher configuration

Overview

There are two main publisher plugins used by swisnapd:

  • publisher-appoptics - responsible for sending metrics gathered by the collectors to the AppOptics measurements backend. Such metrics are stored in AppOptics and follow standard retention rules.
  • publisher-processes - responsible for sending processes list (with CPU and Memory Utilization) to AppOptics. Processes details are not stored by default. Users need to mark selected processes as key process in AppOptics.

Their configuration is held in (by default):

  • <PATH>/publisher-appoptics.yaml
  • <PATH>/publisher-processes.yaml

where <PATH> is /opt/SolarWinds/Snap/etc/plugins.d on Linux or C:/ProgramData/SolarWinds/Snap/plugins.d on Windows.

Publisher configuration can also be modified (overwritten) in a task file, but usually this is not needed.

AppOptics Publisher configuration

Currently, AppOptics publisher is running in two instances, compatible with v1 and v2 plugins API framework.

V1 version is responsible for handling metrics from legacy plugins written based on the old version of the framework library. In the future this version will become obsolete when all the plugins are rewritten to work with the latest framework version.

In order to properly send metrics to an AppOptics account a valid token with write access must be provided. Usually, this field is filled automatically during installation along with url.

Copy
v1:
  publisher:
    publisher-appoptics:
      all:
        token: SOLARWINDS_TOKEN
        # url: https://api.appoptics.com/v1/measurements
v2:
  publisher:
    publisher-appoptics:
      all:
        endpoint:
          token: SOLARWINDS_TOKEN
          # url: https://api.appoptics.com/v1/measurements

Processes Publisher configuration

In order to properly send information about processes to AppOptics a valid token with write access must be provided. Usually, this field is filled automatically during installation along with url.

Copy
v2:
  publisher:
    publisher-processes:
      all:
        endpoint:
          token: SOLARWINDS_TOKEN
          # url: https://api.appoptics.com/v1/agent/report

Common configuration fields

Hostname

You can provide hostname alias which will replace detected hostname on AppOptics dashboards.

Example configuration for AppOptics publisher:

Copy
v1:
  publisher:
    publisher-appoptics:
      all:
        hostname_alias: myhostname
v2:
  publisher:
    publisher-appoptics:
      all:
        endpoint:
          options:
            hostname_alias: myhostname

Example configuration for Processes publisher:

Copy
v2:
  publisher:
    publisher-processes:
      all:
        options:
          hostname_alias: myhostname

Proxy

SolarWinds publishers can send information through a SOCKS5 proxy or HTTP proxy. Configuration proxy_url sets URL used for accessing the proxy server. If the proxy server requires authentication, then you can specify the user by using proxy_user and the password by using proxy_password. For proxy_url allowed protocol is socks5 for a SOCKS5 proxy or http for a HTTP proxy.

Example configuration for AppOptics Publisher:

Copy
v1:
  publisher:
    publisher-appoptics:
      all:
        proxy_url: "http://your.proxy.ip:8001"
        proxy_user: proxyuser
        proxy_password: pa$$word1
v2:
  publisher:
    publisher-appoptics:
      all:
        endpoint:
          proxy_url: "http://your.proxy.ip:8001"
          proxy_user: proxyuser
          proxy_password: pa$$word1

Example configuration for Processes Publisher:

Copy
v2:
  publisher:
    publisher-processes:
      all:
        endpoint:
          proxy_url: "http://your.proxy.ip:8001"
          proxy_user: proxyuser
          proxy_password: pa$$word1

Proxy configuration can be also specified using ALL_PROXY and NO_PROXY environment variables.

ALL_PROXY environment variable is used to specify the URL used for accessing the proxy. The format for ALL_PROXY is:

Copy
export ALL_PROXY="<proxy-type>://<user>:<password>@<proxy-address>:<port>"

or without authentication

Copy
export ALL_PROXY="<proxy-type>://proxy-address>:<port>"

NO_PROXY environment variable is used to specify the URLs that should be excluded from proxy-ing. This should be a comma-separated list of host names, domain names, or a mixture of both. Asterisks can be used as wildcards, but other clients may not support that. Domain names may be indicated by a leading dot. NO_PROXY environment variable is only used when ALL_PROXY environment variable is specified.

For example:

Copy
export NO_PROXY="169.254.169.254, localhost, 127.0.0.1, .domain.com"

When running on an EC2 instance, the address 169.254.169.254 is specified to allow EC2 queries to reach local instance instead of the proxy server.

The ALL_PROXY and NO_PROXY environment variables can be specified inside on /etc/defaults/swisnapd or /etc/sysconfig/swisnapd files depending on the operating system. Alternatively, they could be specified in the solarwinds user profile used for running agent service or at system level.

Copy
SWISNAPD_OPTS=''
SWISNAPD_EXTRA_OPTS=''
export ALL_PROXY="<proxy-type>://<user>:<password>@<proxy-address>:<port>"
export NO_PROXY="169.254.169.254, localhost, 127.0.0.1, .domain.com"

Values in configuration (proxy_url, proxy_user, proxy_password) have priority over values specified by ALL_PROXY environment variable and will override them.

EC2 / Open Stack detection

SWISnap Agent is able to detect if it is running on EC2 or OpenStack instance by querying Instance Metadata. Related configuration settings:

  • ec2_check_timeout or check_timeout - timeout for querying EC2 instance metadata URL to determine if the host agent is running on EC2 (or OpenStack) instance. By default, it is set to 1s.
  • ec2_check_retries or check_retries - the number of retries for querying EC2 instance metadata URL to determine if the host agent is running on EC2 (or OpenStack) instance. By default, it is set to 3.

Example configuration for AppOptics Publisher:

Copy
v1:
  publisher:
    publisher-appoptics:
      all:
        ec2_check_timeout: "1s"
        ec2_check_retries: 3
v2:
  publisher:
    publisher-appoptics:
      all:
        options:
          ec2:
            check_timeout: "1s"
            check_retries: 3

Example configuration for Processes Publisher:

Copy
v2:
  publisher:
    publisher-processes:
      all:
        options:
          ec2:
            check_timeout: "1s"
            check_retries: 3

Other configuration fields

Other options for publishers can also be configured:

  • period - the interval of sending information to AppOptics, default value is 60 seconds,
  • floor_seconds - whether to floor timestamps to a specific interval, the default value is 60 seconds,
  • host_check_timeout - allows configuring the timeout for querying host operating system for identification information like interfaces, CPUs, etc. By default it is set to 5s,

Please, be aware that for keeping backward compatibility period and floor_seconds must be provided as numbers (as seconds)

Example configuration for AppOptics Publisher:

Copy
v1:
  publisher:
    publisher-appoptics:
      all:
        host_check_timeout: "5s"
        floor_seconds: 60
        period: 60
v2:
  publisher:
    publisher-appoptics:
      all:
        options:
          floor_seconds: 60
          period: 60
          host_check_timeout: "5s"

Example configuration for Processes Publisher:

Copy
v2:
  publisher:
    publisher-processes:
      all:
        options:
          floor_seconds: 60
          period: 60
          host_check_timeout: "5s"

Publishing to a File

When configuring monitoring environment, users can utilize a file publisher.

Currently only legacy plugins can use file publisher.

To enable it, create publisher-aofile.yaml in:

  • /opt/SolarWinds/Snap/etc/plugins.d on Linux
  • C:/ProgramData/SolarWinds/Snap/plugins.d on Windows

with the following content (on Linux):

Copy
v1:
  publisher:
    file:
      all:
        file: "/tmp/mts.log"

or (on Windows):

Copy
v1:
  publisher:
    file:
      all:
        file: "C:/tmp/mts.log"

where file field points to the file where metrics will be written to (in JSON format).

In order to use the file publisher modify a publish section of a task definition, eg. for task-log.yaml:

Example

Copy
---
version: 1

schedule:
  type: cron
  interval: "0 * * * * *"

workflow:

  collect:

    metrics:
      /logs/lines_total: {}
      /logs/lines_forwarded: {}
      /logs/bytes_forwarded: {}
      /logs/lines_skipped: {}
      /logs/lines_failed: {}
      /logs/bytes_failed: {}
      /logs/lines_succeeded: {}
      /logs/bytes_succeeded: {}
      /logs/attempts_total: {}
      /logs/failed_attempts_total: {}
      
    publish:
    - plugin_name: file

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.