IT 資産管理 (ITAM) 用のインポート構造を作成する
Jira Service Management のアセットは、Premium と Enterprise のみの機能です。アセットの詳細についてはこちらをご確認ください。
このガイドの使用方法
This chapter of the Assets guide will walk you through creating an import structure in Assets. To get the best results from this chapter, you should have completed the previous chapters:
Each step in this guide will include detailed instructions about how to use Assets in Jira Service Management, and also some tips and best practices about how to get the most out of this powerful feature when using it as part of your team’s IT Asset Management (ITAM) process.
このガイドには次の 2 種類の情報があります。
The headers with the blue background will help you get started in Assets. They will provide you with information about each step in the guide, including examples of data and how each feature can be used.
The text with the white background will give you a series of steps to help you navigate through Assets, or it will contain detailed information about an Assets concept.
他にも次のような情報があります。
Information in bold indicates text that you will find in Assets itself, such as the name of a menu option, a feature you can toggle on and off, or a button.
code の情報は、IT 資産管理 (ITAM) 用サンプル オブジェクト スキーマに含まれるテキストです。
Information in bold italics is a concept or idea that forms an important part of Assets.
インポートの概要
Importing is a way to bring outside data into Assets and convert it into Assets object types, objects, attributes and references.
Importing is the preferred way to bring data into Assets because it’s quicker, easier, and more dynamic than creating data using the interface.
To import data into Assets, we need the following three things:
Data is raw information that we will pull into Assets. This data can be in the form of a CSV or JSON file, or it could be directly from a third-party app or provider.
Structure is the object types, attributes, and references in Assets that provide a framework for our data. Depending on how we want to manage our import, we may want to use a structure that we’ve already manually created, or we might want to let Assets create the object types and attributes entirely by itself.
マッピング: データ ソースの特定の情報を構造内の特定のオブジェクトまたは値とリンクすることで、データと構造を結びつける手段です。さらに、マッピングを行うことでこのデータが正しい場所に収まり、この情報が正規化されて正確になります。
There are three levels of mapping in Assets – import mapping, object type mapping, and attribute type mapping.
それぞれが他のマッピングの中にネストされています。つまり、インポート マッピングはオブジェクト マッピングのグループであり、それらのオブジェクト マッピングにはそれぞれ複数の属性マッピングを含めることができます。
インポート マッピングには、エンコード方法やオブジェクトとオブジェクト タイプへの分割方法など、未加工データの設定方法に関する一般的な情報が含まれています。
オブジェクト タイプ マッピングには、マッピングからオブジェクトとオブジェクト タイプを作成する方法に関するより具体的な情報が含まれています。
属性タイプ マッピングには、未加工データを新しいオブジェクトの属性に変換する方法の詳細が含まれています。
これらが IT 資産管理 (ITAM) でどのように機能するかを見てみましょう。
Following the previous sections in this guide, we’ve created an object schema and attributes to hold our information. That will be our structure. Now we will bring our data into Assets and map it to create objects and attributes.
データは、モデル データ ソースと資産データ ソースの 2 つの異なるデータ ソースから取得します。これらのデータ ソースはいずれも CSV 形式になります。
インポート時の情報アーキテクチャの概要
One of the key concepts in Assets is information architecture, which is understanding and developing the best ways to organise your data. In Assets, the information architecture is how you built object types and attributes to hold your data.
以前オブジェクト タイプを作成したときに見たのと同じ一般的なルールがインポート構造の作成にも適用されます。それらを確認していきましょう。
インポート構造は適切なサイズになっています。インポート構造はインポートするデータが収まるサイズになっています。作成するオブジェクトごとに 1 つのオブジェクト タイプ マッピングがあり、そのオブジェクト内の属性ごとに 1 つの属性タイプ マッピングがあります。
インポート構造は一意です。あるインポート構造が別のインポート構造にあるマッピングと同じになることはありません。1 つのオブジェクト候補のセットから複数の異なるオブジェクト タイプを作成する場合は、子オブジェクト マッピングを使用してすべてを一度に作成するようにしてください。
インポート構造は拡張可能です。オブジェクト構造は、データが変更された場合だけでなく、スキーマが変更された場合でも修正できるように設計されています。[属性マッピング] 画面の [AQL] フィールドを使用してインポートする場合は、本格的なオブジェクトを作成することをお勧めします。
データを取り込む際には、モデルと資産のデータを別々に取り込み、それぞれ一意のものとして扱います。これには次のようにいくつかの理由があります。
各データ ソースはオブジェクト スキーマの異なる場所に接続します。既存の在庫の資産によって Hardware assets オブジェクト タイプとその子が設定されるのに対して、IT 資産候補のモデルによって Model オブジェクト タイプとその子が設定されます。データ セットごとにマッピング先が異なるため、それぞれに一意のマッピングを使用します。
また、各データ セットを個別に処理します。Model データは直接インポートできますが、Hardware assets データについては以前のインポートの結果と比較することで正規化します。これは、不足している資産、予想していなかった余分な資産、または予想と実際の在庫レベルの間に異常がないかどうかを確認できるようにするためです。
最後になりますが、モデルとアセットのデータ セットは必ずしも同時に更新されるわけではありません。これらを分けておくことで、資産を最新の状態に保ちながら、モデルの重要性を低くすることができます。
インポート構造の概要
An import structure is a recipe that tells Assets how to run an import. This recipe include all of the details above - where Assets can find the data, where Assets will build the structure for the data, and how Assets can break down the data into little pieces and use the mapping to put those pieces in the correct place.
Assets has the ability to manage and run multiple imports of different kinds, and overlay information from different sources (or from the same source!) to create an accurate and up-to-date single source of truth.
There are different kinds of import structures, correlating to the different sources of data that Assets can accept. Currently, there are four main types of import structure:
CSV
JSON
Assets Discovery
外部インポート
また、REST API フレームワークを使用して、外部ソースからデータをインポートすることもできます。REST API を使用したインポートの詳細については、開発者向けドキュメント セクションの「Imports REST API」ガイドをご覧ください。
CSV データのフォーマット
あらかじめ用意されているサンプル データを使用するため、今回はデータのフォーマットについて心配する必要はありませんが、それ以外の状況では極めて非常になる場合があります。CSV または JSON データ ファイルに構文エラーがある場合、インポートによって予期しない結果になったり、実行されなかったりする可能性があります。
ここからは、CSV のデータ フォーマットについて、今後知っておくべき情報をいくつか紹介します。
UTF-8 (初期設定)、UTF-16、ISO-8859-1、ISO-8859-15、Windows-1250、Windows 1252 のいずれかの形式を使用できます。
CSV ファイルには、インポート用のデータ ロケーターの作成に使用されるヘッダーが必要です。
CSV ファイルには、1 文字の区切り文字を含める必要があります。デフォルトの区切り文字は、通常はカンマです。インポート設定の作成時に、[Delimiter (区切り文字)] フィールドでカスタムの区切り文字を選択できます。区切り文字を含めるには、値を二重引用符で囲みます。区切り文字または二重引用符を含めるには、それぞれの値を二重引用符で囲みます。また、「\t」と入力するとタブ区切り文字を使用できます。
複数の値を除算するには (複数のカーディナリティを持つアセット属性の場合)、CSV ファイル内で「||」(2 つのパイプ文字) を使用します。
複数の値を 1 つのアセット属性に結合する場合は、CSV ファイルで連結子を使用できます。デフォルトはダッシュ記号「-」です。 データがスペースで連結されている場合は、インポート設定を作成するときに [連結] フィールドに「\s」を入力できます。
CSV ファイルからアセットにオブジェクトをインポートする場合は、名前やキーではなく、ラベルとして割り当てられた属性でオブジェクトを識別する必要があります。
Jira ユーザーまたはグループをアセットにインポートしている場合は、名前ではなく ID によってユーザーまたはグループを識別する必要があります。
アセットに URL をインポートする場合、URL を URL 属性タイプに変換するには、文頭に http:// または https:// がついている必要があります。http:// プレフィックスまたは https:// プレフィックスが含まれていない場合は、文字列属性タイプとしてインポートされます。属性タイプの詳細をご確認ください。
Google スプレッド シートのリンクから CSV データをインポートする場合に、使用する URL を正しく機能させるには編集が必要です。URL の末尾から /edit#gid=0 を削除して、/export?format=csv に置き換えます。
データ セットの作成
Before we can start importing data into Assets, we will need a data source. A data source could be a static data file, such as an uploaded CSV or JSON, or it could be hosted on the web.
For this tutorial we will use two separate data sources - model and assets. The model will hold information about all of the possible IT Assets that we might encounter, while the assets will list only those inventory items that are currently in the system. By separating between the model and the assets, we will be able to import the model from one location - such as a vendor list, and sync it with our current inventory of assets..
モデルや技術仕様などのモデル一覧情報のサンプル CSV データを次に示します。このモデルには現在 40 個のオブジェクト (10 種類のラップトップ モデル、10 種類の電話モデル、10 種類のサーバー モデル、10 種類のプリンター モデル) があります。
各モデルには、カテゴリ、 モデル、単価、説明を指定する詳細が含まれています。データ ファイル内のこれらの詳細は、モデル オブジェクト タイプの適切な属性にマップされます。
このデータをテキスト ファイルにコピーして models.csv というファイル名を付けます。このデータは、入手可能なノート パソコンの現行モデルを表しています。
Make sure to save each CSV files in the UTF-8 format. Although Assets can accept data in a multitude of formats, UFT-8 is the most commonly used format for CSV files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Model Name,Category,Unit Price,Description
iPhone 12,Phone,999,Apple iPhone 12 64GB
iPhone 11,Phone,799,Apple iPhone 11 64GB
Galaxy S21,Phone,999,Samsung Galaxy S21 128GB
Galaxy S20,Phone,899,Samsung Galaxy S20 128GB
Dell XPS 15,Laptop,2000,Dell XPS 15 9500 15.6" Laptop
HP Spectre x360,Laptop,1500,HP Spectre x360 13.3" Laptop
Lenovo ThinkPad X1 Carbon,Laptop,1900,Lenovo ThinkPad X1 Carbon 14" Laptop
MacBook Pro 16,Laptop,2400,Apple MacBook Pro 16" Laptop
Dell PowerEdge R640,Server,5000,Dell PowerEdge R640 1U Rack Server
HP ProLiant DL380,Server,5500,HP ProLiant DL380 Gen10 2U Rack Server
Lenovo ThinkSystem SR630,Server,6000,Lenovo ThinkSystem SR630 1U Rack Server
HP LaserJet Pro MFP M428fdw,Printer,350,HP LaserJet Pro MFP M428fdw Monochrome Laser Printer
Canon imageCLASS MF743Cdw,Printer,500,Canon imageCLASS MF743Cdw Color Laser Printer
Brother MFC-L2750DW,Printer,250,Brother MFC-L2750DW Monochrome Laser Printer
Epson WorkForce Pro WF-4830,Printer,300,Epson WorkForce Pro WF-4830 All-in-One Printer
モデル情報が定義できたら、資産についても同じ作業をしましょう。資産のデータ ファイルには、シリアル番号、所有者、購入日、ステータスなど、手元にある実際の IT 資産に固有の情報が含まれます。
このデータを別のテキスト ファイルにコピーして、assets.csv という名前を付けます。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Device Type,Serial Number,Model Name,Purchase Date,Owner Group,Status,Asset Tag,PO Number,Asset Status
Phone,SN001,iPhone 12,01/01/2021,HR,Active,AT001,PO001,In Use
Phone,SN002,iPhone 11,01/02/2020,Sales,Active,AT002,PO002,In Use
Phone,SN003,Galaxy S21,03/01/2021,IT,Inactive,AT003,PO003,In Stock
Phone,SN004,Galaxy S20,12/01/2019,Finance,Active,AT004,PO004,In Use
Laptop,SN005,Dell XPS 15,06/01/2020,HR,Active,AT005,PO005,In Use
Laptop,SN006,HP Spectre x360,07/01/2019,Sales,Inactive,AT006,PO006,Disposed
Laptop,SN007,Lenovo ThinkPad X1 Carbon,08/01/2018,IT,Active,AT007,PO007,In Use
Laptop,SN008,MacBook Pro 16,10/01/2020,Finance,Active,AT008,PO008,In Use
Server,SN009,Dell PowerEdge R640,04/01/2018,IT,Active,AT009,PO009,In Use
Server,SN010,HP ProLiant DL380,05/01/2019,IT,Inactive,AT010,PO010,In Stock
Server,SN011,Lenovo ThinkSystem SR630,11/01/2020,IT,Active,AT011,PO011,In Use
Printer,SN012,HP LaserJet Pro MFP M428fdw,02/01/2021,Sales,Active,AT012,PO012,In Use
Printer,SN013,Canon imageCLASS MF743Cdw,05/01/2020,HR,Active,AT013,PO013,In Use
Printer,SN014,Brother MFC-L2750DW,08/01/2019,Finance,Inactive,AT014,PO014,Disposed
Printer,SN015,Epson WorkForce Pro WF-4830,03/01/2021,IT,Active,AT015,PO015,In Use
インポート構造の作成
Now that we have two sets of CSV data, we will create an import structure for each of them. Each import structure will contain the details about how to convert the data into objects and attributes in Assets.
それぞれのインポート構造を作成するため、データを設定し、前のセクションで作成した CSV ファイルをアップロードする手順を説明します。
最初のインポート構造に models-import という名前を付けます。前のセクションで作成した models.csv ファイルをアップロードします。
2 つ目のインポート構造に assets-import という名前を付けます。前のセクションで作成した assets.csv ファイルをアップロードします。
モデル データのオブジェクト タイプと属性はすでに作成しているので、両インポート構造の [オブジェクト タイプと属性を自動で作成] を無効にして、オブジェクト マッピングと属性マッピングをイチから手動で作成します。
現時点では、区切り文字、エンコード、連結子、空の値、不明な値、または日付形式の既定の設定は変更しません。
以下のプロセスは、model-import に対して 1 回、assets-import に対して 1 回の計 2 回行う必要があります。
インポート構造を作成するには、サービス プロジェクトから次の手順を実行します。
Go to Assets, then Object schemas.
オブジェクト スキーマを選択します。
Select Schema configuration, then choose the Import tab.
[インポート] タブで、次の手順に従います。
インポート構造がない場合は、メッセージ「インポート構造が作成されていません」が表示されます。[最初に作成] をクリックします。
インポート構造がすでに作成されている場合は、[インポートを作成] をクリックして新しいインポート構造を追加します。
表示されたオプションから [CSV インポート] を選択します。
次に、[インポート構造を定義] 画面でインポート構造を設定します。外部インポートを作成する場合は 、このステップをスキップできます。
Name (required) (名前 (必須)): インポート設定の名前を入力します。
説明: インポート設定の説明を入力します。
ファイルをドラッグ & ドロップするか参照する (必須) - ここにソース データ ファイルをドラッグ & ドロップするか参照します。
オブジェクト タイプと属性を自動で作成する - このオプションを無効にするには、データのインポート前にデータをスキーマに手動でマッピングする必要があります。データの手動マッピングに関する詳細についてご確認ください。
その他のオプション - アセットが区切り文字、エンコード、空または未知の値、連結、日付形式を処理する方法を変更するには、ここで既定値を変更します。
Delimiter (required) (区切り文字 (必須): ファイルで使用する区切り文字を選択します。区切り文字は、ある値の終わりと次の値の始まりの場所を示す文字です。「\ t」で示される「タブ」文字を除いて、1 文字の長さの区切り文字のみが許可されます。区切り文字または二重引用符を含めるには、それぞれの値を二重引用符で囲みます。
Encoding (required) (エンコーディング (必須)): CSV ファイルで使用するエンコーディングを選択します。デフォルトのエンコーディングは UFT-8 です。
連結子 (必須) - 複数の値を 1 つのアセット属性に結合する場合は、連結子を使用できます。既定ではダッシュ記号「-」が使用されます。データがスペースで連結されている場合は「\s」を入力できます。
空の値 - オブジェクトが更新される際に、外部ソースからの空の値で既存の値を削除するかどうかを選択します。次の項目から選択します。
削除 - 現在の値を削除します。属性がステータス、選択、または複数の値を持つ参照タイプ属性である場合、すべての値が削除されます。
無視 - 該当するオブジェクト タイプに対して現在の値を保持します。属性がステータス、選択、または複数の値を持つ参照タイプ属性である場合、すべての値が保持されます。
Unknown values (required) (不明な値 (必須)): 空の値を無視するか追加するかを選択します。
Date Format - Select a format to convert dates into – Assets will automatically try to find the correct format if none is provided.
Date/Time format - The date/time format to convert dates with time into – Assets will automatically try to find the correct format if none is provided.
[作成] を選択します。
これで、[インポート] タブに新しいインポート構造が入力されます。
自動マッピングと手動マッピングの概要
新しいインポート構造を作成する際は、オブジェクト タイプと属性を手動または自動で作成するオプションがあります。
If you choose to automatically create object types and attributes, Assets will create a default structure and configuration based on the type of import you have selected and the structure of the data you are importing. For example, when automatically mapping data from a CSV file, Assets will create a new object type with the name of the CSV file, a new object for each row in the file, and create attributes for each object based on the values in the header row of the CSV.
If there is already an object type in your object schema with the same name as the CSV file you are importing, Assets will not create a new object type, but will overwrite the your existing objects and their attributes with the same objects from your data source.
If you choose to create an import manually, the import structure will not automatically create object types and attributes, and it will not automatically map data from the data file into the import. Your import structure will be “empty”, and you will have to map your data into Assets using import mapping, object mapping, and attribute mapping before you can run the import.
お疲れ様でした!
ここでは、インポートとインポート構造の仕組みを学び、モデルになるデータ用、資産になるデータ用の 2 つのインポート構造を作成しました。
次に、ガイドの次のセクション「IT 資産管理 (ITAM) 用のオブジェクトと属性をマッピングする」に進みましょう。
この内容はお役に立ちましたか?