Skype for Business Server Real-Time Statistics Manager

Update 4/20/16 – Added information on upgrading Statistics Manager.

A pretty cool new tool is available to help administrators monitor their Skype for Business/Lync servers in real time.  From the Plan for Statistics Manager in Skype for Business Server 2015 TechNet article:

Skype for Business Server Statistics Manager is a powerful tool that allows you to view Skype for Business Server health and performance data in real time. You can poll performance data across hundreds of servers every few seconds, and view the results instantly on the Statistics Manager Website.

You can use Statistics Manager to pinpoint ongoing performance issues, view the results of a planned change to your environment, track resolution of outages, and much more. Out of the box, Statistics Manager is configured with Key Health Indicator (KHI) thresholds, and can be customized to suit your deployment’s unique needs.

You can deploy Statistics Manager in an on-premises deployment in which a single server hosts all of the server-side Statistics Manager components.

Statistics Manager allows you to:

  • View raw data for all servers in real time. (Data is sampled at a very high rate and sent to the website in less than one second.)
  • View data that is aggregated for a specific role; for example, Front End Server, Mediation Server, Edge Server, and so on.
  • Drill down to view data for specific sites, specific pools within the site, and then specific servers within the pool.
  • Create custom charts so that chosen counters are shown by default.
  • Zoom and pan on both the x- and y- axes or on the x-axis only.
  • Use date ranges or points in time to filter data.
  • View server performance based on established key health indicators (KHIs). KHIs represent a collection of performance counters with a defined healthy range.
  • View detailed metrics for each counter.
  • Compare data across multiple populations or servers.
  • View latent counter reports to identify agents that are not reporting current data to the dashboard service.
  • Save a particular instance of chart data to a file.
  • View KHIs in real time, including updates. If the history view is enabled, only new failures are shown.
    • View all KHIs at one time
    • View KHIs by server (Landscape view)
    • View KHI definitions

Statistics Manager is made up of the following components:

  • Agent - A lightweight agent that runs on each monitored server. The Agent allows configurable high rate polling of performance counters with local aggregation.
  • Listener -  The server side API that receives data from all Agents, and aggregates data across populations.
  • Hub - Serves as the client API for the system, runs on the web server(s), and provides real-time data updates to clients connected via the website. (The Hub is automatically installed as part of the Website msi.)
  • Website -  A user interface that pulls together all the features available in the system.

In addition, Statistics Manager requires Redis, an open-sourced data structure server for in-memory caching. You can get Redis on Windows here.  The rest of the requirements are listed here.  You can download Skype for Business Server, Real-Time Statistics Manager (64-bit) here.

 

Deploying Statistics Manager

You first need to install Redis on the server that you are going to use for Statistics Manager.  Double-click on the Redis .msi and follow the Setup Wizard:

Click Next.

After accepting the terms in the License Agreement, click Next.

Click Next.

Uncheck "Add an exception to the Windows Firewall" and then click Next.

Click Next.

Click Install.

Once the install has completed successfully, click Finish.  Next you will need to install the Listener service.  Double-click on the StatsManPerfAgentListener.msi and follow the Setup Wizard:

 

Click Next.

After accepting the terms in the License Agreement, click Next.

Specify the following information:

  • Service Password -  This is the password the remote Agents will use to authenticate to the Listener service.
  • Service Port -  This is the HTTPS port number that the Listener will use to communicate with the Agents. During installation, this port will be allowed through the local firewall, a URL ACL will be created, and an SSL cert will be bound to this port. The default is 8443.
  • Certificate Thumbprint -   This is the certificate thumbprint the Listener will use to encrypt the HTTPS protocol. Network Service must have read access to the private key.
  • Install Dir -  This is the directory on which the binaries will be installed. You may change it from the default by using the Browse... button.
  • AppData Dir -  This is the directory where the Logs folder and other data will be stored. You may change it from the default. It will not be deleted on uninstall.

For the certificate, I used a certificate from my local CA with a subject name of the FQDN of my Statistics Manager server.  The certificate is used for communications between the agent and the listener, so it doesn't need to be from a CA that is trusted by clients.  You could use a self-signed certificate, although that isn't recommended.  If you need to use a self-signed certificate, instructions on how to create on are listed in the Deploy Statistics Manager in Skype for Business Server 2015 TechNet article.  Once you've filled out all the fields, click Install.

Once the install has completed successfully, click Finish.  Next you can verify that the Listener service is functioning properly.  In a web browser, go to https://localhost:8443/healthcheck:

Continue through the certificate warning, since the URL doesn't match the subject name on the certificate.

Verify that the KnownServerCount is 1 or higher.  This means that the connection to Redis is established.  Next you will need to install the Website.  Double-click on the StatsManWebSite.msi and follow the Setup Wizard:

 

Click Next.

After accepting the terms in the License Agreement, click Next.

Specify the following information:

  • Service Port -  This is the port number the web site will listen on. You can change it later by using IIS manager binding. During installation, this port will be allowed through the local firewall.
  • Install Dir -  This is the directory where the binaries will be installed. You may change it from the default by using the Browse... button.
  • AppData Dir -  This is the directory where the Logs folder and other data will be stored. You may change it from the default. It will not be deleted on uninstall.

Once you've filled out all the fields, click Install.

The Setup Wizard will install IIS and the features necessary.  This part of the setup may take a couple minutes.

Once the install has completed successfully, click Finish.  Next you can verify that the Website is functioning properly.  In a web browser, go to https://localhost:8080:

