Client Management Suite

 View Only

Repeated Monitor Email Alerts for Monitor Solution 7 

Oct 30, 2014 03:26 PM

Monitor Solution is an excellent product. However, one snag I hit hard in it's implementation is that the primary mechanism for delivering alerts is not email but the event console. This meant that I had to open up a web browser everytime I wanted to see how my server estate was faring.

You can of course configure email alerts with Monitor solution, but these actions are only triggered the moment a metric crosses a threshold. There is no simple checkbox to say "Keep nagging me by email until this situation is resolved!".

This can be done though by setting up a automation policy that emails a report of outstanding alerts. The following has been implemented successfully on Montitor Solution versions 7.1 and 7.5  

 

1. Create Report

In the reports tab, create a new SQL Report called "Current Active Events Greater than 1 Hour Old Report". In the parameterised query window, paste in the following T-SQL

DECLARE @v1_TrusteeScope AS NVARCHAR (MAX);

SET @v1_TrusteeScope = N'%TrusteeScope%';

SELECT [vri2_Computer].[Guid] AS [_ItemGuid],
       [vri2_Computer].[Name],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Guid],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Description],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Severity],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Host],
       [ajs3_vEventConsoleCurrentActiveAlerts].[First occurred],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Last occurred],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Count],
       [ajs3_vEventConsoleCurrentActiveAlerts].[CategoryGuid],
       [ajs3_vEventConsoleCurrentActiveAlerts].[Action],
       [ajs3_vEventConsoleCurrentActiveAlerts].[ActionOccurred],
       [ajs3_vEventConsoleCurrentActiveAlerts].[ResourceGuid],
       [ajs3_vEventConsoleCurrentActiveAlerts].[ProductGuid],
       [ajs3_vEventConsoleCurrentActiveAlerts].[definition_guid],
       [ajs4_ec_alert_action_audit_type].[id],
       [ajs4_ec_alert_action_audit_type].[name],
       [ajs4_ec_alert_action_audit_type].[description]
FROM   [vRM_Computer_Item] AS [vri2_Computer]
       INNER JOIN
       ([vEventConsoleCurrentActiveAlerts] AS [ajs3_vEventConsoleCurrentActiveAlerts]
        LEFT OUTER JOIN
        [ec_alert_action_audit_type] AS [ajs4_ec_alert_action_audit_type]
        ON ([ajs3_vEventConsoleCurrentActiveAlerts].[Action] = [ajs4_ec_alert_action_audit_type].[id]))
       ON ([vri2_Computer].[Guid] = [ajs3_vEventConsoleCurrentActiveAlerts].[ResourceGuid])
WHERE  ((([ajs3_vEventConsoleCurrentActiveAlerts].[Severity] <> 0)
         AND ([ajs3_vEventConsoleCurrentActiveAlerts].[Action] <> 1
              OR [ajs3_vEventConsoleCurrentActiveAlerts].[Action] IS NULL)
         AND (DATEDIFF(hh, [ajs3_vEventConsoleCurrentActiveAlerts].[First occurred], Getdate()) > 1))
        AND ([vri2_Computer].[Guid] IN (SELECT [ResourceGuid]
                                        FROM   [ScopeMembership]
                                        WHERE  [ScopeCollectionGuid] IN (SELECT [ScopeCollectionGuid]
                                                                         FROM   dbo.fnGetTrusteeScopeCollections (@v1_TrusteeScope)))));  

 

And Click "Save Changes". When saved the report will run and you should see listed all your alerts which are still outstanding in your event console.

 

2. Create Email Task

Now we want a task which will email the results of this report. To do this, do the following,

  1. Click Manage->Jobs and Tasks in the SMP Console. Create a folder called "Custom Email Alerts" under System Jobs and Tasks->Monitoring and Alerting->Monitor->Tasks->Custom Email Alerts

    Create_email_task.png
     
  2. In this folder create a new Send E-mail task called "Send E-mail for outstanding Monitor Alerts".
     
  3. Configure the address field to be the address list of the administrators who need to be notified by this alert
     
  4. Configure the Subject as %!MONITORED_SYSTEM!% has had %!MONITORED_POLICY!% triggered for over 1 hour
     
  5. Configure the email body as,
     
    -Monitor Solution Alert-
    
    The following alert has remained unresolved for over an hour
    
    ALERT DETAILS:
    Computer name: %!MONITORED_SYSTEM!%
    Policy: %!MONITORED_POLICY!%
    Severity: %!MONITORED_SEVERITY!%
    First Occurred: %!MONITORED_FIRST_TIME!%
    Last Occurred: %!MONITORED_LAST_TIME!%
    
    
  6. In the advanced settings, configure the email as plain text.

 

Your task should now look something like this,


Send_email_task.png

 

3. Create Automation Policy

Now we'll create an automation policy to execute this report on an hourly schedule and email the results. The steps here as follows,

  1. Click Manage->Policies in the SMP console. Locate the automation policies object and select to list the current automation policies applied to the system. 

    automation_policies.png
     
  2. Create a new automation policy. Call it "Hourly Monitor Emails"
     
  3. Configure policy to repeat every 1 hour
     
  4. In the Data Source section, configure the target to be the report "Current Active Events Greater than 1 Hour Old Report"
     
  5. Configure the action to be run the task "Send E-mail for Outstanding Monitor Alerts"
     
  6. In Conditions, configure the evaluation rule to be "Run for each record"
     
  7. In Actions, select "Edit Input Parameter". Configure the parameter mapping as below

    email_parameter_mapping.png

At the end of this, your policy should look like this,

policy.png

Just save the changes and click "Test Automation Policy". Within a few moments, the outstanding alerts should be whizzing their way to your inbox.

To finish, simply enable the policy. Every hour you'll now get those email alerts.

 

4. The Tweaking...

Once you've got this up and running, you can then start playing with the text in your alerts to make then more use friendly. You can make them HTML if you like and reference team documentation stores for troubleshooting information. You might even tweak the report to filter on specific alert types, so you can remind more frequently on critical alerts for example.

Credit goes to Steve Massie of Incit Technology for this little Monitor Solution enhancement.

 

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.