在 Lync Server 2013 中配置观察程序节点测试用户和配置设置Configuring watcher node test users and configuration settings in Lync Server 2013

 

上次修改的主题: 2013-07-29Topic Last Modified: 2013-07-29

在配置将充当观察程序节点的计算机之后,您必须:After configuring the computer that will act as a watcher node, you must:

  1. 创建可供这些观察程序节点使用的测试帐户。Create the test accounts to be used by these watcher nodes. 如果您使用的是 Negotiate 身份验证方法,则必须同时使用 Set-CsTestUserCredential cmdlet 来启用这些测试帐户,以在观察程序节点上使用。If you are using the Negotiate authentication method, you must also use the Set-CsTestUserCredential cmdlet to enable these test accounts for use on the watcher node.

  2. 更新观察程序节点配置设置。Update the watcher node configuration settings.

本节介绍:This section covers:

  • 配置测试用户帐户Configuring Test User Accounts

  • 使用默认综合事务配置基本观察程序节点Configuring a Basic Watcher Node with the Default Synthetic Transactions

  • 配置扩展的测试Configuring Extended Tests

  • 添加和删除综合事务Adding and Removing Synthetic Transactions

  • 查看和测试观察程序节点配置Viewing and Testing the Watcher Node Configuration

配置测试用户帐户Configuring Test User Accounts

测试用户不需要表示实际人员,但必须是有效的 Active Directory 域服务帐户;此外,必须为 Lync Server 2013 启用这些帐户,它们必须具有有效的 SIP 地址,并且应为企业语音 (启用这些帐户,才能使用 Test-CsPstnPeerToPeerCall 综合事务) 。Test users do not need to represent actual people, but they must be valid Active Directory Domain Services accounts; in addition, these accounts must be enabled for Lync Server 2013, they must have valid SIP addresses, and they should be enabled for Enterprise Voice (to use the Test-CsPstnPeerToPeerCall synthetic transaction). 如果使用 TrustedServer 身份验证方法,则您所需要做的就是确保这些帐户存在并且已按此处所指定的那样进行配置。If you use the TrustedServer authentication method, then all you need to do is to make sure that these accounts exist and have been configured as specified here. 您应为要测试的每个池至少分配三个测试用户。You should assign at least three test users for each pool that you want to test.

