カスタム属性を作成し、属性の値を割り当てることができます。ユーザ定義フィールド(UDF)の作成方法については、カスタム値用のユーザ定義フィールドの作成を参照してください。その後、これらの UDF を使用して、レポート結果をフィルタ処理したり、カスタマイズすることができます。
Cisco EPN Manager は、2 分ごとに作成される UDF の値をスキャンし、メタデータが保存される UDF.json ファイルを生成します。このファイルには、/opt/CSCOlumos/conf/rfm/classes/com/cisco/server/reports/conf/UDF.json
からアクセスできます。
次に、UDF.json ファイルに UDF のメタデータを表示する例を示します。
[
{
"label": "internal",
"hidden": true,
"displayName": "Internal",
"fixedColumn": false
},
{
"label": "location",
"hidden": true,
"displayName": "Location",
"fixedColumn": false
},
{
"label": "quality",
"hidden": true,
"displayName": "Quality",
"fixedColumn": false
},
この例では、次のようになります。
-
属性の label は、 ページで作成されたユーザ定義フィールドです。
-
属性の hidden はデフォルトで True に設定されています。この属性が True に設定されている場合、UDF は [レポート(Report)] ページで非表示になります。レポート結果をカスタマイズするときに UDF を選択できるように、この属性を
False に設定する必要があります。
-
属性の displayName は、レポート結果に表示される UDF 名を変更するために使用されます。
-
属性の fixedColumn は、hidden 属性が False に設定されている場合にのみ適用されます。
UDF.json ファイルで必要な変更を行った後に、レポートの結果をカスタマイズできます。レポート結果のカスタマイズを参照してください。
UDF.json ファイル内の UDF のフィルタ タイプを変更することもできます。デフォルトのフィルタ タイプは String です。
次に、フィルタ タイプとその定義の例を示します。
[
{
"label": "internal",
"displayName": "Internal",
"hidden": false,
"fixedColumn": false,
"filterMetadata": {
"sqlDataType": "Boolean",
"attr": "internal",
"label": "UDF: Internal Used",
"filterType": "boolean"
}
},
{
"label": "location",
"displayName": "Location",
"hidden": false,
"fixedColumn": false
},
{
"label": "quality",
"displayName": "Quality",
"hidden": false,
"fixedColumn": false,
"filterMetadata": {
"sqlDataType": "Number",
"selectItems": {
"1": "High Quality",
"2": "Mid Quality",
"3": "Low Quality"
},
"attr": "quality",
"label": "UDF: Quality",
"filterType": "enumeration"
}
},
{
"label": "sapid",
"displayName": "SAP ID",
"hidden": false,
"fixedColumn": true,
"filterMetadata": {
"sqlDataType": "Number",
"attr": "sapid",
"label": "UDF: SAP ID",
"filterType": "numeric"
}
},
{
"label": "startTime",
"displayName": "Start Time",
"hidden": false,
"fixedColumn": false,
"filterMetadata": {
"sqlDataType": "Timestamp",
"attr": "startTime",
"label": "UDF: Start Time",
"filterType": "datetime"
}
},
{
"label": "vendor",
"displayName": "Vendor",
"hidden": false,
"fixedColumn": true,
"filterMetadata": {
"sqlDataType": "String",
"selectItems": {
"huawei": "Hua Wei",
"alu": "Alcatel Lucent",
"cisco": "Cisco"
},
"attr": "vendor",
"label": "UDF: Vendor",
"filterType": "enumeration"
}
}
]
UDF.json ファイルで必要な変更を行った後、[レポートの詳細(Report Details)] ページの [高度なフィルタ(Advanced Filter)] オプションを使用してレポート データをフィルタ処理します。