This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Create a alert in SolarWinds usind Orion_Python_Client_SDK

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.

  • 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.