如果使用的是协商身份验证方法,则还必须使用 CsTestUserCredential Cmdlet 和 Lync Server 命令行管理程序,以使这些测试帐户能够处理综合事务。If you are using the Negotiate authentication method, you must also use the Set-CsTestUserCredential cmdlet and the Lync Server Management Shell to enable these test accounts to work with the synthetic transactions. 您可以通过运行与以下类似的命令来执行此操作(这些命令假设已创建三个 nm-ad-2nd 用户帐户,并且已针对 nm-server-w15-long 启用这些帐户。You can do this by running a command similar to the following. (这些命令假定已经创建了三个 Active Directory 用户帐户,并且已为这些帐户启用了 Lync Server 2013。 ) :(These commands assume that the three Active Directory user accounts have already been created and that those accounts have been enabled for Lync Server 2013.):

Set-CsTestUserCredential -SipAddress "sip:watcher1@litwareinc.com" -UserName "litwareinc\watcher1" -Password "P@ssw0rd"
Set-CsTestUserCredential -SipAddress "sip:watcher2@litwareinc.com" -UserName "litwareinc\watcher2" -Password "P@ssw0rd"
Set-CsTestUserCredential -SipAddress "sip:watcher3@litwareinc.com" -UserName "litwareinc\watcher3" -Password "P@ssw0rd"

请注意,不仅必须包括 SIP 地址,而且还要包括用户名和密码。Note that you must include not only the SIP address but also the user name and password. 如果不包括密码,Set-CsTestUserCredential 将提示您输入该信息。If you do not include the password Set-CsTestUserCredential will prompt you to enter that information. 可以使用 \ 上面显示的域名用户名格式或使用格式用户 name@domain 名称来指定用户名; 例如:The user name can be specified using the domain name\user name format shown above, or by using the format user name@domain name; for example:

-UserName "watcher3@litwareinc.com"

若要验证是否已创建测试用户凭据,请在 Lync Server 命令行管理程序中运行以下命令:To verify that the test user credentials were created, run these commands from within the Lync Server Management Shell:

Get-CsTestUserCredential -SipAddress "sip:watcher1@litwareinc.com"
Get-CsTestUserCredential -SipAddress "sip:watcher2@litwareinc.com"
Get-CsTestUserCredential -SipAddress "sip:watcher3@litwareinc.com"

应针对每个用户返回与以下类似的信息:Information similar to this should be returned for each user:

UserName                        Password
--------                        --------
Litwareinc\watcher1              System.Security.SecureString

使用默认综合事务配置基本观察程序节点Configuring a Basic Watcher Node with the Default Synthetic Transactions

在创建测试用户之后,您可以使用与以下类似的命令创建观察程序节点:After the test users have been created you can then create a watcher node by using a command similar to this:

New-CsWatcherNodeConfiguration -TargetFqdn "atl-cs-001.litwareinc.com" -PortNumber 5061 -TestUsers @{Add= "sip:watcher1@litwareinc.com","sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"}

此命令会创建一个新的观察程序节点,该节点使用默认设置并运行默认的综合事务集。This command creates a new watcher node that uses the default settings and runs the default set of synthetic transactions. 新的观察程序节点还使用测试用户 watcher1@litwareinc.com、watcher2@litwareinc.com 和 watcher3@litwareinc.com。The new watcher node also uses the test users watcher1@litwareinc.com, watcher2@litwareinc.com, and watcher3@litwareinc.com. 如果观察程序节点使用的是 TrustedServer 身份验证,则这三个测试帐户可以是为 Active Directory 和 Lync Server 启用的任何有效的用户帐户。If the watcher node is using TrustedServer authentication, the three test accounts can be any valid user accounts enabled for Active Directory and Lync Server. 如果观察程序节点使用的是 Negotiate 身份验证方法,您必须同时使用 Set-CsTestUserCredential cmdlet 为观察程序节点启用这些用户帐户。If the watcher node is using the Negotiate authentication method, you must also enable these user accounts for watcher node by using the Set-CsTestUserCredential cmdlet.

配置扩展的测试Configuring Extended Tests

如果您想要启用公用电话交换网(PSTN 测试),以验证与公用电话交换网的连接,则需要在设置观察程序节点时执行一些额外的配置。If you want to enable the public switched telephone network (PSTN test), which verifies connectivity with the public switched telephone network, you will need to do some additional configuration when setting up the watcher node. 首先,您需要将测试用户与 PSTN 测试类型相关联。First, you need to associate your test users with the PSTN test type. 若要执行此操作,请在 Lync Server 命令行管理程序中运行与以下内容类似的命令:To do that, run a command similar to this from within the Lync Server Management Shell:

$pstnTest = New-CsExtendedTest -TestUsers "sip:watcher1@litwareinc.com", "sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"  -Name "Contoso Provider Test" -TestType PSTN

请注意,必须将此命令的结果存储在变量中。Note that the results of this command must be stored in a variable. 在此示例中,指的是名为 $pstnTest 的变量。In this example, that's a variable named $pstnTest.

此时,您可以使用 new-cswatchernodeconfiguration cmdlet 将变量 $pstnTest) 中存储 (测试类型与 Lync Server 2013 池相关联。At this point, you can use the New-CsWatcherNodeConfiguration cmdlet to associate the test type (stored in the variable $pstnTest) to a Lync Server 2013 pool. 例如,下列命令会为池 atl-cs-001.litwareinc.com 创建新的观察程序节点配置,从而添加先前已创建的三个测试用户,并同时添加 PSTN 测试类型:For example, the following command creates a new watcher node configuration for the pool atl-cs-001.litwareinc.com, adding the three test users that were created previously, and also adding the PSTN test type:

New-CsWatcherNodeConfiguration -TargetFqdn "atl-cs-001.litwareinc.com" -PortNumber 5061 -TestUsers @{Add= "sip:watcher1@litwareinc.com","sip:watcher2@litwareinc.com", "sip:watcher3@litwareinc.com"} -ExtendedTests @{Add=$pstnTest}

请注意,如果尚未在观察程序节点计算机上安装 Lync Server core 文件和 RTCLocal 数据库,则上述命令将失败。Note that the preceding command will fail if you have not installed the Lync Server core files and the RTCLocal database on the watcher node computer.

要测试多个语音策略,需要使用 New-CsExtendedTest cmdlet 为每个策略创建一个扩展测试。To test multiple voice policies, you need to create an extended test for each policy by using the New-CsExtendedTest cmdlet. 应使用所需的语音策略对分配给此测试的用户进行配置。The users assigned to this test should be configured with the desired voice policies. 然后,使用与以下类似的命令将扩展测试传递到 New-CsWatcherNodeConfiguration cmdlet:The extended tests are then passed to the New-CsWatcherNodeConfiguration cmdlet by using a command similar to the following:

-ExtendedTests @{Add=$pstnTest1,$pstnTest2,$pstnTest3}

如果在未使用 Tests 参数的情况下呼叫 New-CsWatcherNodeConfiguration,则表示只会针对新的观察程序节点启用默认综合事务(以及指定的扩展综合事务)。这意味着该观察程序节点将测试以下组件:If New-CsWatcherNodeConfiguration is called without using the Tests parameter, that means that only the Default synthetic transactions (and the specified extended synthetic transaction) will be enabled for the new watcher node. This means that the watcher node will test the following components:

  • RegistrationRegistration

  • IMIM

  • GroupIMGroupIM

  • P2PAV(对等音频/视频会话)P2PAV (peer-to-peer audio/video sessions)

  • AvConference(音频/会议)AvConference (audio/conferencing)

  • 状态Presence

  • ABS(通讯簿服务)ABS (Address Book service)

  • ABWQ(通讯簿 Web 服务)ABWQ (Address Book web service)

  • PSTN(PSTN 网关呼叫,指定为扩展测试。默认情况下会禁用 PSTN。只是因为命令使用 ExtendedTests 参数启用了 PSTN,所以在这种情况下才会启用测试。)PSTN (PSTN gateway calls, specified as an extended test. By default, PSTN is disabled. The test is enabled in this case only because the command enabled PSTN by using the ExtendedTests parameter.)

这还意味着在默认情况下不会测试以下组件:This also means that the following components will not be tested by default:

  • AVEdgeConnectivityAVEdgeConnectivity

  • MCXP2PIM(移动设备即时消息)MCXP2PIM (mobile device instant messaging)

  • ExumConnectivity(Exchange 统一消息)ExumConnectivity (Exchange Unified Messaging)

  • JoinLauncherJoinLauncher

  • PersistentChatMessagePersistentChatMessage

  • DataConferenceDataConference

  • XmppIMXmppIM

  • UnifiedContactStoreUnifiedContactStore

添加和删除综合事务Adding and Removing Synthetic Transactions

在配置观察程序节点之后,您可以使用 Set-CsWatcherNodeConfiguration cmdlet 添加或从节点中删除综合事务。After a watcher node has been configured, you can use the Set-CsWatcherNodeConfiguration cmdlet to add or remove synthetic transactions from the node. 例如,要将 PersistentChatMessage 测试添加到观察程序节点,请使用 Add 方法和与以下类似的命令:For example, to add the PersistentChatMessage test to the watcher node, use the Add method and a command similar to this:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Add="PersistentChatMessage"}

