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.
- 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.
- 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.
- 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.
- 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.
Comments
- Anonymous
October 25, 2015
Nice one Doug! - Anonymous
October 26, 2015
NO funciona la instalación con Windows Server en Español: http://blog.asirsl.com/Lists/EntradasDeBlog/Post.aspx?ID=913, cuando será posible que se pueda instalar? - Anonymous
October 30, 2015
we are receiving this error "Error 1 - Failed to load config file - dashconfig.json"
Any thoughts as to what it could be?- Anonymous
October 11, 2016
Hi Tom, Have you solved this one? I've got the same error.Thanks,Luke
- Anonymous
- Anonymous
November 03, 2015
The comment has been removed - Anonymous
November 05, 2015
After followed the instruction I am still getting Error 1 - No aggregation data found in the StatsMan Data Cache. Please ensure you have , where as I am seeing on http://localhost:8080/healthcheck/ the knownserver count is 17.
Any help - Anonymous
November 05, 2015
basically the agent logs is showing Method not found
System.MissingMethodException: Method not found: 'Void System.Runtime.InteropServices.Marshal.StructureToPtr(!!0, IntPtr, Boolean)'.
at Microsoft.Diagnostics.Utils.ProcessLimiter.SetLimits(ProcessLimitInfo limits) - Anonymous
November 06, 2015
Install went fine, but "Skype for Business Server Statistics Manager Perf Agent" crashes on startup on Lync 2013 frontend server.
Faulting application name: PerfAgent.exe, version: 1.0.0.0, time stamp: 0x56258ce0
Faulting module name: KERNELBASE.dll, version: 6.2.9200.16451, time stamp: 0x50988aa6
Exception code: 0xe0434352
Fault offset: 0x000000000003811c
Faulting process id: 0x45f8
Faulting application start time: 0x01d1188bd38b712c
Faulting application path: C:Program FilesSkype for Business Server StatsMan AgentPerfAgent.exe
Faulting module path: C:Windowssystem32KERNELBASE.dll
Report Id: 1148ad97-847f-11e5-9405-00155d09150e
Faulting package full name:
Faulting package-relative application ID: - Anonymous
November 09, 2015
Any one came across this issue need help on this. - Anonymous
November 21, 2015
If skype for business Server Perf Agent is crashing. please install this .net framework 4.5.2 version web installer. it will resolve the issue and the service will stayed started. Took me long time research to figured this solution.
https://www.microsoft.com/en-us/download/details.aspx?id=42643 - Anonymous
November 21, 2015
Ensure the server is connected to internet when you download and run the .net framework version 4.5.2 web installer - Anonymous
November 23, 2015
Thanks @Olu, worked great. - Anonymous
December 04, 2015
It was not realla helpful for me. :(
I'm still having the error:
Faulting application name: PerfAgent.exe, version: 1.0.0.0, time stamp: 0x56258ce0
Faulting module name: KERNELBASE.dll, version: 6.1.7601.19018, time stamp: 0x560a0094
Exception code: 0xe0434352
Fault offset: 0x000000000000b3dd
Faulting process id: 0x1538
Faulting application start time: 0x01d12e953ec07a43
Faulting application path: C:Program FilesSkype for Business Server StatsMan AgentPerfAgent.exe
Faulting module path: C:Windowssystem32KERNELBASE.dll
Report Id: 7dce0bc9-9a88-11e5-bd29-00155d592f69
Any idea? - Anonymous
December 11, 2015
The comment has been removed - Anonymous
December 11, 2015
same error here :( - Anonymous
December 16, 2015
same error too on all s4b servers (( - Anonymous
December 17, 2015
Guys, check config
.perfagent.exe --action=checklistener
In my case, doesn't correct URI address - Anonymous
December 21, 2015
In my case, URI is correct, agent worked something like 2 days then now it crash after few seconds... - Anonymous
January 05, 2016
@Tamas Dobos, @Fabrice, @Konstantin Sidorenko, @Pavel Kuznetsov
I talked with the developers and they believe this is being caused by a known bug that has been fixed in the upcoming 1.1 release of Statistics Manager. - Anonymous
January 07, 2016
Thanks, great to know. I'm really looking forward for this new version ! - Anonymous
January 07, 2016
In my case, the Service was never created when I ran the Agent installation. Even after reboots, uninstalls and reinstalls, the service is never created. When the PerfAgent.exe is launched, I get the same error as everyone else, but in my case it is because it can't contact the service.
Anyone else see this? - Anonymous
January 15, 2016
Doug, Is there any roadmap to when the 1.1 release of Statistics Manager may be released? - Anonymous
January 15, 2016
Can't wait to use this app... Nice write up and very succinct . - Anonymous
January 19, 2016
@Tab Pierce
There's nothing to share at the moment. - Anonymous
February 03, 2016
Hi Olu, Thanks for your post. can you please let me know if I need to install the dot net 4.5.2 in the Lync front end server or in the statsman server? - Anonymous
February 08, 2016
I tested this with .NET 4.6 beta (4.5.3) and the behavior is unchanged.- Anonymous
July 20, 2016
For me the resolution was to change the service account from "NETWORK SERVICE" to "LOCAL SYSTEM". after this everything worked like a charm... It would be nice if we had the chance to set an account during setup...
- Anonymous
- Anonymous
March 22, 2016
Hi,We have deployed Statistics Manager for Skype4B few days back.When we open the http portal its only showing data for last 24 hours. We also tried applying Time range filters but they are not working. Any idea is this by design or some tweaks can fix it?Thanks,Mohit- Anonymous
April 25, 2016
Were you able to figure out how to increase the amount of data that is stored to more than 12 hours?
- Anonymous
- Anonymous
July 19, 2017
The comment has been removed