Hi There I hope that all are well and everyone is safe..
I have been trying to automate the discovery of windows services on nodes within my enterprise and assign them to a template I like to call "node specific services"
Anyone here knows if it is possible to add components to applications via powerswis or a better way to accomplish this?
##########
I know that I can get data about a component by running:
$componentTemplates = Get-SwisData -SwisConnection $swis -Query "SELECT ID, Name, ComponentType, IsDisabled, Uri FROM Orion.APM.ComponentTemplate WHERE ApplicationTemplateID = @applicationTemplateId" @{ applicationTemplateId = $applicationTemplateId }$componentTemplates | ForEach-Object { Write-Host "ID:" $_.ID; Write-Host "Name: " $_.Name; Write-Host "IsDisabled: " $_.IsDisabled; Write-Host "Uri: " $_.Uri; Write-Host }Now I would like to set/ add components too..
maybe something like this
$Templateproperties= @{
Name = Service NetLogon
ShortName = Netlogon
ComponentType = 9
ComponentEvidenceType = 1
ApplicationID = $applicationID
TemplateID = $applicationTemplateId
UserDescription = "Basic Service to monitor"
UserNotes = " This Component was added automatically via powershell"
}
Set-SwisObject $swis -Uri $applicationuri -Properties $Templateproperties
According to https://github.com/solarwinds/OrionSDK/wiki/SAM-Application-Monitoring-Templates you can modify a component but there is no info on adding a component to an application
Thank you