可以通过使用逗号分隔测试名称来添加多个测试。例如:Multiple tests can be added by separating the test names by using commas. For example:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Add="PersistentChatMessage","DataConference","UnifiedContactStore"}

请注意,如果已在观察程序节点上启用其中一个或多个测试(例如,DataConference),则将会发生错误。在这种情况下,您将收到与以下类似的错误消息:Note that an error will occur if one or more of these tests (for example, DataConference) has already been enabled on the watcher node. In this case, you will receive an error message similar to the following:

Set-CsWatcherNodeConfiguration : There is a duplicate key sequence 'DataConference' for the 'urn:schema:Microsoft.Rtc.Management.Settings.WatcherNode.2010:TestName' key or unique identity constraint.

发生此错误时,不会应用任何更改。When this error occurs, no changes will be applied. 应通过删除的重复测试重新运行此命令。The command should be rerun with the duplicate test removed.

要从观察程序节点中删除综合事务,请使用 Remove 方法而不是 Add 方法。例如,以下命令会从观察程序节点中删除 ABWQ 测试:To remove a synthetic transaction from a watcher node, use the Remove method instead of the Add method. For example, this command removes the ABWQ test from a watcher node:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Remove="ABWQ"}

您也可以使用 Replace 方法将所有目前启用的测试替换为一个或多个新测试。例如,如果您只是希望观察程序节点运行 IM 测试,则可以使用以下命令对此进行配置:You can also use the Replace method to replace all the currently-enabled tests with one or more new tests. For example, if you only want a watcher node to run the IM test, you can configure that by using this command:

