Welcome!

Blog Feed Post

Lync 2013 Centralized Logging (CLS) - customizing scenarios

If you've had to troubleshoot server side issues in an OCS\Lync environment then you are familiar with OCSLogger.exe tool. The OCSLogger tool is installed as part of the debugging tools which can be download from the Microsoft Download Center (link below). Although this is a great tool for collecting data it has one major downside "Lack of Centralization". So this means that when troubleshooting issues you would have to go to each OCS\Lync server, set your logging levels and flags, start logging, repro the issue, stop logging, and then analyze each log individually. This turned into a major project if you had a lot of servers that data was collected on. With the introduction of 2013, logging got a significant overhaul, now named Centralized Logging Service (CLS).
For this article I am going to focus on how to custom collections (called Scenarios) rather than the architecture of the centralized logging service (links below). The collections within CLS utilize Scenarios which are made up of providers. The providers are made up of components, logging level, and Flags which is similar to how OCSLogger collects data. By default, CLS has 29 built-in Scenarios (Figure 1) which can be used for some common troubleshooting situations that might occur. If you want to see what components each of these scenarios contain along with the levels and flags, run the following command:

·         Get-CsClsScenario <Scenario_Name> | Select –ExpandProperty Provider | FT Name,Level,Flags -Auto

Figure 1: Default CLS Scenarios

Although these default scenarios might work for common issues what if we need to customize the data we collect? To achieve this we need to create custom providers and group them into custom scenarios. In order to create providers we need to determine the components, flags, and level that we want to capture for that data. There are 257 different components we can capture data on which I have listed in the text file below. These were gathered from C:\Program Files\Common Files\Microsoft Lync Server 2013\Tracing\default.xml.
.
(Please visit the site to view this file)
.
First we need to create our providers and put those into variables:
$a=New-CsClsProvider –Name "Component1" –Type WPP –Level Verbose –Flags All
$b=New-CsClsProvider –Name "Component2" –Type WPP –Level Verbose –Flags All
$c=New-CsClsProvider –Name "Component3" –Type WPP –Level Verbose –Flags All
 
Second we will add those 3 provider variables into a custom scenario named "NewScenario":
New-CsClsScenario -Identity "Global/NewScenario" -Provider @{add=$a,$b,$c} –verbose
 
Lastly we capture the data:
Start-CsClsLogging –Scenario "NewScenario"
Repro the Issue
Sync-CsClsLogging
Stop-CsClsLogging – Scenario "NewScenario"
Search-CsClsLogging –OutputFilePath c:\newscenario.log (data can be filtered if needed)
Open newscenario.log with Snooper (Snooper is also a part of the debugging tools)
 
There are a couple of things that are important when creating customs scenarios which could cause headaches if not done properly.

·         After creating a custom scenario you MUST restart the Lync shell before the start command will recognize the new scenario.

·         In OCSLogger most of the time we set the –Level to "All". With CLS in some scenarios setting the –Level to "All" will result in no data being captured. By setting this to "Verbose" you avoid this issue and still capture all the data.

·         In order to collect data on Edge servers you must have ports 50001, 50002, and 50003 open outbound from the machine you are running these commands on (CLS Controller) to the Edge servers.

 
Examples:
CMS Replication
$a=New-CsClsProvider –Name “XDS_File_Transfer_Agent” –Type WPP –Level Verbose –Flags All
$b=New-CsClsProvider –Name “XDS_Master_Replicator” –Type WPP –Level Verbose –Flags All
$c=New-CsClsProvider –Name “XDS_Replica Replicator” –Type WPP –Level Verbose –Flags All
New-CsClsScenario -Identity "Global/CMSReplAll" -Provider @{add=$a,$b,$c} –verbose
 
Persistent Chat
$a=New-CsClsProvider –Name "ChatCommon" –Type WPP –Level Verbose –Flags All
$b=New-CsClsProvider –Name "ChatEndpoint" –Type WPP –Level Verbose –Flags All
$c=New-CsClsProvider –Name "ChatServer" –Type WPP –Level Verbose –Flags All
$d=New-CsClsProvider –Name "ChatWebService" –Type WPP –Level Verbose –Flags All
New-CsClsScenario -Identity "Global/Chat" -Provider @{add=$a,$b,$c,$d} –verbose
 
