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 is responsible for handling metrics from legacy plugins written based on the old version of the framework library. V1 is also deprecated.
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
.
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
Migrate from v1 to v2 appoptics publisher plugins
Look for the file etc/plugins.d/publisher-appoptics.yaml
. If a file already exists, save the contents of the file to a new location so they can be referenced later. Replace the contents of the file with the sample code below, but copy the values from the file you saved as a reference to the new file. If a file does not already exist, create a new file to etc/plugins.d/publisher-appoptics.yaml
containing the sample code below. Use the values found in the control.plugins
section of the config.yaml
file, then remove the section configuring publisher(s).
v1:
publisher:
publisher-appoptics:
all:
token: SOLARWINDS_TOKEN
## URL to the AppOptics REST API endpoint for collecting measurements data
# url: APPOPTICS_URL
## Set this option if you want a different "host" tag to be associated with the metrics you report.
# hostname_alias: myhostname
## Enable support for HTTP(S) proxy.
# proxy_url: "http://<proxy-server-ip>:<port>"
## Enable support for SOCKS5 proxy. Only SOCKS5 proxies are supported at this time.
# proxy_url: "socks5://<proxy-server-ip>:<port>"
## When proxy requires user authentication, uncomment the following lines and update username and password.
# proxy_user: <username>
# proxy_password: <password>
## host_check_timeout allows to configure timeout for querying host operating system for identification informations,
## like interfaces, CPUs, etc. By default it is set to 5s.
# host_check_timeout: "5s"
## ec2_check_timeout allows to configure timeout for querying EC2 instance metadata URL to determine if host agent
## is running on EC2 (or OpenStack) instance. By default it is set to 1s.
# ec2_check_timeout: "1s"
## whether to floor timestamps to a specific interval, default value is 60 seconds.
# floor_seconds: 60
## metrics interval period to report to AppOptics API, default value is 60 seconds.
# period: 60
v2:
publisher:
publisher-appoptics:
all:
endpoint:
token: SOLARWINDS_TOKEN
## URL to the AppOptics REST API endpoint for collecting measurements data
# url: APPOPTICS_URL
## Enable support for HTTP(S) proxy.
# proxy_url: "http://<proxy-server-ip>:<port>"
## Enable support for SOCKS5 proxy. Only SOCKS5 proxies are supported at this time.
# proxy_url: "socks5://<proxy-server-ip>:<port>"
## When proxy requires user authentication, uncomment the following lines and update username and password.
# proxy_user: <username>
# proxy_password: <password>
options:
## Set this option if you want a different "host" tag to be associated with the metrics you report.
# hostname_alias: myhostname
## whether to floor timestamps to a specific interval, default value is 60 seconds.
# floor_seconds: 60
## metrics interval period to report to AppOptics API, default value is 60 seconds.
# period: 60
## host_check_timeout allows to configure timeout for querying host operating system for identification informations,
## like interfaces, CPUs, etc. By default it is set to 5s.
# host_check_timeout: "5s"
ec2:
## check_timeout allows to configure timeout for querying EC2 instance metadata URL to determine if host agent
## is running on EC2 (or OpenStack) instance. By default it is set to 1s.
# check_timeout: "1s"
## check_retries allows to configure number of retries for querying EC2 instance metadata URL to determine if host agent
## is running on EC2 (or OpenStack) instance. By default it is set to 3.
# check_retries: 3
Look for the file etc/plugins.d/publisher-processes.yaml
. If a file already exists, save the contents of the file to a new location so they can be referenced later. Replace the contents of the file with the sample code below, but copy the values from the file you saved as a reference to the new file. If a file does not already exist, create a new file to etc/plugins.d/publisher-appoptics.yaml
containing the sample code below. Use the values found in the control.plugins
section of the config.yaml
file, then remove the section configuring publisher(s).
v2:
publisher:
publisher-processes:
all:
endpoint:
token: SOLARWINDS_TOKEN
## URL to the AppOptics REST API endpoint for collecting processes data
# url: APPOPTICS_REPORT_URL
## Enable support for HTTP(S) proxy.
# proxy_url: "http://<proxy-server-ip>:<port>"
## Enable support for SOCKS5 proxy. Only SOCKS5 proxies are supported at this time.
# proxy_url: "socks5://<proxy-server-ip>:<port>"
## When proxy requires user authentication, uncomment the following lines and update username and password.
# proxy_user: <username>
# proxy_password: <password>
options:
## Set this option if you want a different "host" tag to be associated with the metrics you report.
# hostname_alias: myhostname
## whether to floor timestamps to a specific interval, default value is 60 seconds.
# floor_seconds: 60
## metrics interval period to report to AppOptics API, default value is 60 seconds.
# period: 60
## host_check_timeout allows to configure timeout for querying host operating system for identification informations,
## like interfaces, CPUs, etc. By default it is set to 5s.
# host_check_timeout: "5s"
ec2:
## check_timeout allows to configure timeout for querying EC2 instance metadata URL to determine if host agent
## is running on EC2 (or OpenStack) instance. By default it is set to 1s.
# check_timeout: "1s"
## check_retries allows to configure number of retries for querying EC2 instance metadata URL to determine if host agent
## is running on EC2 (or OpenStack) instance. By default it is set to 3.
# check_retries: 3
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
.
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:
v1:
publisher:
publisher-appoptics:
all:
hostname_alias: myhostname
v2:
publisher:
publisher-appoptics:
all:
endpoint:
options:
hostname_alias: myhostname
Example configuration for Processes publisher:
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:
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:
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:
export ALL_PROXY="<proxy-type>://<user>:<password>@<proxy-address>:<port>"
or without authentication
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:
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.
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
orcheck_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
orcheck_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:
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:
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,
Be aware that for keeping backward compatibility period
and floor_seconds
must be provided as numbers (as seconds)
Example configuration for AppOptics Publisher:
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:
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 LinuxC:/ProgramData/SolarWinds/Snap/plugins.d
on Windows
with the following content (on Linux):
v1:
publisher:
file:
all:
file: "/tmp/mts.log"
or (on Windows):
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
---
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
Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.
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.