classicvalues / ansible-swisnap

Ansible role for SolarWinds Snap Agent installation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SolarWinds Snap Agent Ansible Role

CircleCI

Installs and configures SolarWinds Snap Agent on RHEL/CentOS, Debian/Ubuntu or Windows servers.

For more detailed information about SolarWinds Snap Agent please refer to documentation

Role Variables

Ansible role variables with default values are listed below:

solarwinds_token: ""

AppOptics API token. It has to be configured by user before running the role

swisnap_hostname_alias: ""

Hostname alias for the server which will be used in AppOptics UI

swisnap_main_config_path: /opt/SolarWinds/Snap/etc/config.yaml

Path to SolarWinds Snap Agent's main configuration file

swisnap_plugins_config: /opt/SolarWinds/Snap/etc/plugins.d

Path to SolarWinds Snap Agent's plugin configuration files

swinsap_publisher_appoptics_path: /opt/SolarWinds/Snap/etc/plugins.d/publisher-appoptics.yaml

Path to SolarWinds Snap Agent's publisher AppOptics configuration files

swinsap_processes_appoptics_path: /opt/SolarWinds/Snap/etc/plugins.d/publisher-processes.yaml

Path to SolarWinds Snap Agent's publisher processes configuration files

swisnap_auto_discover_path: /opt/SolarWinds/Snap/autoload

Path to SolarWinds Snap Agent's autoload directory for V1 plugins

swisnap_tasks_autoload_path: /opt/SolarWinds/Snap/etc/tasks-autoload.d

Path to SolarWinds Snap Agent's V2 tasks files

swisnap_plugin_path: /opt/SolarWinds/Snap/bin

Path where SolarWinds Snap Agent's plugins binaries are stored

swisnap_task_path: /opt/SolarWinds/Snap/etc/tasks.d

Path to SolarWinds Snap Agent's V1 tasks files

swisnap_service: swisnapd
swisnap_user: solarwinds
swisnap_user_group: solarwinds

Name of SolarWinds Snap Agent service. User and group under which service will operate

swisnap_log_level: warning
swisnap_log_path: /var/log/SolarWinds/Snap
swisnap_log_format: text

Logging level, path to log file and log format.

swisnap_plugin_trust_level: ""
swisnap_keyring_paths: ""

Plugin trust level for swisnapd. When enabled, only signed plugins that can be verified will be loaded into swisnapd. Signatures are verified from keyring files specified in swisnap_keyring_path. Valid values are 0 - Off, 1 - Enabled, 2 - Warning. Default value is 1 - Enabled. If this is not set, then agent will use default enabled level

swisnap_tls_cert_path: ""
swisnap_tls_key_path: ""
swisnap_plugin_tls_cert_path: ""
swisnap_plugin_tls_key_path: ""
swisnap_ca_cert_paths: ""

Secure plugin communication optional parameters.

swisnap_plugin_load_timeout: ""

The maximal time allowed for a plugin to load. Default value is 30

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: ""

Optional REST API parameters. By default REST API is enabled

publisher_appoptics_url: ""
publisher_processes_url: ""

These parameters can override default URL for publishers

swisnap_proxy_url: ""
swisnap_proxy_user: ""
swisnap_proxy_password: ""

Optional proxy settings

swisnap_host_check_timeout: ""

swisnap_host_check_timeout allows to configure timeout for querying host operating system for identification informations. Default value is set to 5s

swisnap_ec2_check_timeout: ""

swisnap_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

swisnap_ec2_check_retries: ""

swisnap_ec2_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

swisnap_floor_seconds: ""

whether to floor timestamps to a specific interval, default value is 60 seconds

swisnap_period: ""

metrics interval period to report to AppOptics API, default value is 60 seconds

swisnap_custom_v1_task_path: ""
swisnap_custom_v2_task_path: ""
swisnap_custom_plugin_configs_path: ""

Paths to directories with custom task and plugin configuration files. It allows users to configure additional plugins. It should be path to directory e.g. /path/to/directory

swisnap_win_installer_download_path: ""

Path to download Windows installer. It has to be configured by user before running the role on Windows platform

swisnap_package_version: ""

Specific version of package to install e.g. 4.0.0.863 It works only for Linux platforms. For Windows always latest package is installed.

Example Playbook

Install SolarWinds swinsap role using Ansible Galaxy:

ansible-galaxy install solarwinds.swisnap

or clone this repository to directory with your playbook's roles:

git clone https://github.com/solarwinds/ansible-swisnap.git solarwinds.swisnap

Linux

- hosts: localhost
  connection: local
  vars_files:
    - vars/my_vars.yaml
  roles:
    - solarwinds.swisnap

Inside vars/my_vars.yaml:

solarwinds_token: 123456789dbba089e9ff613bb9528320188853b1a08d91d23d2fc9bc1c41ec3e

Windows:

- hosts: windows
  vars_files:
    - vars/main.yml
  roles:
    - solarwinds.swisnap

Inside vars/my_vars.yaml:

solarwinds_token: 123456789dbba089e9ff613bb9528320188853b1a08d91d23d2fc9bc1c41ec3e
swisnap_win_installer_download_path: "C:\\Users\\Administrator\\Downloads\\solarwinds-snap-agent-installer.msi"

Inside inventory:

[windows]
1.2.3.4

Inside group_vars/windows:

ansible_user: Administrator
ansible_password: password
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore

About

Ansible role for SolarWinds Snap Agent installation

License:Apache License 2.0


Languages

Language:Jinja 65.8%Language:Python 34.2%