Monitor Tasks - Email the correct party
Created: 30 Jan 2013 | 4 comments
Right now we have a standard set of monitor policies that run on all servers that emails just about everyone on the server team like when a server is down. Is it possible to right a conditional task rule that would only email our DBA's when the server is a SQL server and not email them when it's a differnt type of server? I already have a nother table that stores assigned server roles and even IT owners of those servers. Could I use that info in a token or something in a Monitor policy and conditional task?
Group Ownership:
Comments 4 Comments • Jump to latest comment
Yes, the e-mail task should send To: the e-mail token. I created a test table that used computer name and joined to vComputer, so my token query looked like this: SELECT sot.OwnerEmail FROM vComputer vc JOIN ServerOwnerTable sot ON sot.ServerName=vc.Name WHERE vc.[Guid] = %COMPUTERID%
When the task fires for the monitor policy it will send to the e-mail address pulled from the token. Create an exception report that e-mails you weekly for any computers with Monitor Plug-in Installed whose names are not in your custom table (e.g. ServerOwnerTable), so that you always have owners defined for the monitor e-mails.
So if your custom token is %ServerOwnerEmail%, as mine was, then you would put this in the task in the To: field.
Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com
So I tried the following but the Token generator doesn't seem to like + being used. Any ideas around that?
Figured out a way around it using STUFF and REPLACE.
STUFF(Replace(pu.email,'.com','.com; ;'), LEN(Replace(pu.email,'.com','.com; ;')),1,su.email)
Problem... ComputerID is the GUID of the TASK server. Not the server that has the problem. Can you use %!MONITOR_RESOURCE_GUID!% for the computer ID in the token?
Would you like to reply?
Login or Register to post your comment.