メインコンテンツまでスキップ

Active IQ Unified Manager の使用中にアラートから PowerShell に送信されるパラメータをテストする方法

Views:
19
Visibility:
Public
Votes:
0
Category:
not set
Specialty:
not set
Last Updated:

に適用されます

  • OnCommand Unified Manager ( UM )
  • Active IQ Unified Manager ( AIQUM )

回答

engineering は、パラメータを定義し、パラメータ値を出力する PowerShell スクリプトの例を作成しています。PowerShell スクリプト「 param_testing.ps1 」コードは以下のとおりです。

param ($eventID, $eventName, $eventSeverity, $eventSourceID, $eventSourceName, $eventSourceType, $eventState, $eventArgs)
write-host "eventID : $eventID `n"
write-host "eventName : $eventName `n"
write-host "eventSeverity : $eventSeverity `n"
write-host "eventSourceID : $eventSourceID `n"
write-host "eventSourceName : $eventSourceName `n"
write-host "eventSourceType: $eventSourceType `n"
write-host "eventState : $eventState `n"
write-host "eventArgs : $eventArgs `n"

テストの例を次に示します。この単純なスクリプトの目的は、指定されたパラメータを使用して、 PowerShell に出力される値を確認するカスタムスクリプトのトラブルシューティングを行うことです。

PS C:\Users\Administrator\Desktop> .\param_testing.ps1 -eventID 341966 -eventName Qtree` Space` Soft` Limit` Breached -eventSeverity warning -eventSourceID 6042432 -eventSourceName foo:`/bar`/test` name` `-` test -eventSourceType QTREE -eventState NEW -eventArgs qtreeSpaceHardLimit=1048576,qtreeSpaceSoftLimit=838864,bytesUsed=1033848,bytesPercent=123`.24381544565031,qtreeSpaceIsHardLimitNotSet=false
eventID : 341966
eventName : Qtree Space Soft Limit Breached
eventSeverity : warning
eventSourceID : 6042432
eventSourceName : foo:/bar/test name - test
eventSourceType: QTREE
eventState : NEW
eventArgs : qtreeSpaceHardLimit=1048576 qtreeSpaceSoftLimit=838864 bytesUsed=1033848 bytesPercent=123.24381544565031 qtreeSpaceIsHardLimitNotSet=false

 

追加情報

AdditionalInformation_Text

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.