High Availability Scenario 2: Using a Witness

Introduction

In this scenario, there is a third server, that is not an A365 Application Server. This so-called Witness Server, monitors both the active A365 Application Server as well as the passive A365 Application Server. The benefit of this scenario is that network connectivity will not interfere with the decision to take over the Unified Contact Center service from the active to the passive server. As soon as the Witness Server detects the Unified Contact Center service on the active A365 Application Server is not running it will start the service on the passive A365 Application Server and vice versa.

 

Configure the witness server to monitor the active server

The following steps should be taken to let the Witness Server, monitor the active A365 Application Server:

  1. Create the folder: C:\Scripts\A365 on the Witness Server.

  2. Copy the PowerShell-script ‘wsp-ha-check.ps1’ to this folder.

  3. Rename the PowerShell-script ‘wsp-ha-check.ps1’ to ‘wsp-ha-check-server1.ps1’

  4. Edit the PowerShell-script ‘wsp-ha-check-server1.ps1’ and change the following properties accordingly:

    • activeServer - The FQDNA fully qualified domain name (FQDN), sometimes also referred as an absolute domain name, is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System (DNS). of the active A365 Application Server. FQDN = Servername + Domainname.
    • passiveServer - The FQDN of the passive A365 Application Server.
    • taskNamePassiveServer - The name of the Scheduled Task that runs from the Witness Server and monitors the active A365 Application Server.
    • taskNameActiveServer - The name of the Scheduled Task that runs from the Witness Server and monitors the passive A365 Application Server once this server takes over.
    • emailTo - A list of email addresses that will receive an email if one of the two (or both) A365 Application Servers cannot be pinged, or if the passive A365 Application Server is started.
    • smtpServer - SMTP server that can be used for sending email; e.g. smtp.office365.com
    • smtpPort - Port that is used to connect to the SMTP server for sending email; e.g. 587.
    • emailFrom - The email address of the sender.
    • emailPass - The password that matches the email address of the sender; if required.
    • useSsl - a Boolean (y/n) A boolean defining whether or not the mails should be send with/without SSL
    • checkRetries - The number of times the script consecutively checks whether or not the Unified Contact Center service is running on the active A365 Application Server.
    • services - Names of the Anywhere365 Services that should be enabled/disabled in case of a failover.

  5. Create a Scheduled Task on the Witness Server.

    • Name - This name should equal the variable “taskNamePassiveServer” in the PowerShell-script ‘wsp-ha-check-server1.ps1’ on the Witness Server.
    • User Account - Select the User Account that runs the scheduled task (log on as a batch job rights are required).
    • Run whether user is logged on or not - Check this box to make sure that the task will run properly at all times.
    • Run with highest privileges - Check this box to make sure that the User Account has enough rights to take required actions during execution of the script.
  6. Create a new Trigger

    • Begin the task - On a schedule
    • Settings - One time
    • Select start date + start time
    • Advanced settings:
      • Repeat task every: 1 minute
      • For a duration of: Indefinitely
      • Enabled: true
  7. Create a new Action:

    • Action - Start a program
    • Settings:
      • Program/script: powershell.exe
      • Add arguments (optional): -file "C:\Scripts\A365\wsp-ha-check.ps1"

 

Configure the witness server to monitor the passive server

Note that below steps are similar to the steps that should be taken on the passive A365 Application server, only the variables activeServer and passiveServer are flipped, as well as the variables taskNameActiveServer and taskNamePassiveServer.

The following steps should be taken to let the Witness Server, monitor the passive A365 Application Server:

  1. Create the folder: C:\Scripts\A365 on the Witness Server.

  2. Copy the PowerShell-script ‘wsp-ha-check.ps1 to this folder.

  3. Rename the PowerShell-script ‘wsp-ha-check.ps1’ to ‘wsp-ha-check-server2.ps2’.

  4. Edit the PowerShell-script ‘wsp-ha-check-server2.ps1’ and change the following properties accordingly:

    • activeServer - The FQDN of the A365 Application Server that is currently passive, FQDN = Servername +Domainname.
    • passiveServer - The FQDN of the currently active A365 Application Server
    • taskNamePassiveServer - The name of the Scheduled Task that runs from the Witness Server and monitors the passive A365 Application Server once this server takes over.

      This name should match the variable ‘taskNameActiveServer’ in the PowerShell-script ‘wsp-ha-check-server1.ps1’ on the Witness Server

    • taskNameActiveServer - The name of the Scheduled Task that runs from the Witness Server and monitors the active A365 Application Server.

      This name should match the variable ‘taskNamePassiveServer’ in the PowerShell-script ‘wsp-ha-check-server1.ps1’ on the Witness Server.

    • emailTo - A list of email addresses that will receive an email if one of the two (or both) A365 Application Servers cannot be pinged, or if the passive A365 Application Server is started.
    • smtpServer - SMTP server that can be used for sending email; e.g. smtp.office365.com
    • smtpPort - Port that is used to connect to the SMTP server for sending email; e.g. 587.
    • emailFrom - The email address of the sender.
    • emailPass - The password that matches the email address of the sender; if required.
    • useSsl - a Boolean (y/n) A boolean defining whether or not the mails should be send with/without SSL
    • checkRetries - The number of times the script consecutively checks whether or not the Unified Contact Center service is running on the active A365 Application Server.
    • services - Names of the Anywhere365 Services that should be enabled/disabled in case of a failover.

  5. Create a second Scheduled Task on the Witness Server.

    • Name - This name should equal the variable “taskNamePassiveServer” in the PowerShell-script ‘wsp-ha-check-server2.ps1’ on the Witness Server.
    • User Account - Select the User Account that runs the scheduled task (log on as a batch job rights are required).
    • Run whether user is logged on or not - Check this box to make sure that the task will run properly at all times.
    • Run with highest privileges - Check this box to make sure that the User Account has enough rights to take required actions during execution of the script.
  6. Create a new Trigger

    • Begin the task - On a schedule
    • Settings - One time
    • Select start date + start time
    • Advanced settings:
      • Repeat task every: 1 minute
      • For a duration of: Indefinitely
      • Enabled: true
  7. Create a new Action:

    • Action - Start a program
    • Settings:
      • Program/script: powershell.exe
      • Add arguments (optional): -file "C:\Scripts\A365\wsp-ha-check.ps1"
  8. Disable the second Scheduled Task that is just created.

 

Test HA Check!

To test the simply stop the Unified Contact Center on the active A365 Application Server, make sure you choose an appropriate time to do so, the passive A365 Application Server should take over. The Unified Contact Center service on the server that was previously passive should now be running.

And the Scheduled Task on the Witness Server monitoring this (Server 1) should have a status 'Disabled'.

On the previously active server, the UCCUCC stands for Unified Contact Center and consists of a queue that can be handled by Agents Each Contact Center has its own settings, interactive voice response questions and Agent with specific skills. Agents can be member of, or sign up to, one or more Contact Centers. service should be 'Disabled' and the Scheduled Task on the Witness Server monitoring this (Server 2) should be 'Running'. Re-do the test to make sure this scenario works both ways.