cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Create a alert in SolarWinds usind Orion_Python_Client_SDK

Jump to solution

Can someone suggest how do we write an script for creating an alert in solarwinds or any samples using python sdk.

Tried something to create but didn't work

swis = SwisClient(npm_server, username, password)
print("Add an alert:")
props = {
   'AlertID': 55,   'Name':'Alert me when an application goes up',   'Description':'This alert will write to the event log when an application goes up and when an application comes back down.',   # 'AlertRefID':'26e********-f4047251b6ba'   'Frequency':1,   'Uri':'swis://EC2./Orion/Orion.AlertConfigurations/AlertID=55'}
print("Adding alert {}... ".format(props['AlertID']), end="")
results = swis.create('Orion.Alerts', **props)
print("DONE!")

Thanks in advance.

0 Kudos
1 Solution
MVP
MVP

Hi there, you can't create alerts unfortunately. You need to create the alert and then have something in SolarWinds trigger that alert. That doesn't mean you can't manipulate a custom property from outside with the API and have that trigger the alert.

View solution in original post

0 Kudos
1 Reply
MVP
MVP

Hi there, you can't create alerts unfortunately. You need to create the alert and then have something in SolarWinds trigger that alert. That doesn't mean you can't manipulate a custom property from outside with the API and have that trigger the alert.

View solution in original post

0 Kudos