Follow

Notify Owner of Environment Expiry Date

The “notify owner of environment expiry date” process distributes a warning email to a defined distribution email list when an environment expiry date falls in range of its configured expiry date range. An email is distributed to the environment reporting distribution group, and an overview warning email that contains all environment in range of expiry is distributed to wider distribution group.

The notification check process is managed through a scheduled SQL Agent job that triggers a stored procedure to identify the expiring environments and send the appropriate warning emails.

(Note - DBMail needs to be configured by the DBAs on the SQL Instance for this function to work.  The mail profile should be called 'emdashMail')

 

Implementation

The release process for emdash will implement the SQL Agent job and stored procedure.

A SQL Agent job is to be configured and a schedule will need to be created that triggers the environment owner expiry verification process. If the expiry date is within the defined warning days then warning emails are distributed to the appropriate distribution groups. (See below for configuring the SQL Agent Job)

The following components combine to manage the notification process and can be configured to specific client and environment.

  • Environment Wide Settings Options (Global Setting) 
    • NotifyEnvironmentOwnerEndDateDays
  • Environment Wide Settings (Environment Setting - to override the global setting if desired)
    • NotifyEnvironmentOwnerEndDateDays
  • System Wide Setting (Global Overview Email Distribution Setting)
    • NOTIFY_ENVIRONMENT_OWNER_ENDDATE_GROUP
  • SQL Agent Job
    • emdashNotifyEnvironmentOwnerEndDate (steps to create this are below)
  • Stored Procedure
    • spNotifyEnvironmentOwnerEndDateDays

Configuration

Three areas require configuration to successfully setup the Environment Expiry Notification process. These include setting the number of warning days before expiry, the email distribution lists, and the schedule for the SQL Agent. All configuration instructions are provided below.

Number of Warning days before expiry

The number of warning days to notify the environment owner distribution list before the expiry date is controlled through an EnvironmentWideSettingsOptions or EnvironmentWideSettings.

Environment Wide Settings Options (Global Setting)

  • Using emdash Portal
  • Select Env Wide Settings Options under Reference Data Mgr
  • Edit “NotifyEnvironmentOwnerEndDateDays” to set required number of warning days before expiry date.
  • Defaulted to 5 days

Environment Wide Settings (Environment Setting)

  • Using emdash Portal
  • Select Environment under Home Page
  • Select Environment Wide Settings 
  • Add or Edit “NotifyEnvironmentOwnerEndDateDays” to set required number of warning days before expiry date specific for the selected environment. This will override the “Env Wide Settings Options” default.

 

Distribution Lists

The distribution list for specific environment notification and environment overview notification can be defined using the instructions below.

Environment email distribution list

  • Using emdash Portal
  • Select Environment under Home Page
  • Click Edit Environment
  • Populate “Send emdash reports to” with the required email distribution list delimitated with a semicolon.

Overview email distribution list

  • Using emdash Portal
  • Select System Wide Settings under Reference Data Mgr
  • Edit “NOTIFY_ENVIRONMENT_OWNER_ENDDATE_GROUP” to set required email distribution list delimitated with a semicolon.  

SQL Agent Job / Schedule

The SQL Agent job that triggers the email notifications needs to be implemented.

This can be done through SQL Management Studio, finding the stored procedure and scripting out a 'Create To SQL Agent Job' as per the following screenshot

You can enter the following and click OK to create a shell SQL Agent Job called emdash-NotifyOwnerOfEndDate

 

Once that is created, to apply the required client specific schedule please follow the instructions below. 

    • Open SQL Server Management Studio
    • Connect to emdash database instance
    • Expand SQL Server Agent
    • Expand Jobs
    • Double click “emdash-NotifyEnvironmentOwnerOfEndDate” job
    • Select Schedule
    • Add New Schedule
      • Provide Name, Frequency, Daily Frequency, Duration
      • Click OK
    • Edit Existing Schedule
      • Change Name, Frequency, Daily Frequency, Duration as required

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk