Add-ClusterVMMonitoredItem

Add-ClusterVMMonitoredItem

Configures monitoring for a service or an Event Tracing for Windows (ETW) event so that it is monitored on a virtual machine.

構文

Parameter Set: InputObject
Add-ClusterVMMonitoredItem [[-VirtualMachine] <String> ] [-Cluster <String> ] [-EventId <Int32> ] [-EventLog <String> ] [-EventSource <String> ] [-InputObject <PSObject> ] [-OverrideServiceRecoveryActions] [-Service <StringCollection> ] [ <CommonParameters>]

詳細説明

The Add-ClusterVMMonitoredItem cmdlet configures monitoring for a service or an Event Tracing for Windows (ETW) event so that it is monitored on a virtual machine. If the service fails or the event occurs, then the system responds by taking an action based on the failover configuration for the virtual machine resource. For example, the configuration might specify that the virtual machine be restarted.

パラメーター

-Cluster<String>

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EventId<Int32>

Specifies the event identifier (ID) of the event to be monitored.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EventLog<String>

Specifies the event log of the event to be monitored.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EventSource<String>

Specifies the event source of the event to be monitored.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<PSObject>

Specifies the cluster on which to run the cmdlet, the clustered virtual machine on which to configure monitoring, and the cluster virtual machine monitored item object to monitor.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-OverrideServiceRecoveryActions

Specifies that the cluster service will fix, by overriding, the service recovery actions in the event that it is not properly configured for monitoring. To be configured for monitoring the following conditions need to be met:
-- None of the service recovery actions are set to Restart the computer.
---- AND
-- At least one of the service recovery actions are set to Take no action.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Service<StringCollection>

Specifies the name of a service to be monitored. This must be the short name, not the long name, of the service. For example, specify clussvc instead of Failover Cluster service.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualMachine<String>

Specifies the name of the clustered virtual machine on which to perform monitoring. When this parameter is specified, the cmdlet must be run on one of the host cluster nodes, or else the Cluster parameter must also be specified.

エイリアス

なし

必須?

false

位置は?

1

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.FailoverClusters.PowerShell.Cluster
  • Microsoft.FailoverClusters.PowerShell.ClusterGroup
  • Microsoft.FailoverClusters.PowerShell.ClusterResource
  • Microsoft.FailoverClusters.PowerShell.ClusterVMMonitoredItem

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • None

Example 1

This example adds monitoring for the ETW event ID 4708.

PS C:\> Add-ClusterVMMonitoredItem –VirtualMachine test-VM11 -EventLog "Microsoft-Windows-FailoverClustering-Manager/Admin" -EventSource "Microsoft-Windows-FailoverClustering-Manager" -EventId 4708

Example 2

This example configures monitoring for the print spooler service.

PS C:\> Add-ClusterVMMonitoredItem –VirtualMachine test-VM11 -Service spooler

関連トピック

Get-ClusterVMMonitoredItem

Remove-ClusterVMMonitoredItem

Reset-ClusterVMMonitoredState