Skip to content

SAM Application Monitoring Templates

Pawel Kedzior edited this page Jul 16, 2019 · 28 revisions

Application Monitoring Templates

SolarWinds Server and Application Monitor (SAM) includes a number of Application Monitoring Templates. Templates can be exported and imported to/from a file.

How to import Application Monitoring Template

Orion SDK has ImportTemplate verb on Orion.APM.ApplicationTemplate entity which allows for automation of the process of importing Application Monitoring Templates to SAM. For example, in order to import a template from MyTemplate.apm-template file invoke the following PowerShell code:

# Load the template to a variable
$template = (Get-Content -Path ".\MyTemplate.apm-template" | Out-String)
# Import template
$result = Invoke-SwisVerb -Swis $swis Orion.APM.ApplicationTemplate ImportTemplate @($template)
$importedId = $result.InnerText
Write-Host "Imported template Id: $importedId"

How to export Application Monitoring Template

Similarly, when you know the id of a template, you can export it to a file. The following code exports template of id 1 to MyTemplate.apm-template.

$templateId = 1
$result = Invoke-SwisVerb -Swis $swis Orion.APM.ApplicationTemplate ExportTemplate @($templateId)
$exportedTemplate = $res.InnerText
$exportedTemplate | Out-File ".\MyTemplate.apm-template"
Clone this wiki locally