IRE Identification の DUPLICATE_PAYLOAD_RECORDS エラーIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Identification and Reconciliation Engine(IRE)は、識別ルールに基づいて CI(Configuration Item)を識別します。 IRE に渡されたデータと識別ルールを基に、識別エンジンは CMDB(Configuration Management Database)内の正しい CI を特定する必要があります。 CI の作成または更新を行う際は IRE を使用する必要があります。IRE を使用することで、重複のない一貫性のある CMDB を維持できます。 Discovery パターンは CI からデータを収集し、CMDB を更新します。しかし、同一ペイロード内に重複レコードが含まれる状態で IRE に渡されることがあります。 同じペイロード内に重複レコードが存在する場合、IRE は DUPLICATE_PAYLOAD_RECORDS エラーを返します。 パターン内の処理によって、ペイロードから DUPLICATE_PAYLOAD_RECORDS を除去することが可能です。 この KB では、その重複を削除するシンプルな方法について説明します。 エラーの例: DUPLICATE_LOOKUP_PAYLOAD Found duplicate Lookup items (0 and 1) in the payload index 22 using fields serial_number,serial_number_type: no thrown error Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } すべてのリリース Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 重複を削除する最も簡単な方法は、DuplicateRemover スクリプト を使用することです。 手順は次のとおりです。 1. ペイロード内で重複が発生しているテーブルを特定します。 上記の例では cmdb_serial_number テーブルです。エラーメッセージで示されるフィールド情報を利用すると、対象テーブルを特定できます。 2. パターン内に新しいステップを追加し、Operation を 「Set Parameter Value」 に設定します。 3. Value フィールドに、次のような重複削除スクリプトを入力します。 EVAL( javascript: // This table will be the new table without the duplicates var tableWithoutDuplicates = ''; // Pass the table_to_remove_duplicates_from, and the columns to use for identification, to the DuplicateRemover tableWithoutDuplicates = DuplicateRemover.removeDuplicates(${table_to_remove_duplicates_from},["column_1","column_2"]); // Replace original table with new table duplicates free CTX.setAttribute("table_to_remove_duplicates_from", tableWithoutDuplicates); ) 4. ステップは次のようになります。 5. ステップを保存し、パターンを公開します。 注意事項 多くの場合、重複を削除するステップは、重複が発生しているテーブルが作成された直後に追加することを推奨します。上記例の $temp_unique_service という名前は一例です。パターン内で既に使用されている変数名と重複しない任意の名前を使用できます。スクリプトは、実際のテーブル名およびカラム名に合わせて修正する必要があります。スクリプト内の column_1 と column_2 は、重複判定に使用されるカラムです。実際の環境に合わせて置き換えてください。例えば、CI を識別するために serial_number のみを使用する場合は、次のように 1 つのカラムだけを指定できます。 tableWithoutDuplicates = DuplicateRemover.removeDuplicates(${cmdb_serial_number},["serial_number"]); Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } IRE ログの詳細を確認する方法 1. glide.cmdb.logger.source.identification_engine システムプロパティを info,warn,error,debug に設定します。 2. 次のスクリプトを実行します。 var eccRecord = new GlideRecord('ecc_queue'); eccRecord.get(''); // put the sys id of the input ecc queue var sp =new SncSensorProcessor(eccRecord); sp.process(); 3. 出力結果を確認します。 Debugging Identification and Reconcilliation Engine using scripts in scripts background Identification and Reconciliation Components and Process Identification Engine Error Messages 'MSSql DB On Windows' Pattern's "Collect MSSQL Components Info" shared library throws DUPLICATE_RELATED_PAYLOAD Found duplicate Related items (1 and 25) in the payload index 1 using fields binary_path,service_name,service_type Could not find host item in Identification engine output payload