We have a well under-powered version of the database - but I am under the gun to write queries. Our Orion DB - I cannot open.
Can I have a data dictionary - for Orion SQL Server?
Error while Upgrading a node from icmp monitoring to snmp
Query:
Set-SwisObject $swis -Uri 'swis://hostname/Orion/Orion.Nodes/NodeID=2' -Properties @{ ObjectSubType='SNMP';SNMPVersion='2';AgentPort='162';Allow64BitCounters='True';Community='public';RWCommunity='public' }
Error:
Set-SwisObject : Invalid column name 'SNMPV3Username'.
Invalid column name 'SNMPV3PrivMethod'.
Invalid column name 'SNMPV3PrivKey'.
Invalid column name 'SNMPV3AuthMethod'.
Invalid column name 'SNMPV3AuthKey'.
At E:\Pulkit\EditSNMP.ps1:8 char:1
+ Set-SwisObject $swis -Uri 'swis://hostname/Orion/Orion.Nodes/No ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-SwisObject], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject
Note:- For other properties this query is working fine, even if a set "AgentPort" alone it works fine but when i set the property "ObjectSubType" or "Community" this error occurs.
Please help!
Add UDT ports via API
I have not found a way to do this, but maybe I'm not looking in the right place. We've got Python scripts for discovering and adding nodes and interfaces via API no problem. We're using corePluginConfig and interfacesPluginConfig to accomplish this. But I have not seen a similar "ports" PluginConfig (i.e. portsPluginConfig). When we started down the road of automating device entry, we assumed UDT ports would also be available to us via API. Like when we import discovered results in the web console, the Interfaces screen (with all of its selection criteria and filtering) is followed by an almost identical Ports screen. So it seemed safe to assume we would be able to include UDT ports when automating device entry via API.
Hopefully I'm just missing something and the option to do this is available.
Thanks!
Can I have a data dictionary - for Orion SQL Server?
We have a well under-powered version of the database - but I am under the gun to write queries. Our Orion DB - I cannot open.
Can you add nodes to NPM using Python or another language?
I'm automating provisioning/configuring Linux boxes using Ansible. I just finished automating the SNMP install/config, and I'd like to add steps that would add the linux server as a node to Solarwindws. Is this possbile? Or is SWIS only for queries?
Can you please let convert SQL into SWQL
I would like want from SQL to SWQL as mentioned below queries:
it's talks about F5 Load balancing report data to list down application
SELECT
DISTINCT F5_LTM_VirtualServer.ShortName AS "Publication Name",
F5_LTM_VirtualIPAddress.ShortName AS "Publication IP",
F5_LTM_VirtualIPAddress.IPAddress AS "Virtual IP Address",
F5_LTM_VirtualServer.Port AS "Virtual IP Port",
F5_LTM_Server.ShortName AS "Nodes Associated",
F5_LTM_PoolMember.Port AS "Node Port associated",
F5_LTM_PoolMember.F5Status AS "Publication status",
F5_LTM_PoolMember.F5StatusReason AS "Publication status Reason"
From NodesData
INNER JOIN F5_LTM_Pool
ON NodesData.NodeID = F5_LTM_Pool.NodeID
INNER JOIN F5_LTM_PoolMember
ON NodesData.NodeID = F5_LTM_PoolMember.NodeID
AND F5_LTM_PoolMember.PoolIndex = F5_LTM_Pool.PoolIndex
INNER JOIN F5_LTM_Server
ON F5_LTM_Server.NodeID = F5_LTM_PoolMember.NodeID
AND F5_LTM_Server.ServerIndex = F5_LTM_PoolMember.ServerIndex
INNER JOIN F5_LTM_VirtualIPAddress
ON NodesData.NodeID = F5_LTM_VirtualIPAddress.NodeID
INNER JOIN F5_LTM_VirtualServer
ON NodesData.NodeID = F5_LTM_VirtualServer.NodeID
AND F5_LTM_VirtualServer.IPAddressIndex = F5_LTM_VirtualIPAddress.IPAddressIndex
AND F5_LTM_VirtualServer.ShortName = F5_LTM_Pool.ShortName
Where
NodesData.Vendor= 'F5 Networks, Inc.'
Can you please let me help on this case.
Query nodes based on custom property
Hello,
Is there any way to query the Orion nodes with all the custom properties?
Thanks.
CluM09
Error while Upgrading a node from icmp monitoring to snmp
Query:
Set-SwisObject $swis -Uri 'swis://hostname/Orion/Orion.Nodes/NodeID=2' -Properties @{ ObjectSubType='SNMP';SNMPVersion='2';AgentPort='162';Allow64BitCounters='True';Community='public';RWCommunity='public' }
Error:
Set-SwisObject : Invalid column name 'SNMPV3Username'.
Invalid column name 'SNMPV3PrivMethod'.
Invalid column name 'SNMPV3PrivKey'.
Invalid column name 'SNMPV3AuthMethod'.
Invalid column name 'SNMPV3AuthKey'.
At E:\Pulkit\EditSNMP.ps1:8 char:1
+ Set-SwisObject $swis -Uri 'swis://hostname/Orion/Orion.Nodes/No ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-SwisObject], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject
Note:- For other properties this query is working fine, even if a set "AgentPort" alone it works fine but when i set the property "ObjectSubType" or "Community" this error occurs.
Please help!
API Network Discovery
Following the instructions on GitHub (Discovery · solarwinds/OrionSDK Wiki · GitHub ) I am attempting to create a very basic network scan where IP address's between 10.X.0.1-10.X.31.254 are scanned with the credential ID's provided. I am assuming the 3 separate plugin configuration are all actually part of the same script ? Assuming this is correct, when I run the script now, the system is expecting an argument at the line below
#Error expecting argument
PS C:\Users\nsd000.QACMA> C:\Users\nsd000.QACMA\Documents\PowerShell Scripts\Do not Modify\Discovery.ps1
cmdlet Invoke-SwisVerb at command pipeline position 1
Supply values for the following parameters:
Arguments[0]:
Invoke-SwisVerb : Verb Orion.NPM.Interfaces.CreateInterfacesPluginConfiguration requires 1 parameters not 0
At C:\Discovery.ps1:73 char:34
+ $InterfacesPluginConfiguration = Invoke-SwisVerb $swis Orion.NPM.Interfaces Crea ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb
#The error above is referencing the line directly below
$InterfacesPluginConfiguration = Invoke-SwisVerb $swis Orion.NPM.Interfaces CreateInterfacesPluginConfiguration
#Complete Script Below, Everything above this line is describing the problem
#CONNECTION TO SWIS
$ErrorActionPreference = 'Stop'
#Add the snapin
Add-PSSnapin SwisSnapin
#create a connection to solarwinds
$hostname = 'X.X.X.X'
$username = 'X'
$password = 'X'
#swis = Connect-Swis -Hostanme $hostname -Trusted
$swis = Connect-Swis -Hostname $hostname -Username $username -Password $password
#Core Plugin Configuration
$CorePluginConfigurationContext = ([xml]"
<CorePluginConfigurationContext xmlns='http://schemas.solarwinds.com/2012/Orion/Core' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
<IpAddressRange>
<StartAddress>10.X.0.1</StartAddress>
<EndAddress>10.X.31.254</EndAddress>
</IpAddressRange>
<Credentials>
<SharedCredentialInfo>
<CredentialID></CredentialID>
<CredentialID>1</CredentialID>
<CredentialID>2</CredentialID>
<CredentialID>11</CredentialID>
<CredentialID>13</CredentialID>
<CredentialID>20</CredentialID>
<CredentialID>21</CredentialID>
<CredentialID>47</CredentialID>
<CredentialID>71</CredentialID>
<CredentialID>89</CredentialID>
<CredentialID>110</CredentialID>
<CredentialID>156</CredentialID>
<CredentialID>163</CredentialID>
<CredentialID>170</CredentialID>
<CredentialID>197</CredentialID>
<CredentialID>198</CredentialID>
<CredentialID>202</CredentialID>
<Order>1</Order>
</SharedCredentialInfo>
</Credentials>
<WmiRetriesCount>1</WmiRetriesCount>
<WmiRetryIntervalMiliseconds>1000</WmiRetryIntervalMiliseconds>
</CorePluginConfigurationContext>
").DocumentElement
#Interface Plugin Configuration
$CorePluginConfiguration = Invoke-SwisVerb $swis Orion.Discovery CreateCorePluginConfiguration @($CorePluginConfigurationContext
$InterfacesPluginConfigurationContext = ([xml]"
<InterfacesDiscoveryPluginContext xmlns='http://schemas.solarwinds.com/2008/Interfaces'
xmlns:a='http://schemas.microsoft.com/2003/10/Serialization/Arrays'>
<AutoImportStatus>
<a:string>Up</a:string>
<a:string>Down</a:string>
<a:string>Shutdown</a:string>
</AutoImportStatus>
<AutoImportVirtualTypes>
<a:string>Virtual</a:string>
<a:string>Physical</a:string>
</AutoImportVirtualTypes>
<AutoImportVlanPortTypes>
<a:string>Trunk</a:string>
<a:string>Access</a:string>
<a:string>Unknown</a:string>
</AutoImportVlanPortTypes>
<UseDefaults>false</UseDefaults>
</InterfacesDiscoveryPluginContext>
").DocumentElement
$InterfacesPluginConfiguration = Invoke-SwisVerb $swis Orion.NPM.Interfaces CreateInterfacesPluginConfiguration
#Discovery Plugin Configuration
$EngineID = 1
$DeleteProfileAfterDiscoveryCompletes = "false"
$StartDiscoveryContext = ([xml]"
<StartDiscoveryContext xmlns='http://schemas.solarwinds.com/2012/Orion/Core' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
<Name>Script Discovery $([DateTime]::Now)</Name>
<EngineId>$EngineID</EngineId>
<JobTimeoutSeconds>3600</JobTimeoutSeconds>
<SearchTimeoutMiliseconds>2000</SearchTimeoutMiliseconds>
<SnmpTimeoutMiliseconds>2000</SnmpTimeoutMiliseconds>
<SnmpRetries>1</SnmpRetries>
<RepeatIntervalMiliseconds>1500</RepeatIntervalMiliseconds>
<SnmpPort>161</SnmpPort>
<HopCount>0</HopCount>
<PreferredSnmpVersion>SNMP2c</PreferredSnmpVersion>
<DisableIcmp>false</DisableIcmp>
<AllowDuplicateNodes>false</AllowDuplicateNodes>
<IsAutoImport>true</IsAutoImport>
<IsHidden>$DeleteProfileAfterDiscoveryCompletes</IsHidden>
<PluginConfigurations>
<PluginConfiguration>
<PluginConfigurationItem>$($CorePluginConfiguration.InnerXml)</PluginConfigurationItem>
<PluginConfigurationItem>$($InterfacesPluginConfiguration.InnerXml)</PluginConfigurationItem>
</PluginConfiguration>
</PluginConfigurations>
</StartDiscoveryContext>
").DocumentElement)
#Running The Discovery ( I get the error noted at the top regardless of the line below. To be honest, I guessed this would be at the bottom of the script.
$DiscoveryProfileID = (Invoke-SwisVerb $swis Orion.Discovery StartDiscovery @($StartDiscoveryContext)).InnerText
No snap-ins have been registered for Windows PS v. 5.0
Hi Thwack,
As I was trying to unmanage whole groups at a time I stumbled upon OrionSDK and with that, PowerOrion.
I have installed OrionSDK and copied the PowerOrion directory to C:\Windows\System32\WindowsPowerShell\v1.0\Modules\.
Whenever I try to either Import-Module PowerOrion or Add-PSSnapin SwisSnapin I get this:
PS C:\Company> Add-PSSnapin SwisSnapin
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.
At line:1 char:1
+ Add-PSSnapin SwisSnapin
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
PS C:\Company> Import-Module PowerOrion
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 5.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowerOrion\PowerOrion.psm1:5 char:1
+ Add-PSSnapin SwisSnapin
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (SwisSnapin:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
I've tried running the following without success: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe 'C:\Program Files (x86)\SolarWinds\Orion SDK\SWQL Studio\SwisPowerShell.dll'
Any help is greatly appreciated.
Glad Regards,
Frederik Bruun
Orion.node table
Hi All,
Want to know the field list for Orion.node table. Is there any way to parse query like select top 1 * from Orion.node.Want get my result based on company from node table for rest API.
Or any URL where we can find the field names of the table.
Ex: https://loclhost/Solarwinds/InformationService/v3/Json/Query?query="SELECT * FROM Orion.node where company='xxxx'"
Here company is the custom property
Thanks in advance...!!!
Can you add nodes to NPM using Python or another language?
I'm automating provisioning/configuring Linux boxes using Ansible. I just finished automating the SNMP install/config, and I'd like to add steps that would add the linux server as a node to Solarwindws. Is this possbile? Or is SWIS only for queries?
Can any one supply a REST example of how to define a Node in Solarwinds
I am developing an integration agent for SolarWindws and would like to use the REST API to add nodes to SolarWindws and change the system name
Orion.node table
Hi All,
Want to know the field list for Orion.node table. Is there any way to parse query like select top 1 * from Orion.node.Want get my result based on company from node table for rest API.
Or any URL where we can find the field names of the table.
Ex: https://loclhost/Solarwinds/InformationService/v3/Json/Query?query="SELECT * FROM Orion.node where company='xxxx'"
Here company is the custom property
Thanks in advance...!!!
Alert Suppression Question
Hi all,
I am currently using a powershell script and the SDK to suppress alerts for a bunch of servers in my environment. I have two questions:
1.) It takes upwards of 7 minutes for the script to finish setting the alert suppression for the 215 servers. Is there a way to speed this up. I am using the following powershell script (not the full script) to set the Alert Suppression.
$query = "select caption,uri from orion.nodes where caption like '%miargmtw%' or caption like '%flargmtw%'"
try
{
$uri = Get-SwisData -SwisConnection $swis -query $query -ErrorAction Stop
}
catch
{
$body = "$($MyInvocation.InvocationName) hit an exception during the query to get server information. The Error:`r`n $($error[0])"
$eventLogMessage += "$body"
send-email -body $body
Write-EventLog -LogName $eventLogName -Source $source -EntryType Error -Category 0 -EventId 3245 -Message $eventLogMessage
Exit
}
if([string]::IsNullOrEmpty($uri))
{
$body = "$($MyInvocation.InvocationName): SolarWinds Query did not return any values. Please Validate Query in the SWQL Studio`r`n The query was '$query'"
$eventLogMessage += $body
Send-Email -body $body
}
else
{
$eventlogMessage += "Found $($uri.count) servers to put into maintenance mode`r`n"
$eventlogMessage += "Placing Servers into maintenance mode`r`n"
try
{
Invoke-SwisVerb -SwisConnection $swis -EntityName Orion.AlertSuppression -Verb SuppressAlerts -Arguments @([string[]] $uri.uri, $startTime, $endtime) -ErrorAction Stop | Out-Null
}
catch
{
$body = "$($MyInvocation.InvocationName): Exception when attempting to Set AlertSuppression on the Node."
$eventLogMessage += $body
Send-Email -body $body
}
2.) If I query the alertsuppression table, I see all of the servers that I have muted alerts for using the powershell script from above. My question is, does this table purge the values after the suppress time ends or do i have to specifically say to resume alerts to clear that table? And if so, are the alerts still muted, even though the web console doesn't show that the alerts are muted in the status under managed nodes.
Thanks,
Steve
Get-SwisObject : An error occurred when verifying security for the message.
I am trying to connect to SolarWinds server from a different server and run a powershell script. My ultimate goal is mark an IP address as available. I can get the connection established, but as soon as I do a Get-SwisObject I get a security message.
Get-SwisObject : An error occurred when verifying security for the message.
If I put in a bogas password, I get the same message, so I guess I am not convinced that I am actually getting connected to my solarwinds server.
Here is my script:
If (!(Get-PSSnapin | where {$_.Name -eq "SwisSnapin"})) {
Add-PSSnapin "SwisSnapin"
}
$hostname = "solar.mycompany.com"
$username="admin"
$password="1234567"
$cred = New-Object -typename System.Management.Automation.PSCredential -argumentlist @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))
#Connect to the System
$target = Connect-Swis -v2 -Credential $cred -Hostname $hostname
#Get all URIs of Nodes in the System
$UriBasket = Get-SwisData $target "SELECT Uri FROM Orion.Nodes"
I searched high and low and I can not find what this error means (An error occurred when verifying security for the message.).
FYI, I am able to log on with the same account via a web browser, so I know the account has access.
Any help would be greatly appreciated.
Not sure I put this in the right group either.
Thanks, Jon
Orion EOC SWQL Custom report
Hi, I am trying to create a dashboard with the swql of my SAM environment. I am not sure if EOC has its own SWQL. However I am not receiving the same out put in EOC that I am getting through SAM.
Any ideas would be great
example:
SELECT DISTINCT
Nodes.Caption as [DownNodes],
Nodes.detailsurl as [_linkfor_DownNodes],
'/Orion/images/StatusIcons/Small-' + tostring(Nodes.StatusIcon) AS [_IconFor_DownNodes]
,AlertActive.TriggeredDateTime
FROM Orion.AlertObjects (nolock=true) AlertObjects
INNER JOIN Orion.AlertActive (nolock=true) AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID
INNER JOIN Orion.Nodes (nolock=true) Nodes ON Nodes.Caption=AlertObjects.RelatedNodeCaption
Where TriggeredMessage like '%is Down%' and TriggeredMessage not like '%tv%'
Order by TriggeredMessage
Alert Suppression Question
Hi all,
I am currently using a powershell script and the SDK to suppress alerts for a bunch of servers in my environment. I have two questions:
1.) It takes upwards of 7 minutes for the script to finish setting the alert suppression for the 215 servers. Is there a way to speed this up. I am using the following powershell script (not the full script) to set the Alert Suppression.
$query = "select caption,uri from orion.nodes where caption like '%miargmtw%' or caption like '%flargmtw%'"
try
{
$uri = Get-SwisData -SwisConnection $swis -query $query -ErrorAction Stop
}
catch
{
$body = "$($MyInvocation.InvocationName) hit an exception during the query to get server information. The Error:`r`n $($error[0])"
$eventLogMessage += "$body"
send-email -body $body
Write-EventLog -LogName $eventLogName -Source $source -EntryType Error -Category 0 -EventId 3245 -Message $eventLogMessage
Exit
}
if([string]::IsNullOrEmpty($uri))
{
$body = "$($MyInvocation.InvocationName): SolarWinds Query did not return any values. Please Validate Query in the SWQL Studio`r`n The query was '$query'"
$eventLogMessage += $body
Send-Email -body $body
}
else
{
$eventlogMessage += "Found $($uri.count) servers to put into maintenance mode`r`n"
$eventlogMessage += "Placing Servers into maintenance mode`r`n"
try
{
Invoke-SwisVerb -SwisConnection $swis -EntityName Orion.AlertSuppression -Verb SuppressAlerts -Arguments @([string[]] $uri.uri, $startTime, $endtime) -ErrorAction Stop | Out-Null
}
catch
{
$body = "$($MyInvocation.InvocationName): Exception when attempting to Set AlertSuppression on the Node."
$eventLogMessage += $body
Send-Email -body $body
}
2.) If I query the alertsuppression table, I see all of the servers that I have muted alerts for using the powershell script from above. My question is, does this table purge the values after the suppress time ends or do i have to specifically say to resume alerts to clear that table? And if so, are the alerts still muted, even though the web console doesn't show that the alerts are muted in the status under managed nodes.
Thanks,
Steve
SWQL and Active Alerts
I am trying to create a dashboard that has Active Alerts. We have SW integrated with Service Now so on this dashboard I want to show alerts that are assigned to a particular Assignment Group in Service Now. In SWQL Studio the query works correctly and returns the correct number of records but when I put this in as Custom Query in the dashboard no records are return. If I remove the where clause in the dashboard it will return all of the active alerts. Any ideas why it would not work in the dashboard, is there any limitation on the SWQL compared to the Studio. Thanks
SELECT ac.Name AS [Alert],
'/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:' + ToString(ao.AlertObjectID) AS [_LinkFor_Alert],
ac.AlertMessage AS [Message],
ao.EntityCaption AS [Object],
ao.EntityDetailsUrl AS [_LinkFor_Object],
aa.TriggeredDateTime as [Triggered Date],
ao.LastTriggeredDateTime AS [Last Triggered On],
ao.RelatedNodeCaption AS [Node],
ao.RelatedNodeDetailsUrl AS [_LinkFor_Node],
ao.AlertIncident.IncidentNumber as [Incident Number],
ao.AlertObjectID AS [_LinkFor_Incident Number],
ao.AlertIncident.AssignedTo AS [Assignment Group],
ao.AlertObjectID AS [_LinkFor_Assignment Group],
CASE WHEN aa.TriggeredDateTime IS NULL THEN NULL ELSE (
TOSTRING(FLOOR(MINUTEDIFF(aa.TriggeredDateTime,GETUTCDATE())/60.0)) + 'h ' +
TOSTRING(MINUTEDIFF(aa.TriggeredDateTime,GETUTCDATE())%60) + 'm'
) END AS [ACTIVE TIME]
FROM Orion.AlertActive AS aa
LEFT OUTER JOIN Orion.AlertObjects AS ao ON aa.AlertObjectID = ao.AlertObjectID
LEFT OUTER JOIN Orion.AlertConfigurations AS ac ON ao.AlertID = ac.AlertID
WHERE ao.AlertIncident.AssignedTo = 'Global Network Services'
ORDER BY aa.TriggeredDateTime
Alert Suppression Question
Hi all,
I am currently using a powershell script and the SDK to suppress alerts for a bunch of servers in my environment. I have two questions:
1.) It takes upwards of 7 minutes for the script to finish setting the alert suppression for the 215 servers. Is there a way to speed this up. I am using the following powershell script (not the full script) to set the Alert Suppression.
$query = "select caption,uri from orion.nodes where caption like '%miargmtw%' or caption like '%flargmtw%'"
try
{
$uri = Get-SwisData -SwisConnection $swis -query $query -ErrorAction Stop
}
catch
{
$body = "$($MyInvocation.InvocationName) hit an exception during the query to get server information. The Error:`r`n $($error[0])"
$eventLogMessage += "$body"
send-email -body $body
Write-EventLog -LogName $eventLogName -Source $source -EntryType Error -Category 0 -EventId 3245 -Message $eventLogMessage
Exit
}
if([string]::IsNullOrEmpty($uri))
{
$body = "$($MyInvocation.InvocationName): SolarWinds Query did not return any values. Please Validate Query in the SWQL Studio`r`n The query was '$query'"
$eventLogMessage += $body
Send-Email -body $body
}
else
{
$eventlogMessage += "Found $($uri.count) servers to put into maintenance mode`r`n"
$eventlogMessage += "Placing Servers into maintenance mode`r`n"
try
{
Invoke-SwisVerb -SwisConnection $swis -EntityName Orion.AlertSuppression -Verb SuppressAlerts -Arguments @([string[]] $uri.uri, $startTime, $endtime) -ErrorAction Stop | Out-Null
}
catch
{
$body = "$($MyInvocation.InvocationName): Exception when attempting to Set AlertSuppression on the Node."
$eventLogMessage += $body
Send-Email -body $body
}
2.) If I query the alertsuppression table, I see all of the servers that I have muted alerts for using the powershell script from above. My question is, does this table purge the values after the suppress time ends or do i have to specifically say to resume alerts to clear that table? And if so, are the alerts still muted, even though the web console doesn't show that the alerts are muted in the status under managed nodes.
Thanks,
Steve