So for my alert action on emails, I'm populating the To field using a custom property associated to the object (Application, Node, Volume, etc...). This works great as it allowed me to get a standard set of alerts in the environment that work for 99% of our situations. This has been working great, for the most part. The only issue I run into is when users copy/paste (possibly using the auto complete) the email action fails.
For this scenario, lets say the custom property for the object is: Email
The email action has a To field set as: ${N=SwisEntity;M=CustomProperties.Email}
Alert Triggers, then in the Active Alert Details, I see the following.
"Node Email Action" action has failed The client or server is only configured for E-mail addresses with ASCII local-parts: address@domain.com.
Note: address@domain.com is the actual address or addresses provided in the custom property.
So my question is, I'm sure others have ran into this scenario, and I'm curious how you handle it. I'm hoping someone has a nice way to alert on if the custom property field has an invalid character or something or knows a query that will provide a list. Currently, I have a widget setup on my SW dashboard that gives me the list of failed alert actions, but I'd rather be a bit more proactive on the issue. I want to say I found the base of this query in the forums somewhere, but I don't remember who to give credit to.
select aa.[timestamp] as TriggeredDateTime , aa.message ,SUBSTRING(aa.Message,CHARINDEX('"ErrorMessage","Value":"',aa.message), LENGTH(aa.message)) As ErrorMessage ,CASE WHEN aa.eventtype = 0 then 'Triggered' WHEN aa.eventtype = 1 THEN 'Reset' WHEN aa.eventtype = 2 THEN 'Acknowledged' WHEN aa.eventtype = 3 THEN 'Note Added' WHEN aa.eventtype = 4 THEN 'Added to Incident' WHEN aa.eventtype = 5 THEN 'Action Failed' WHEN aa.eventtype = 6 THEN 'Action Succeeded' WHEN aa.eventtype = 7 THEN 'Unacknowledge' WHEN aa.eventtype = 8 THEN 'Cleared' END AS EventType ,ac.name As Alert ,'/Orion/NetPerfMon/ActiveALertDetails.aspx?NetObject=AAT:' + ToString(AO.AlertObjectID) AS Alert_Link ,ao.entityCaption as Entity ,ao.EntityDetailsUrl as Entity_DetailsURL from Orion.Alerthistory aa join Orion.AlertObjects ao on ao.AlertObjectID = aa.AlertObjectID join Orion.AlertConfigurations ac on ao.AlertID = ac.AlertID Where aa.eventtype = 5 AND aa.[timestamp] > ADDMONTH(-1,GetDate() ) Order by aa.[timestamp] Desc