I recently did a presentation for the Lync User Group (lyncug.com – created by Kevin Peters and Jeff Schertz) and they brought up some good points on why you might still use OCSLogger. CLS can only run one scenario (In addition to AlwaysOn), so if you need to run multiple scenarios at once you will need to utilize OCSLogger. If you need to use OCSLogger with Lync 2013 you should replace the default.tmx file so that you see all the components.
- Copy the “default.tmx” file from C:\Program Files\Common Files\Microsoft Lync Server 2013\Tracing to C:\Program Files\Microsoft Lync Server 2013 Debugging Tools and overwrite the existing file. It's always good to rename the old file before overwriting.
 
Hope this helps people avoid some of the issues I commonly run into with CLS.
Using the Centralized Logging Service - http://technet.microsoft.com/en-us/library/jj688101.aspx
 

Read the original blog entry...

More Stories By Richard Schwendiman

My name is Richard Schwendiman and I am currently working for Microsoft as a (PFE) Premier Field Engineer specializing in both Exchange and Lync. I have been working as an IT Consultant for 13+ years focusing on a wide array of Infrastructure technologies. These technologies include Messaging, UC, Networking, Platforms, Active Directory, Virtualization, etc... I am currently certified as an MCSE (Microsoft Certified Systems Engineer), MCSE Messaging 2013, MCSE Communications 2013, MCSA 2012, MCITP Enterprise Messaging, MCTS-Lync, CCNA (Cisco Certified Network Associate), Commvault, CCNP (Cisco Certified Network Professional), and JNCIA-ER (Juniper Enterprise Routing). I am hoping that through this blog I can bring knowledge from the field and keep everyone informed about our ever changing Industry. Please feel free to email me any questions, comments, or concerns pertaining to this blog or any technology related things. Thanks and look forward to providing some good content. http://blogs.technet.com/b/rischwen/

Latest Stories
SYS-CON Events announced today that DXWorldExpo has been named “Global Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Digital Transformation is the key issue driving the global enterprise IT business. Digital Transformation is most prominent among Global 2000 enterprises and government institutions.
SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
SYS-CON Events announced today that Calligo, an innovative cloud service provider offering mid-sized companies the highest levels of data privacy and security, has been named "Bronze Sponsor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Calligo offers unparalleled application performance guarantees, commercial flexibility and a personalised support service from its globally located cloud plat...
"We focus on SAP workloads because they are among the most powerful but somewhat challenging workloads out there to take into public cloud," explained Swen Conrad, CEO of Ocean9, Inc., in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"Outscale was founded in 2010, is based in France, is a strategic partner to Dassault Systémes and has done quite a bit of work with divisions of Dassault," explained Jackie Funk, Digital Marketing exec at Outscale, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I think DevOps is now a rambunctious teenager – it’s starting to get a mind of its own, wanting to get its own things but it still needs some adult supervision," explained Thomas Hooker, VP of marketing at CollabNet, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We are still a relatively small software house and we are focusing on certain industries like FinTech, med tech, energy and utilities. We help our customers with their digital transformation," noted Piotr Stawinski, Founder and CEO of EARP Integration, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We've been engaging with a lot of customers including Panasonic, we've been involved with Cisco and now we're working with the U.S. government - the Department of Homeland Security," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"We're here to tell the world about our cloud-scale infrastructure that we have at Juniper combined with the world-class security that we put into the cloud," explained Lisa Guess, VP of Systems Engineering at Juniper Networks, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...
"With Digital Experience Monitoring what used to be a simple visit to a web page has exploded into app on phones, data from social media feeds, competitive benchmarking - these are all components that are only available because of some type of digital asset," explained Leo Vasiliou, Director of Web Performance Engineering at Catchpoint Systems, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
"We want to show that our solution is far less expensive with a much better total cost of ownership so we announced several key features. One is called geo-distributed erasure coding, another is support for KVM and we introduced a new capability called Multi-Part," explained Tim Desai, Senior Product Marketing Manager at Hitachi Data Systems, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
"I'm here to leverage my secret sauce, which is using outsourced development and the company that I utilize is delaPlex Software and they've basically allowed me to win Fortune 500 companies," noted Justin Witz, CTO of FRA and PlanTools, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.