get_targets
ターゲットのステータスおよびアラート情報を取得します。
標準モード
emcli get_targets [-targets="[name1:]type1;[name2:]type2;..."] [-alerts] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"]; ] [-limit_rows="maximum_targets_to_be_retrieved"] [-config_search="configuration_search_UI_name"] [-unmanaged] [-properties] [-separator_properties="properties_sep_string"] [-subseparator_properties="properties_subsep_string"] [ ] indicates that the parameter is optional
インタラクティブまたはスクリプト・モード
get_targets [(targets="[name1:]type1;[name2:]type2;..."] [,alerts=True|False] [,noheader=True|False] [,script=True|False | ,format= [name:<pretty|script|csv>]; [column_separator:"column_sep_string"]; [row_separator:"row_sep_string"]; ] [,-limit_rows="maximum_targets_to_be_retrieved"] [,-config_search="configuration_search_UI_name"] [,-unmanaged] [,-properties] [,-separator_properties="properties_sep_string"] [,-subseparator_properties="properties_subsep_string"]) [ ] indicates that the parameter is optional
オプション
-
targets=name:type
名前またはタイプは、完全な値または「
%
」を使用したパターン・マッチです。また、名前はオプションなので、タイプのみを指定できます。 -
alerts
各ターゲットのクリティカル・アラートと警告アラートの数を表示します。スクリプトおよび対話モードでは、値はTrueまたはFalseのいずれかに設定する必要があります。
-
noheader
列見出しのない表形式の出力を表示します。スクリプトおよび対話モードでは、値はTrueまたはFalseのいずれかに設定する必要があります。
-
script
これは、
-format="name:script"
と同じです。スクリプトおよび対話モードでは、値はTrueまたはFalseのいずれかに設定する必要があります。 -
format
書式指定(デフォルトは
-format="name:pretty"
)。-
format="name:pretty"
は、スクリプトによる解析を目的としない読取り可能な書式で出力表を出力します。 -
format="name:script"
は、デフォルトの列セパレータをタブに、デフォルトの行セパレータを改行に設定します。列および行セパレータの文字列を指定して、これらのデフォルトを変更できます。 -
format="name:csv"
は、列セパレータをカンマに、行セパレータを改行に設定します。 -
format=
column_separator:"column_sep_string"は、verb出力の列を<column_sep_string>で区切ります。行は改行で区切られます。 -
row_separator:"row_sep_string"は、verb出力の行を<row_sep_string>で区切ります。行はタブ文字で区切られます。
-
-
limit_rows
取得するターゲットの最大数。指定しない場合はデフォルトの2000行になります。
-
config_search
検索UI名には、構成検索の表示名を指定する必要があります。
-
unmanaged
管理対象外ターゲットを取得します(ステータスまたはアラート情報なし)。
-
properties
取得するターゲットの最大数。指定しない場合はデフォルトの2000行になります。
-
separator_properties
separator_propertiesを使用して管理対象外ターゲットのプロパティを表示します。
-
subseparator_properties
subseparator_propertiesを使用して管理対象外ターゲットのプロパティを表示します。
出力列
ステータスID、ステータス、ターゲット・タイプ、ターゲット名、クリティカル、警告
例
この例では、管理対象外ホスト・ターゲットの名前とタイプの情報を表示します。
例1 - コマンドライン形式
emcli get_targets -targets="host" -unmanaged
例2 - スクリプトおよび対話形式
get_targets (targets="host" ,unmanaged)
この例では、指定されたセパレータを使用して管理対象外ホスト・ターゲットの名前、タイプおよびプロパティを表示します。デフォルトでは、separator_propertiesは「;」、subseparator_propertiesは「:」です。
例3 - コマンドライン形式
emcli get_targets -unmanaged -properties -separator_properties=, -subseparator_properties==
例4 - スクリプトおよび対話形式
get_targets (unmanaged -properties ,separator_properties=, ,subseparator_properties==)