Technically Lync: Real-Time Monitoring

This article excerpt, by Dino Caputo, originally appeared here: http://ubm.io/1nG7bXD

How can you proactively be alerted to problems in your Lync infrastructure? As a Microsoft Certified System Engineer (MCSE) and a Microsoft Certified Technology Specialist (MCTS) in LCS 2005, OCS 2007 and Lync 2010 and 2013, I spend most of my time providing technical architecture, design and implementation expertise related to Lync environments.
I work with many customers that don’t have the luxury of using Microsoft System Center Operations Manager (SCOM) to monitor Lync Server. While I view and recommend SCOM as the preferred way to monitor Lync Server, I recognize that not every customer can make the investment required to do this.
If you have deployed Lync Server 2013 and are also using SCOM to monitor other Microsoft products, please refer to the TechNet article Configuring Lync Server to Work With System Center Operations Manager to get started on using SCOM to monitor your Lync deployment.
What About the Rest of Us?
So what about the rest of us that don’t use SCOM and want to monitor Lync Server 2013? There are a several third-party solutions that can also provide monitoring for Lync Server: Solarwinds Performance Monitoring and Management offers an on premise alternative to SCOM, while Unify2 PowerMon for Microsoft Lync offers a cloud-based monitoring solution for Lync.
Similar to SCOM, Solarwinds offers a more traditional, robust health and proactive monitoring solution with the ability to monitor both the server and application health of your Lync deployment, as well as provide for some customizations in the alerting mechanism. Since it is an on-premises solution, it does require some planning and a dedicated server, potentially also including the use of an existing SQL Server depending on the size of your deployment.
Unify2 PowerMon is a cloud-based solution allowing you to proactively monitor without having to do any complicated server deployments, making it a compelling offering for organizations wanting to save on server footprint and those looking to get monitoring started very quickly. Unify2 offers a free version, called Powermon Standard, which will monitor all aspects of a Lync deployment for up to a single Lync pool. A paid version supports larger deployments and also allows for outbound PSTN call testing.
Lync Synthetic Transactions: Doing Your Own Lync Monitoring
Lync Server provides a number of PowerShell cmdlets that will allow administrators to validate specific Lync functionality using something called Synthetic Transactions.
But What the Heck is a Synthetic Transaction? Imagine having the ability to have someone accessing your Lync environment 24×7, continually trying out all the features available, and giving you a “thumbs up” that all is okay or telling you there is a problem with a feature. Lync Synthetic Transactions allow you to do this — all without having to hire someone whose only job is to test Lync functionality for you all day and night long.
Lync Server 2013 currently provides 51 “Test” cmdlets that are available for administrators to ‘simulate’ Lync functionality as frequently as you want for your Lync deployment. You can have a look at the full list on TechNet here. Scroll down to the cmdlets that start with ‘Test-Cs’.
Okay Great, Now What?
By configuring a couple of test users, you can run these ‘Synthetic Transactions’ simulating what real Lync users might do during the course of a day. If you automate these tests, you could script an alert to be sent out in the event one or more tests fail, for example.
So let’s have a look at what you need to do to set this up:
Create Your Test Users
Create two test accounts, say “LyncSynthTest1″ and “LyncSynthTest2″ in Active Directory and disable them. These accounts don’t need to be enabled in Active Directory for you to take advantage of Synthetic Transactions. Your security folks will like that.
Enable Them for Lync
Next, enable the created test user accounts for Lync in the Lync Control Panel or by using the Lync Server Management Shell. You should grant these users all the available Lync functionality you presently use today. For example, enable them for Enterprise Voice (DID optional but recommended if you want to test certain PSTN calling capabilities), Remote Access and Conferencing if you want to be able to test these Lync functions.
Configure the Accounts for Synthetic Transactions in Lync
We will now configure these accounts in Lync. Lync Server allows you to predefine the test accounts that are generally required for the Test cmdlets so that you don’t have to always specify users when running Lync Synthetic Transaction tests. This is documented here.
Putting it all together you might run something like this:
New-CsHealthMonitoringConfiguration –Identity MyLyncServer –FirstTestUserSipUri sip:LyncSynthTest1@yoursipdomain.com –SecondTestUserSipUri sip:LyncSynthTest2@yoursipdomain.com
Let’s Start Testing
Now that we have defined our Health Monitoring Configuration, we can start testing. Let’s test out Presence on the front-end Pool LyncSE1.mydomain.com by running the following cmdlet in a Lync Management Shell:
PS C:\Users\administrator> Test-CsPresence -TargetFqdn LyncSe1.mydomain.com

Target Fqdn : LyncSe1.mydomain.com

Result : Success

Latency : 00:00:00.0631549

Error Message :

Diagnosis :
This should yield a “Success” as shown above, indicating that presence is working between the test users you configured. To see more information about the test, run it again using the -verbose switch to get more details.
SCOM Does Synthetic Transactions too
System Center Operations Manager (SCOM) provides a management pack for Lync Server as well as an optional role called the “Watcher Node” (No this isn’t the Keanu Reeves movie from 2000…) The Watcher Node is what SCOM uses to execute the Lync Synthetic Transactions and report back to it for alerting.
Monitor Away
Lync Synthetic monitoring can be a very powerful feature to use in your environment in order to alert you as soon as there is a problem. By coupling cmdlets with alerting mechanisms you can very easily deploy your own proactive monitoring solution or supplement an existing monitoring solution you are already running.
Whether you use SCOM, a third-party tool or “roll your own” solution, I can’t stress enough how important it is to be proactive in your approach to managing and operating your Lync Server infrastructure — so monitor away!