DM スクリプトに基づくカスタム アラートを作成できます。 これらのアラートに関連する設定を適用する前のエージェント マシンで、スクリプト ディレクトリ([設定ポリシー]-[DSM]-[ヘルス監視]-[ヘルス監視エージェント]-[ScriptDir]で設定される)にスクリプトを展開します。
次の手順に従ってください:
DM スクリプト アラートの例:
以下の DM スクリプトは、hmAlertOPFormatter を呼び出すことにより、アラート条件があるかないかを HM エージェントにレポートします。 例:
'Do your alert condition checking here.
'...
' At bottom of your DM script, execute hmAlertOPFormatter
' to create the alert XML output.
dim ret as integer
ret = Exec("hmAlertOPFormatter.exe alertconditionexist=1 raisealertnow=1 ""param1=" + argv(1) + ",param2=" + argv(2) + """ additionalinfo=this is some additional text for script with Args", true)
print "hmAlertOPFormatter.exe: " + str(ret)
アラートを監視するために呼び出されたきに HM エージェントが処理する XML ファイルを作成するには、DM スクリプトで以下のコマンドを実行します。
hmAlertOPFormatter 実行可能ファイル
hmAlertOPFormatter.exe alertconditionexist=0|1 [raisealertnow=0|1] [PARAM1=data1,PARAM2=data2,..,PARAMX=datax] [additional info=Additional Info] alertconditionexist=0|1
DM スクリプトがアラート条件を決定していない場合は値 0 を使用します。 DM スクリプトがアラート条件を決定している場合は値 1 を使用します。
raisealertnow=0|1
(オプション)デフォルト値は 0 です。 アラートをすぐに生成する場合は値 1を使用します。
PARAM1=data1,PARAM2=data2 .. PARAMX=datax –
(オプション)これらのキー値のペアは、アラート メッセージ内のパラメータと値を示します。 一連のキー値ペアはカンマ(,)によって区切り、キーと値は等号(=)によって区切ります。
additionalinfo=<Additional Info>
(オプション)このパラメータは、コマンド ラインの最後のパラメータです。 等号(=)より後ろの残りのコマンド ラインはすべてまとめられ、生成されるアラート XML の 1 つのフィールドを形成します。
|
Copyright © 2013 CA.
All rights reserved.
|
|