次は、インポートユーティリティーとエクスポートユーティリティーが処理するトポロジデータです。
すべてのドメイン、グループ、ホストに関するレコード情報です。
ドメインとグループに関する装飾情報です。この情報には、バックグラウンド内容の代わりに、レイアウトとバックグラウンドインデックスしか含まれません。たとえばバックグラウンド情報には、GIF ファイルではなく、GIF ファイル名だけが含まれます。
トポロジ階層と、エンティティーのバックグラウンドおよびレイアウトに関する情報です。
Import/Export ファイルは、インポートデータやエクスポートデータを説明するファイルで、任意のテキストエディタで編集できます。このファイルには、トポロジ階層のエンティティーがすべて含まれます。最後に追加するエクスポートモードでは、より多くのオブジェクト情報をファイルの最後に追加できるため、ファイル形式も簡単に拡張と解析ができるようになっています。エクスポートされたデータは XML 形式で保存されます。
このファイルは 4 つの部分に分かれています。
マジック情報
DTD (文書型宣言)
ヘッダ情報
データブロック
マジック情報は、ファイルが XML 形式であることを識別します。通常この情報は次のように表示されます。
<? XML version = 1.0 ?> |
DTD 情報はドキュメントの構造を定義します。次は、エクスポートファイルの DTD の記述例です。
<!ELEMENT ENTITY (ENTITY* ADORNMENT*)> /* Entity element describes a entity. If it is a group, it may contain groups and adornment. */ <!ATTLIST ENTITY /* Entity attributes */ desc CDATA full_desc CDATA hostname CDATA ip CDATA netmask CDATA architecture CDATA family CDATA polling_type CDATA url CDATA x_coord CDATA y_coord CDATA topology_type CDATA event_dest CDATA trap_dest CDATA target_host CDATA target_ip CDATA read_info CDATA write_info CDATA> <!ELEMENT ADORNMENT> <!ATTLIST ADORNMENT x_coord CDATA y_coord CDATA type CDATA configuration CDATA> ]> |
ヘッダ情報は、一般的な情報を記録するために使用されます。
ユーザー
データ
バージョン
プラットフォーム
製品
データブロックには、トポロジの階層アーキテクチャーとエンティティーが含まれます。
次の図は、「My New」ドメインのトポロジを示したものです。
次は、「My New」ドメインのトポロジエクスポートファイル例です。
<?xml version="1.0" encoding="UTF-8"?> <DOCUMENT> <HEAD> <USER>jkang</USER> <DATE>1/7/1999</DATE> <VALIDITY>7 days</VALIDITY> <PRODUCT>Sun Management Center</PRODUCT> <VERSION>3.6.1</VERSION> <COMMENTS>This is an example.</COMMENTS> </HEAD> <DOMAIN name="my new"> <ENTITY arch="SunOS 5.8" config="" desc="wizard" entityId="e-1" family="sun4u-Sun-Ultra-2" fulldesc="wizard" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules" type="" writeInfo="" xCoord="23" yCoord="39" /> <ENTITY arch="SunOS 5.8" config="" desc="atom" entityId="e-2" family="sun4u-Sun-Ultra-2" fulldesc="" hostname="u30-1" ipAddr="129.158.168.113" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost="" targetIp="" targetUrl="snmp://129.158.168.113:161/sym//base/mibman/modules" type="" writeInfo="" xCoord="75" yCoord="39" /> <ENTITY arch="" config="" desc="campus" entityId="e-3" family="campus-view" fulldesc="" hostname="" ipAddr="" isPoll="true" isSoftGroupLink="false" netMask="" pollType="aview" readInfo="espublic" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:164/mod/topology+view-101" type="" writeInfo="" xCoord="27" yCoord="111"> <ENTITY arch="" config="" desc="building" entityId="e-1" family="building-view" fulldesc="" hostname="" ipAddr="" isPoll="true" isSoftGroupLink="false" netMask="" pollType="aview" readInfo="espublic" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:164/mod/topology+view-102" type="" writeInfo="" xCoord="" yCoord=""> <ENTITY arch="SunOS 5.8" config="" desc="Wizard" entityId="e-1" family="sun4u-Sun-Ultra-2" fulldesc="" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules" type="" writeInfo="" xCoord="" yCoord="" /> <ENTITY arch="SunOS 5.8" config="" desc="aaa" entityId="e-2" family="sun4u-Sun-Ultra-2" fulldesc="" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules" type="" writeInfo="" xCoord="" yCoord="" /> <ENTITY arch="SunOS 5.8" config="" desc="atom" entityId="e-3" family="sun4u-Sun-Ultra-2" fulldesc="" hostname="u30-1" ipAddr="129.158.168.113" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost="" targetIp="" targetUrl="snmp://129.158.168.113:161/sym//base/mibman/modules" type="" writeInfo="" xCoord="" yCoord="" /> </ENTITY> </ENTITY> <ENTITY arch="" config="" desc="129.158.0.0" entityId="e-4" family="network-view" fulldesc="129.158.0.0" hostname="129.158.0.0" ipAddr="129.158.0.0 isPoll="true" isSoftGroupLink="false" netMask="255.255.255.0" pollType="aview" readInfo="espublic" targetHost="129.158.0.0" targetIp="129.158.0.0" targetUrl="snmp://129.158.168.63:164/mod/topology+view-103" type="" writeInfo="" xCoord="38" yCoord="181"> <ENTITY arch="" config="" desc="129.158.168.0" entityId="e-1" family="subnetwork-view" fulldesc="129.158.168.0" hostname="129.158.168.0" ipAddr="129.158.168.0" isPoll="true" isSoftGroupLink="false" netMask="255.255.255.0" pollType="aview" readInfo="espublic" targetHost="129.158.168.0" targetIp="129.158.168.0" targetUrl="snmp://129.158.168.63:164/mod/topology+view-104" type="" writeInfo="" xCoord="" yCoord=""> <ENTITY arch="SunOS 5.8" config="" desc="wizard" entityId="e-1" family="sun4u-Sun-Ultra-2" fulldesc="SUNW,Ultra-2" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0" pollType="ahost" readInfo="public" targetHost="" targetIp="" targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules" type="" writeInfo="" xCoord="" yCoord="" /> </ENTITY> </ENTITY> <ENTITY arch="" config="" desc="myworkstation" entityId="e-5" family="nonagent-sun4u-Sun-Ultra30" fulldesc="" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="" pollType="snmp" readInfo="public" targetHost="" targetIp="" targetUrl="snmp://wizard:1100/oid//1.3.6.1.2.1.1.7.0" type="" writeInfo="private" xCoord="52" yCoord="253" /> <ENTITY arch="SunOS 5.8" config="" desc="System Group" entityId="e-6" family="base-agent" fulldesc="MIB tree branch" hostname="wizard" ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false" netMask="255.255.255.255" pollType="amod" readInfo="" targetHost="wizard" targetIp="129.158.168.63" targetUrl="snmp://129.158.168.63:1100/mod/mib2-simple/system" type="" writeInfo="" xCoord="52" yCoord="329" /> <ADORNMENT Config="bus" Id="adorn-7" Type="layout" XCoord="0" YCoord="0" /> </DOMAIN> </DOCUMENT>