Documentation forServer & Application Monitor

Use automation scripts to add AppInsight applications to nodes with the Orion SDK

This section describes to use PowerShell scripts to add AppInsight applications to nodes via the Orion Software Development Kit (SDK), enabling you to configure large environments quickly via automation scripts provided by SolarWinds. This is a quick alternative to adding AppInsight templates via Discovery, or manually assigning templates in SAM.

The Orion SDK is a set of tools that you can use to interface with the SolarWinds Information Service (SWIS) that supports communication between the Orion server, the Orion database, Orion Platform modules like SAM and NPM, and Additional Polling Engines. As a data access layer for the Orion Platform, SWIS allows for higher-level operations than would be allowed when making changes in SQL.

New to the Orion SDK? Read Intro to API, SDK, & SWQL on THWACK, or watch Orion SDK 101: Intro to PowerShell and the Orion API.

Published on GitHub, some ways to use the Orion SDK with SAM include monitoring metrics with API pollers and managing custom properties. For many years, the SDK has included the CreateApplication SWIS verb that you can use to add SAM application monitor templates to nodes, as described in the OrionSDK wiki and THWACK. However, that verb did not support complex AppInsight templates in earlier releases.

Starting in SAM 2020.2.5, you can use CreateApplication to add the following templates to nodes:

Click here to download a ZIP file with related AppInsight scripts, plus a script to add the Windows Scheduled Tasks Monitor (WSTM).

In scripts, APM refers to the original name for SolarWinds SAM, which is still used in database columns and fields.

Although automation scripts can speed the configuration of large environments, you still need to verify that target nodes meet template requirements, per the SAM Application Monitor Template Reference. For example, to add AppInsight for Active Directory to a node, you'll need specific details, such as:

  • LDAP port
  • Global Catalog (GC) port
  • Encryption method
  • Authentication method

When you execute a PowerShell script from the command line or the PowerShell Integrated Scripting Environment (ISE), the script invokes the CreateApplication verb and passes parameters such as credentials, node ID, and application template ID to the Orion SDK.

Scripts include annotations about the actions and variables involved. For example, if you set credentialsSetID to 0, the script prompts for credentials each time it runs; use 3 to inherit credentials from WMI nodes, or 4 to inherit credentials from the parent template.

Note the following details about these automation scripts:

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.

AppInsight automation script requirements

  • Verify that PowerShell 4.0 or later is installed.
    • To determine the current version, use this command:
    • Add the SwisSnapin by running the following Add-PSSnapin cmdlet:
      Add-PSSnapin -Name SwisSnapin
    • For details, see Orion SDK PowerShell.

    Depending on how it's configured, PowerShell can make your deployment vulnerable to unauthorized access. Your organization should internally review and assess to what extent PowerShell scripts are incorporated into your environment. See also PowerShell security considerations.

  • Download automation scripts from GitHub.
  • Install the Orion SDK, if necessary.

    The Orion SDK is a powerful tool that can impact Orion Platform data. Users should be well-versed in SQL queries with a background in programming. SolarWinds does not provide pre- or post-Sales support on any Orion SDK customizations, including code. Experiment with the Orion SDK in a non-production instance of Orion. Do not run untested PowerShell scripts against a production instance.

Execute AppInsight automation scripts

After downloading automation scripts and verifying requirements, execute scripts either directly from the command line or from the PowerShell ISE. Provide required data, as prompted.

Due to the complexity of AppInsight for Exchange and AppInsight for IIS, extra steps (known as "Zero Config") are required on target servers, such as setting PowerShell execution policies or adding firewall rules for WinRM.

The exch_create and iis_create scripts include options (shouldConfigureIISServer and shouldconfigureExchangeServer, respectively) that are set to True, by default. When you run either script, two SWIS verbs are invoked on target servers:

  • ScheduleConfiguration launches the Zero Config process.
  • GetConfigurationResult summarizes changes that occurred.