solarwinds.swisnap
SolarWinds Snap Agent Ansible Role
This role installs and sets up the SolarWinds Snap Agent on RHEL/CentOS, Debian/Ubuntu, or Windows servers.
For detailed information about the SolarWinds Snap Agent, please check the documentation.
Role Variables
The default values for the Ansible role variables are shown below:
solarwinds_token: ""
This is the AppOptics API token that must be set by the user before running the role.
swisnap_hostname_alias: ""
This is the server's hostname alias that will be displayed in the AppOptics UI.
swisnap_main_config_path: /opt/SolarWinds/Snap/etc/config.yaml
The path to the main configuration file for the SolarWinds Snap Agent.
swisnap_plugins_config: /opt/SolarWinds/Snap/etc/plugins.d
The path where the plugin configuration files for the SolarWinds Snap Agent are stored.
swinsap_publisher_appoptics_path: /opt/SolarWinds/Snap/etc/plugins.d/publisher-appoptics.yaml
The path to the AppOptics publisher configuration files for the SolarWinds Snap Agent.
swinsap_processes_appoptics_path: /opt/SolarWinds/Snap/etc/plugins.d/publisher-processes.yaml
The path to the configuration files for the publisher processes of the SolarWinds Snap Agent.
swisnap_auto_discover_path: /opt/SolarWinds/Snap/autoload
This is the directory for autoloading V1 plugins for the SolarWinds Snap Agent.
swisnap_tasks_autoload_path: /opt/SolarWinds/Snap/etc/tasks-autoload.d
The path for the V2 tasks files of the SolarWinds Snap Agent.
swisnap_plugin_path: /opt/SolarWinds/Snap/bin
The location where the binaries for the SolarWinds Snap Agent's plugins are kept.
swisnap_task_path: /opt/SolarWinds/Snap/etc/tasks.d
The path for the V1 tasks files of the SolarWinds Snap Agent.
swisnap_service: swisnapd
swisnap_user: solarwinds
swisnap_user_group: solarwinds
This is the name of the SolarWinds Snap Agent service, along with the user and group it will run under.
swisnap_log_level: warning
swisnap_log_path: /var/log/SolarWinds/Snap
swisnap_log_format: text
These settings control the logging level, log file path, and log format.
swisnap_plugin_trust_level: ""
swisnap_keyring_paths: ""
These settings control the trust level for swisnapd plugins. When trust is enabled, only verified signed plugins will be loaded. Valid values are 0 (Off), 1 (Enabled), and 2 (Warning). The default is 1 (Enabled).
swisnap_tls_cert_path: ""
swisnap_tls_key_path: ""
swisnap_plugin_tls_cert_path: ""
swisnap_plugin_tls_key_path: ""
swisnap_ca_cert_paths: ""
These are optional parameters for secure plugin communication.
swisnap_plugin_load_timeout: ""
This sets the maximum time allowed for a plugin to load, with a default of 30 seconds.
swisnap_global_tags: {}
Tags that will be applied to collected metrics across tasks.
swisnap_restapi_enable: true
swisnap_restapi_https: ""
swisnap_restapi_rest_auth: ""
swisnap_restapi_rest_auth_password: ""
swisnap_restapi_rest_certificate: ""
swisnap_restapi_rest_key: ""
swisnap_restapi_port: ""
swisnap_restapi_addr: ""
swisnap_restapi_plugin_load_timeout: ""
These are optional parameters for the REST API, which is enabled by default.
publisher_appoptics_url: ""
publisher_processes_url: ""
These can be used to set custom URLs for the publishers.
swisnap_proxy_url: ""
swisnap_proxy_user: ""
swisnap_proxy_password: ""
These are optional settings for a proxy.
swisnap_host_check_timeout: ""
This configures the timeout for checking the host operating system. The default is set to 5 seconds.
swisnap_ec2_check_timeout: ""
This configures the timeout for checking the EC2 instance metadata URL. The default is 1 second.
swisnap_ec2_check_retries: ""
This sets the number of retries for checking the EC2 instance URL. The default is 3 retries.
swisnap_floor_seconds: ""
This determines whether timestamps should be rounded to a certain interval, with a default of 60 seconds.
swisnap_period: ""
This is the interval for reporting metrics to the AppOptics API, with a default of 60 seconds.
swisnap_custom_v1_task_path: ""
swisnap_custom_v2_task_path: ""
swisnap_custom_plugin_configs_path: ""
These paths lead to directories with custom task and plugin configuration files, allowing for additional plugin configurations.
swisnap_win_installer_download_path: ""
This is the download path for the Windows installer, which must be set by the user before running the role on a Windows platform.
swisnap_package_version: ""
This sets a specific version of the package to install, for example 4.0.0.863
. This is applicable only for Linux; for Windows, the latest package is always installed.
Example Playbook
To install the SolarWinds swisnap role, use Ansible Galaxy:
ansible-galaxy install solarwinds.swisnap
Or clone this repository to the role's directory for your playbook:
git clone https://github.com/solarwinds/ansible-swisnap.git solarwinds.swisnap
For Linux
- hosts: localhost
connection: local
vars_files:
- vars/my_vars.yaml
roles:
- solarwinds.swisnap
In vars/my_vars.yaml
, set your token:
solarwinds_token: 123456789dbba089e9ff613bb9528320188853b1a08d91d23d2fc9bc1c41ec3e
For Windows:
- hosts: windows
vars_files:
- vars/main.yml
roles:
- solarwinds.swisnap
In vars/my_vars.yaml
, set your token and the download path for the Windows installer:
solarwinds_token: 123456789dbba089e9ff613bb9528320188853b1a08d91d23d2fc9bc1c41ec3e
swisnap_win_installer_download_path: "C:\\Users\\Administrator\\Downloads\\solarwinds-snap-agent-installer.msi"
In inventory
, specify your Windows host:
[windows]
1.2.3.4
In group_vars/windows
, set your connection details:
ansible_user: Administrator
ansible_password: password
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
ansible-galaxy install solarwinds.swisnap