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?

  • 0
  • 0
  • 158
  • 3
  • 2


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.

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


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.

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