Crystal Reports Designer を使用すると、CompCI および parentcomp.rpt サブレポートの式を変更することによって、コンポーネント CI の system_name の属性変換をカスタマイズできます。
<ftps>
レポートが表示されます。
以下では、fA_sysname の式の定義を示します。
local stringVar sysName;
local stringVar bpName;
local stringVar srvrName;
local stringVar compVer;
local stringVar compQual;
local stringVar appName;
local stringVar instDir;
local stringVar portNo;
local numberVar type; // typ will be 1, 2 or 3 depending upon bp name
local stringVar temp;
local stringVar tempQual;
local numberVar diff;
if (isnull(maximum({query_compci.Bp Name}, {query_compci.Comp Uuid})))
then bpName := "" else bpName := maximum({query_compci.Bp Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Srvr Name}, {query_compci.Comp Uuid})))
then srvrName := "" else srvrName := maximum({query_compci.Srvr Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Comp Qual}, {query_compci.Comp Uuid})))
then compQual := "" else compQual := maximum({query_compci.Comp Qual}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Comp Ver}, {query_compci.Comp Uuid})))
then compVer := "" else compVer := maximum({query_compci.Comp Ver}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Application Name}, {query_compci.Comp Uuid})))
then appName := "" else appName := maximum({query_compci.Application Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Install Dir}, {query_compci.Comp Uuid})))
then instDir := "" else instDir := maximum({query_compci.Install Dir}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Listen Port}, {query_compci.Comp Uuid})))
then portNo := "" else portNo := maximum({query_compci.Listen Port}, {query_compci.Comp Uuid});
if (bpName in ["J2EE Enterprise Application", "Java Web Application"]) then
type := 1
else if (bpName in ["BEA WebLogic Domains (Windows)", "BEA WebLogic Domains (UNIX)", "BEA WebLogic Domain (Windows)", "BEA WebLogic Domain (UNIX)"]) then
type := 2
else if (bpName in ["IBM WebSphere 6 Server Instance (UNIX)", "IBM WebSphere 6 Server Instance (Windows)", "IBM WebSphere 5 Server Instance (UNIX)", "IBM WebSphere 5 Server Instance (Windows)"]) then
type := 2
else
type := 3;
if(type=3) then
(
if(not(isnumeric(left(srvrName,(instr(srvrName,'.'))-1)))) then
srvrName := left(srvrName,(instr(srvrName,'.'))-1)
else
srvrName := srvrName;
)
else
srvrName := srvrName;
if (type = 1) then
(
sysName := "j2ee|" & srvrName & "|" & appName & "|" & instDir ;
if (len(sysName) > 255) then
sysName := left(sysName, 255);
)
else if (type = 2) then
(
sysName := "port|" & srvrName & "|" & portNo;
if (len(sysName) > 255) then
sysName := left(sysName, 255);
)
else (
temp := srvrName & "|" & bpName & "|" & compVer & "|" ;
if (len(temp) + len(compQual) <= 255) then
(sysName := temp & compQual)
else
(
diff:= (length(temp) + length(compQual))+ 3 -252;
if ( length(compQual) > diff ) then
compQual:= mid(compQual,1,(length(compQual) - diff)\2+1)+"..."+ mid(compQual,(length(compQual) + diff)\2)
else
compQual := "";
sysName := temp & compQual;
)
);
sysName;
以下では、fA_sysname の式の定義を示します。
local stringVar sysName;
local stringVar bpName;
local stringVar srvrName;
local stringVar compVer;
local stringVar compQual;
local stringVar appName;
local stringVar instDir;
local stringVar portNo;
local numberVar type; // typ will be 1, 2 or 3 depending upon bp name
local stringVar temp;
local stringVar tempQual;
local numberVar diff;
if (isnull(maximum({query_compci.Bp Name}, {query_compci.Comp Uuid})))
then bpName := "" else bpName := maximum({query_compci.Bp Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Srvr Name}, {query_compci.Comp Uuid})))
then srvrName := "" else srvrName := maximum({query_compci.Srvr Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Comp Qual}, {query_compci.Comp Uuid})))
then compQual := "" else compQual := maximum({query_compci.Comp Qual}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Comp Ver}, {query_compci.Comp Uuid})))
then compVer := "" else compVer := maximum({query_compci.Comp Ver}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Application Name}, {query_compci.Comp Uuid})))
then appName := "" else appName := maximum({query_compci.Application Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Install Dir}, {query_compci.Comp Uuid})))
then instDir := "" else instDir := maximum({query_compci.Install Dir}, {query_compci.Comp Uuid});
if (isnull(maximum({query_compci.Listen Port}, {query_compci.Comp Uuid})))
then portNo := "" else portNo := maximum({query_compci.Listen Port}, {query_compci.Comp Uuid});
if (bpName in ["J2EE Enterprise Application", "Java Web Application"]) then
type := 1
else if (bpName in ["BEA WebLogic Domains (Windows)", "BEA WebLogic Domains (UNIX)", "BEA WebLogic Domain (Windows)", "BEA WebLogic Domain (UNIX)"]) then
type := 2
else if (bpName in ["IBM WebSphere 6 Server Instance (UNIX)", "IBM WebSphere 6 Server Instance (Windows)", "IBM WebSphere 5 Server Instance (UNIX)", "IBM WebSphere 5 Server Instance (Windows)"]) then
type := 2
else
type := 3;
if(type=3) then
(
if(not(isnumeric(left(srvrName,(instr(srvrName,'.'))-1)))) then
srvrName := left(srvrName,(instr(srvrName,'.'))-1)
else
srvrName := srvrName;
)
else
srvrName := srvrName;
if (type = 1) then
(
sysName := "j2ee|" & srvrName & "|" & appName & "|" & instDir ;
if (len(sysName) > 255) then
sysName := left(sysName, 255);
)
else if (type = 2) then
(
sysName := "port|" & srvrName & "|" & portNo;
if (len(sysName) > 255) then
sysName := left(sysName, 255);
)
else (
temp := srvrName & "|" & bpName & "|" & compVer & "|" ;
if (len(temp) + len(compQual) <= 255) then
(sysName := temp & compQual)
else
(
diff:= (length(temp) + length(compQual))+ 3 -252;
if ( length(compQual) > diff ) then
compQual:= mid(compQual,1,(length(compQual) - diff)\2+1)+"..."+ mid(compQual,(length(compQual) + diff)\2)
else
compQual := "";
sysName := temp & compQual;
)
);
sysName;
以下では、fA_sysname 2 の式の定義を示します。
local stringVar sysName;
local stringVar bpName;
local stringVar srvrName;
local stringVar compVer;
local stringVar compQual;
local stringVar appName;
local stringVar instDir;
local stringVar portNo;
local numberVar type; // typ will be 1, 2 or 3 depending upon bp name
local stringVar temp;
local stringVar tempQual;
local numberVar diff;
if (isnull(maximum({query_parentCompDetails.Bp Name}, {query_compci.Comp Uuid})))
then bpName := "" else bpName := maximum({query_parentCompDetails.Bp Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Srvr Name}, {query_compci.Comp Uuid})))
then srvrName := "" else srvrName := maximum({query_parentCompDetails.Srvr Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Comp Qual}, {query_compci.Comp Uuid})))
then compQual := "" else compQual := maximum({query_parentCompDetails.Comp Qual}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Comp Ver}, {query_compci.Comp Uuid})))
then compVer := "" else compVer := maximum({query_parentCompDetails.Comp Ver}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Application Name}, {query_compci.Comp Uuid})))
then appName := "" else appName := maximum({query_parentCompDetails.Application Name}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Install Dir}, {query_compci.Comp Uuid})))
then instDir := "" else instDir := maximum({query_parentCompDetails.Install Dir}, {query_compci.Comp Uuid});
if (isnull(maximum({query_parentCompDetails.Listen Port}, {query_compci.Comp Uuid})))
then portNo := "" else portNo := maximum({query_parentCompDetails.Listen Port}, {query_compci.Comp Uuid});
if (bpName in ["J2EE Enterprise Application", "Java Web Application"]) then
type := 1
else if (bpName in ["BEA WebLogic Domains (Windows)", "BEA WebLogic Domains (UNIX)", "BEA WebLogic Domain (Windows)", "BEA WebLogic Domain (UNIX)"]) then
type := 2
else if (bpName in ["IBM WebSphere 6 Server Instance (UNIX)", "IBM WebSphere 6 Server Instance (Windows)", "IBM WebSphere 5 Server Instance (UNIX)", "IBM WebSphere 5 Server Instance (Windows)"]) then
type := 2
else
type := 3;
if(type=3) then
(
if(not(isnumeric(left(srvrName,(instr(srvrName,'.'))-1)))) then
srvrName := left(srvrName,(instr(srvrName,'.'))-1)
else
srvrName := srvrName;
)
else
srvrName := srvrName;
if (type = 1) then
(
sysName := "j2ee|" & srvrName & "|" & appName & "|" & instDir ;
if (len(sysName) > 256) then
sysName := left(sysName, 256);
)
else if (type = 2) then
(
sysName := "port|" & srvrName & "|" & portNo;
if (len(sysName) > 256) then
sysName := left(sysName, 256);
)
else (
temp := srvrName & "|" & bpName & "|" & compVer & "|" ;
if (len(temp) + len(compQual) <= 256) then
(sysName := temp & compQual)
else
(
diff:= (length(temp) + length(compQual))+ 3 -252;
if ( length(compQual) > diff ) then
compQual:= mid(compQual,1,(length(compQual) - diff)\2+1)+"..."+ mid(compQual,(length(compQual) + diff)\2)
else
compQual := "";
sysName := temp & compQual;
)
);
sysName;
変換属性がカスタマイズされます。
CA Configuration Automation と CMDB を統合するとき、「データベース名」という名前の新しい CI が cmdbexport.xml ファイルおよび CA SDM に作成されます。 データベース名 CI は、[コンポーネント パラメータおよび変数]、および[ファイル構造]クラス パラメータ用に取得したデータベース名の値をエクスポートします。
カスタム ブループリントを作成する場合は、[コンポーネント パラメータ]または[ファイル構造]クラス パラメータを[値詳細]属性パネルで[解釈方法 "データベース名"]に設定します。 [解釈方法 "データベース名"]は必要に応じて特定のパラメータに設定します。 [リレーショナル データベース]カテゴリに属するブループリント パラメータでは、[データベース名]に設定することを推奨します。
たとえば、Oracle Database 11g (Windows)コンポーネント ブループリントに[データベース名]を設定するには、以下の手順に従います。
INSERT INTO acmbo_classmapping VALUES('component','Copy of Oracle Database 11g (Windows)','Software.Database','Oracle')
4. Oracle 11 g がインストールされている任意の Windows コンピュータ用の Oracle Database 11g (Windows)コンポーネント ブループリントのコピーのディスカバリを実行します。
ディスカバリの完了後、各サーバの[構成関係]ビューに関係が表示されます。
5. CMDB Export Report を実行して cmdbexport.xml ファイル内のデータベース名を確認します。 以下にコード サンプルを示します。
<ci> <name>orcl</name> <dns_name /> <serial_number /> <system_name>orcl</system_name> <family>Software.Database</family> <class>Oracle</class> <mdr_name>lodivmlcvs2026.ca.com</mdr_name> <mdr_class>CCA r12.8</mdr_class> <federated_asset_id>&objtype=database&name=orcl</federated_asset_id> </ci> <relation> <type>communicates with</type> <provider> <name>Copy of Oracle Database 11g (Windows) 11.2.0.1.0 (C:\app\Administrator\product\11.2.0\dbhome_1)</name> <system_name> bgunn03-i44401.ca.com|Copy of Oracle Database 11g (Windows)|11.2.0.1.0|C:\oracle\product\11.2.0\dbhome_1) </system_name> </provider> <dependent> <name>orcl</name> <dns_name></dns_name> <serial_number></serial_number> <system_name>orcl</system_name> </dependent> </relation> name および system_name (この例では太字で示される)は検出された値です。 family および class はプロバイダ コンポーネントに基づいて生成されます。 エクスポートの後、CA Service Desk UI は関係を、CMDB Visualizer はコンポーネント関係を表示します。
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|