Question Lewis Greitzer · Jun 14, 2018

routing alerts by business partner or alert group

I've set up a Ens.Alert routing rule and would like to route alerts to different email groups based on business partner or alert group instead of relying on source config using Document.SourceConfigName. Is there a way to reference the business partner or alert group property in a routing rule?

Comments

Jeffrey Drumm · Jun 14, 2018

You could write custom methods that query the source config item's properties for those values and call them from your routing rules. However, a more supportable solution would be to implement managed alerts, which will make those properties directly accessible to you in the Ens.Alerting.NotificationRequest object that's created from the Alert Manager business process.

See Configuring Alert Management in the documentation.

0
Lewis Greitzer  Jun 15, 2018 to Jeffrey Drumm

Thanks, Jeff. I'll explore the managed alerts approach.

0
Lewis Greitzer · Jun 15, 2018

FWIW, I ended up creating  a custom method that turned out to be very easy and used the method as a function in my routing rule:

/// Get the alert group of the given component
ClassMethod GetAlertGroup(ComponentName As %String) As %String
{
Set tAlertGroup = ##class(Ens.Director).GetHostSettingValue(ComponentName,"AlertGroups")
Quit tAlertGroup
}

0
Jeffrey Drumm  Jun 15, 2018 to Lewis Greitzer

Great!

One caveat, though (and not exclusive to the method you're using): If you're using the Source property as the ComponentName argument, it  will contain "Ens.MonitorService" for events such as Queue Wait Alerts.

I inherited a rule where Source was used heavily for alert routing decisions, and worked around it by creating a rule that assigns the Ens.AlertRequest property SourceConfigName to Source early in the rule.

0
Lewis Greitzer  Jun 15, 2018 to Jeffrey Drumm

Good to know. I'll keep that in mind as I move forward. Thanks.

0