MachDB XML Description
This is the spec on how I expect your
XML to look. If you meet the guidelines below, your XML will
parse correctly and will be inserted into the DB.
Note: All nodes may be specified once, unless otherwise
mentioned. All fields have a 30 char limit unless otherwise
mentioned.
Example here: host.xml
Of course, the standard stuff:
<?xml version="1.0"?>
Everything is under the 'host' node:
<host>
Hostname - this can be the FQDN
or just the hostname. It's up to you and how you want to get
information out of the system later.
<hostname>hostname</hostname>
Domain:
<domain>domain.com</domain>
HWID - now, this one is
important. There has to be a way to uniquely identify the hardware and
it shouldn't change. Since there are multiple ways to define
this, I leave it up to you. I recommend you use UUID, or the
primary MAC address. Either way, it's limited to 100 chars:
<hwid>00:30:48:71:XX:XX</hwid>
or
<hwid>1a094323-c9c6-493c-9112-764b3a296536</hwid>
Memory - swap and RAM
<memory>
<memtotal>2048</memtotal>
<swaptotal>981</swaptotal>
</memory>
CPU - You can only have one
type of CPU in a host. Is this a limitation for anyone?
Cache - int 6
Count - int 6
Name - char 100
Speed - int 6
unified_cache - int 1
<cpu>
<cache>512</cache>
<unified_cache>0</unified_cache>
<count>1</count>
<name>Intel Pentium(R) 4</name>
<speed>2800</speed>
</cpu>
Architecture:
<arch>i686</arch>
Base Architecture:
<basearch>i386</basearch>
Kernel:
<kernel>Linux 2.6.9-55.0.2.EL</kernel>
OS Name. Rather than get
complicated and try to parse out the name, vendor, version and release
of each OS out there, I went with a single field. I figure regex
matches in the UI will do the filtering better than complicated parsing
that needs adjustment.
osname - char 100
<osname>CentOS release 4.4 (Final)</osname4>
BIOS information:
<bios>
<date>12/21/2003</date>
<vendor>Phoenix Technologies, LTD</vendor>
<version>6.00 PG</version>
</bios>
Chassis information:
asset_tag - char 50
serial - char 50
<chassis>
<asset_tag>N90783459073457</asset_tag>
<serial>2987734234</serial>
<type>Rack Mount Chassis</type>
<vendor>Dell Inc.</vendor>
</chassis>
System:
serial - char 100
uuid - char 100
<system>
<name>PowerEdge 2950</name>
<serial>89745897</serial>
<uuid>aac680d5-2c35-46c0-b589-a2f69d146d3a</uuid>
<vendor>Dell Inc.</vendor>
<version>Not Specified</version>
</system>
Motherboard:
name - char 100
<motherboard>
<name>P4SCE</name>
<vendor>Supermicro</vendor>
<version>PCB Version</version>
</motherboard>
Network information.
Multiple can be specified. IPv4 style addresses supported now, I
will be adding IPv6 soon.
macaddr - char 18
interface - char 10
ipaddr, broadcast, netmask - char 16
<nic>
<broadcast>10.10.10.175</broadcast>
<interface>eth0</interface>
<ipaddr>10.10.10.162</ipaddr>
<macaddr>00:30:48:71:XX:XX</macaddr>
<netmask>255.255.255.240</netmask>
</nic>
Disks. Multiple can be
specified.
model - char 100
size - bigint 20 - this can be whatever you want, KB, MB, GB. 16
zettabyte limit when using KB
device - char 20
<disk>
<device>/dev/hda</device>
<model>Maxtor 7L300R0</model>
<size>293057352</size>
<type>ide</type>
</disk>
Filesystems. Multiple can
be specified.
device, mountpoint - char 50
size - bigint 20 - this can be whatever you want, KB, MB, GB. 16
zettabyte limit when using KB
type - char 10
<filesystem>
<device>/dev/md3</device>
<mountpoint>/home</mountpoint>
<size>4814888</size>
<type>ext3</type>
</filesystem>
Packages. Multiple can be
specified. This is very basic, let me know if it is
limiting. I use RPM to get this information for my systems, but
I'm sure apt or dpkg will do the trick for other systems.
Name - char 100
<package>
<arch>noarch</arch>
<name>basesystem</name>
<version>8.0</version>
<release>4</release>
</package>
PCI slots info. I have
this in the gather script, but don't do anything with it on the DB
yet. I haven't decided how this will work yet, whether or not
it's relevant or useful. Let me know your thoughts. But for
now, don't worry about using it or defining it too much. Update: this will change in a future release to
represent the PCI numerical ID's and will not have nodes for USB, IDE,
etc. Kindly ignore this for now while I'm working out how this
will look.
<pci>
<ide>Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)</ide>
<net>Intel Corporation 82541EI Gigabit Ethernet Controller (Copper)</net>
<usb>Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)</usb>
<video>ATI Technologies Inc Rage XL (rev 27)</video>
</pci>
Any comments, please e-mail me and let me know. I am always
looking to improve this.