Dear team,
Can any one help me in getting all the solarwinds events by API
Hi. Not sure about what's your prefered API. Good start point is Home · solarwinds/OrionSDK Wiki · GitHub
So here's example for getting the data(last 24 hours to not to kill your DB) through PowerShell API after the Orion SDK installation(and allowing the scripts execution):
#region PSSnapin presence check/add
if (!(Get-PSSnapin -Name "SwisSnapin" -ErrorAction SilentlyContinue))
{
Add-PSSnapin SwisSnapin -ErrorAction SilentlyContinue
}
#endRegion
$swis = Connect-Swis -Hostname "localhost" -UserName "admin" -Password "123"
$query = "SELECT EventID, EventTime, NetworkNode, NetObjectID, NetObjectValue, EngineID, EventType, Message, Acknowledged, NetObjectType, TimeStamp
FROM Orion.Events
where EventTime > ADDHOUR(-24,GETUTCDATE())"
Get-SwisData -SwisConnection $swis -Query $query
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.