1 Reply Latest reply on Oct 10, 2016 9:29 AM by xtraspecialj

    Modifying Alert Recipients via SDK


      We're trying to amend our active alerts so that they include an additional recipient email address. We'd like to use the Orion SDK to achieve this. If I'm not wrong there are probably 2 ways of doing it - either directly updating the tables, or by using a verb in order to adjust the alerts. Trouble is I can't seem to find the right documentation or a snippet of script/code showing how to achieve this.

        • Re: Modifying Alert Recipients via SDK

          While you probably could script this, unless you need to do this continuously I would look at using the new Alert Action Assignment feature of NPM 12/SAM 6.2.4 instead.  With NPM 12+ you can create an alert action and then assign that action to multiple alerts.  From then on, any changes you make to the original action will be reflected against all the alerts it is assigned to.  If you are familiar with Orion SAM then you can think of it kind of like an Application Monitor Template.  We are getting ready to redo all of our alert actions to use this new feature.  Basically, for each object type (Node, Application Monitor, Component Monitor, Hardware Health Sensor, and so on) we will have an alert action template for each action type (Trigger Action Email and NetPerfMon Event Log, and Reset Action Email and NetPerfMon Event Log). 


          While this will take a bit of doing at first, this should save you time in the long run since from then on you just update the one main action and all of the alerts it is assigned to are automatically updated.


          Another tip is never to put an email address in any of your alert actions. Instead, create custom properties for Nodes and other object types as necessary that can hold these email addresses and allow you to assign them to objects as needed.  We use ContactPrimary, ContactSecondary, ContactTertiary and so on as custom property names.  Then, in the Custom Property Editor you can easily bulk edit all of your nodes and label them with the correct emails.  In your alert action email TO:, CC:, and BCC: fields you can put in the variables to refer to these properties.  ${Node.ContactPrimary} ${Node.ContactSecondary} and so on.  Once this is all done you never have to edit your alert actions again.  Just label the nodes with their proper email addresses for each property and they automatically go to the right people.  No sweat.  The upside to this is also that you don't need a separate alert for each group of people that need alerts.  Normally just a simple Node Down alert type would require you to have multiple Node Down alerts to cover all of the different groups of people who need alerts about the nodes they are responsible for.  Using these properties you would just need one Node Down alert for all nodes and you control who gets the alert based on labeling the nodes themselves, not adjusting all the different alerts everytime a change is needed.  This will be more work up front but WAY less work over the long run.

          1 of 1 people found this helpful