Set-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" -Tests @{Replace="IM"}

在运行上述命令时,除了 IM 以外,将禁用指定观察程序节点上的所有综合事务。When you run the preceding command, all synthetic transactions on the specified watcher node will be disabled except for IM.

查看和测试观察程序节点配置Viewing and Testing the Watcher Node Configuration

如果您想要查看已分配给观察程序节点的测试,请使用与以下类似的命令:If you want to view the tests that have been assigned to a watcher node, use a command similar to this:

Get-CsWatcherNodeConfiguration -Identity "atl-cs-001.litwareinc.com" | Select-Object -ExpandProperty Tests

根据已分配给节点的综合事务,上述命令将返回与以下类似的信息:The preceding command will return information similar to this, depending on the synthetic transactions that have been assigned to the node:

Registration
IM
GroupIM
P2PAV
AvConference
Presence
PersistentChatMessage
DataConference

提示

要按字母顺序查看综合事务,请改为使用以下命令:To view the synthetic transactions in alphabetical order, use this command instead:
Get-CsWatcherNodeConfiguration –Identity "atl-cs-001.litwareinc.com" | Select-Object –ExpandProperty Tests | Sort-ObjectGet-CsWatcherNodeConfiguration –Identity "atl-cs-001.litwareinc.com" | Select-Object –ExpandProperty Tests | Sort-Object

若要验证是否已创建观察程序节点,请在 Lync Server 命令行管理程序中键入以下命令:To verify that a watcher node has been created, type the following command from within the Lync Server Management Shell:

Get-CsWatcherNodeConfiguration

您将收到与以下类似的信息:You will receive information similar to this:

Identity      : atl-cs-001.litwareinc.com
TestUsers     : {sip:watcher1@litwareinc.com, sip:watcher2@litwareinc.com ...}
ExtendedTests : {TestUsers=IList<System.String>;Name=PSTN Test; Te...}
TargetFqdn    : atl-cs-001.litwareinc.com
PortNumber    : 5061

若要验证是否已正确配置观察程序节点,请在 Lync Server 命令行管理程序中键入以下命令:To verify that the watcher node has been configured correctly, type the following command from within the Lync Server Management Shell:

Test-CsWatcherNodeConfiguration

上述命令将测试您的部署中的每个观察程序节点,并告诉您诸如以下方面的信息:The preceding command will test each watcher node in your deployment and tell you information, such as whether:

  • 是否已安装所需的注册器角色。The required Registrar role been installed.

  • 是否在您运行 Set-CsWatcherNodeConfiguration 时为您创建了所需的注册表项。The required registry key was created for you when you ran Set-CsWatcherNodeConfiguration.

  • 您的服务器运行的是正确版本的 Lync Server。Your servers are running the correct version of Lync Server.

  • 是否已正确配置您的端口。Your ports been configured correctly.

  • 所分配的测试用户是否具有所需的凭据。Your assigned test users have the required credentials.