If you get the error message above, most likely there aren't any agents installed yet, or they've just started reporting and you just need to wait.  You can also go to https://localhost:8080/healthcheck to see health information about Statistics Manager:

Next you will need to install the Agent on your servers.  From a Skype for Business 2015 or Lync Server 2013 server double-click on the StatsManPerfAgent.msi and follow the Setup Wizard:

Click Next.

After accepting the terms in the License Agreement, click Next.

Specify the following information:

  • Service Password - This is the password the remote agent will use to authenticate to the Listener service.  It is the same password that you specified when installing the Listener service.
  • Service URI - This is the URI where the Listener resides.  It should use the https://name:port format.You can use a NETBIOS name or a FQDN. You can use the name that is also specified as the Subject or Subject Alternative Names of the certificate on the Listener service, but this is not a requirement.
  • Service Thumbprint -   This is the thumbprint of the SSL certificate the Listener is using. The Agent will use this thumbprint to authenticate to the Listener. (It will not do full certificate validation because it is possible to use self-signed certificates.)
  • Install Dir - This is the directory on which the binaries will be installed. You may change it from the default by using the Browse... button.
  • AppData Dir - This is the directory where the Logs folder and the encrypted password.txt file will be stored. You may thanks change it from the default. It will not be deleted on uninstall.

Once you've filled out all the fields, click Install.

Once the install has completed successfully, click Finish.  Repeat the Agent installation steps on all of the servers that you want to monitor, including Edge Servers.  If you choose to install the Agent on an Edge Server, make sure that you have a firewall rule setup for the Edge Server internal interface to be able to talk to the Statistics Manager server on the Listener service port (8443 by default).  If you'd like to automate the installation of the Agent to the Skype for Business/Lync servers, the Deploy Statistics Manager in Skype for Business Server 2015 TechNet article has some information on how to do an unattended install.  Next you will need to import the Skype for Business/Lync Server topology so that Statistics Manager knows about the Site(s), Pool(s), and Role(s) of each server.  To be able to import the topology, you will first need to export the topology.  Keep in mind that this isn't the same as exporting the topology when you're doing an Edge Server install.  You will run the following PowerShell cmdlet on a server that has the Skype for Business/Lync Server PowerShell cmdlets available:

Get-CsPool | Export-Clixml -Path mypoolinfo.xml


Note: You may need to click on the image above in order to read the text.

Once the PowerShell cmdlet is finished, copy the file to the Statistics Manager server and then navigate to the directory where the Listener service is installed (C:\Program Files\Skype for Business Server StatsMan Listener by default) and then run the following PowerShell script:

.\Update-StatsManServerInfo.ps1 -CsPoolFile  <path to mypoolinfo.xml>


Note: You may need to click on the image above in order to read the text.

Say Yes (Y) when asked "Are you ready to update key redishash:///_ServerInfo on localhost".  Once the PowerShell script completes successfully, after a couple of minutes is you go to https://localhost:8080, you should start to see information start to be displayed.  You can create your own custom dashboards to display the information that is important to you.  You can also drill into specific counters and get real time updates.  There is also a KHI section that displays a nice high level dashboard of the health of your Skype for Business/Lync Server environment:

 

Upgrading Statistics Manager

Before you upgrade, be sure you have the following information:

  • Active Listener Certificate Thumbprint
  • Listener Service Password (entered on install of the listener and every agent)
  • SSL Certificate configuration for the website

Automated upgrade

The script will gather your current certificate information and listener password, uninstall the old version of the product, and then install the new version of the product. The Redis instance installed on the server will not be touched, so any data stored in the cache will be retained through the upgrade process.

  1. Place the MSI files for the new version of the agent, listener and website along with the Update-StatsMan.ps1 script into a single folder on the Listener computer.
  2. Open an administrative PowerShell window. Upgrade the Listener component:
    .\Update-StatsMan.ps1 -Service Listener
    • On running the script, you should be prompted to uninstall the old version of the product. Answer Yes
    • If the Listener service is running, you will be promoted to close the application before continuing. Allow the application to close (the Statistics Manager Listener service will be stopped).
    • Continue the install process. You should notice that the service password and certificate thumbprint are pre-populated. If not, add the values you saved before continuing.
  3. Open an administrative PowerShell window. Upgrade the Website component:
    .\Update-StatsMan.ps1 -Service Website
    • On running the script, you should be prompted to uninstall the old version of the product. Answer Yes.
    • If the Agent service is running, you will be promoted to close the application before continuing. Allow the application to close (the StatsMan Agent service will be stopped).
    • Continue the install process. You should notice that the service password and certificate thumbprint are pre-populated. If not, add the values you saved before continuing.
  4. Open an administrative PowerShell window. Upgrade the Agent component:
    .\Update-StatsMan.ps1 -Service Agent
    • On running the script, you should be prompted to uninstall the old version of the product. Answer Yes.
    • Continue the install process. You should notice that the website port is pre-populated. If not, add the value you saved before continuing.
    • Verify the website is working as expected using the browser.

The Agent upgrade can be used with the -NoPrompt switch. This will allow the uninstall/install process to run silently, allowing tools such as PSExec to run the upgrade remotely on a large number of servers.

You can get more information on upgrading in the Upgrade Statistics Manager for Skype for Business Server 2015 TechNet article.

 

Statistics Manager is a valuable tool that allows you to view Skype for Business/Lync Server health and performance data in real time.