NAME
mxcategoryitem - Systems Insight Manager report category file format
SYNOPSIS
mxcategoryitem
DESCRIPTION
The mxreport command supports reading and writing report and report
category information in the eXtensible Markup Language (XML) format.
You can use this capability to add or remove reports or report
categories in the Systems Insight Manager environment. Each file may
contain the definitions of one or more reports or one or more report
categories.
Document Type Definition
The Document Type Definition (DTD) file defines the constraints for an
XML file. These constraints include the valid element tags,
attributes, and the cardinality of elements in an XML file. The report
DTD file is named mxcategoryitem.dtd and is included in the following
paragraph. Note that due to man page formatting, the DTD contents may
not appear the same as in the file.
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT category (replaceCategory?, version?, group?, input?, displayName?, dbViewName?, item*, privilege?)>
<!ATTLIST category
catName CDATA #REQUIRED
displayFlag CDATA #IMPLIED
queryType CDATA #IMPLIED
editFlag CDATA #IMPLIED
categoryId CDATA #IMPLIED
plugin CDATA #IMPLIED
displayOrder CDATA #IMPLIED
action CDATA #IMPLIED
>
<!ELEMENT categoryList (category+)>
<!ELEMENT dbViewColName (#PCDATA)>
<!ELEMENT dbViewName (#PCDATA)>
<!ELEMENT displayName (#PCDATA)>
<!ATTLIST displayName
displayLocale CDATA #REQUIRED
>
<!ELEMENT displayOrder (#PCDATA)>
<!ELEMENT group (#PCDATA)>
<!ATTLIST group
groupLocale CDATA #IMPLIED
parent CDATA #REQUIRED
child CDATA #REQUIRED
>
<!ELEMENT input (sourceHandler?, source*)>
<!ATTLIST input
sourceType CDATA #REQUIRED
>
<!ELEMENT item (replaceItem?, operation*, displayName?, dbViewName?, dbViewColName?, displayOrder?, privilege?)>
<!ATTLIST item
itemId CDATA #IMPLIED
itemName CDATA #REQUIRED
displayFlag CDATA #IMPLIED
action CDATA #IMPLIED
>
<!ELEMENT replaceItem EMPTY>
<!ATTLIST replaceItem
itemName CDATA #REQUIRED
>
<!ELEMENT operation EMPTY>
<!ATTLIST operation
op CDATA #REQUIRED
opName CDATA #REQUIRED
opHandler CDATA #REQUIRED
>
<!ELEMENT privilege (#PCDATA)>
<!ELEMENT source (#PCDATA)>
<!ATTLIST source
dbType CDATA #IMPLIED
level CDATA #IMPLIED
share CDATA #IMPLIED
dbViewName CDATA #IMPLIED
action CDATA #IMPLIED
>
<!ELEMENT sourceHandler (#PCDATA)>
<!ELEMENT version EMPTY>
<!ATTLIST version
major CDATA #REQUIRED
minor CDATA #REQUIRED
>
<!ELEMENT replaceCategory EMPTY>
<!ATTLIST replaceCategory
catName CDATA #REQUIRED
>
Elements
As defined in the DTD, the report category XML file may contain the
following elements.
The first line of a report category XML file must be in the following
format:
<?xml version="1.0" encoding="encoding-value" ?>
where the user substitutes a recognized encoding value for the
encoding-value parameter. The recognized encoding values may be found
at the following web site:
http://www.iana.org/assignments/character-sets
If no XML header line is specified, the system defaults encoding to
"UTF-8".
The "categoryList" element must appear once in a report XML file and
wraps the list of report category information. The "categoryList"
element may contain one or more "category" elements.
The "category" element may appear zero or more times in a report XML
file.
The "catName" attribute is required and specifies the unique category
name.
The "displayFlag" attribute is optional and specifies the display type
of a report category. Default is "1", always display the report
category.
The "queryType" attribute is optional. Default is "1". "2" is for
event category.
The "editFlag" attribute is optional and specifies whether the report
category can be edited. A value of "0" indicates that a report
category is not editable. A value of "1" indicates that a report
category can be edited. Default is "1". This attribute is for
internal use.
The "categoryId" attribute is assigned by the system. the user should
not specify this attribute. The system always outputs the "id"
attribute when listing an existing report category to an XML file.
The "plugin" attribute is optional. A value of "0" specifies a
system-defined report category. the user should not specify this
attribute when using command line interface.
The "displayOrder" attribute is optional and specifies the default
display order for report categories.
The "action" attribute is optional. the user should not specify this
option when create new category. Only specify this option when modify
an existing category. And the value should be "MODIFY", "ADD" or
"DELETE".
The "dbViewColName" attribute is required. It specifies the
DbViewColName in the hpmxItem table.
The "dbViewName" attribute is required. It specifies the DbViewName
in the hpmxItem table.
The "displayName" attribute is mandatory and specifies the report
category display name. The "displayName" must be unique in the CMS.
The "displayLocale" attribute is required. It specifies the language
locale of the report category display.
The "displayOrder" attribute is optional and is for future use.
The element "group" is optional. default is "others" group. the user
does not meed to specify this when modify category.
The "groupLocale" attribute is required when specifies "group"
element. It specifies the language locale of the report group
display.
The "parent" attribute is required when specifies "group" element. It
specifies the group name of a set of report categories.
The "child" attribute is required when specifies "group"element. It
must be set to "" (e.g. child="") for this release.
The element "imput" is required when creating new category, but is
optional when modify category.
The "sourceType" attribute is required when specifies "input" element
. It must always be set to "0".
The "sourceHandler" element is required. It must always be set to
"<sourceHandler></sourceHandler>".
The element "item" is required when creating a new category, but is
optional when modifying a category.
The "itemName" attribute is required. It specifies the name of an
item.
The "displayFlag" attribute is optional and specifies the display type
of a report category. Default is set to "1" to always display the
report category.
The "action" attribute is optional when modify category item. And the
value should be "MODIFY", "ADD" or "DELETE".
The element "replaceItem" is optional when modify category item. the
user should not specify this element when create new category.
The "itemName" is required when specifies "replaceItem" element. It
specifies an existing item name which will be replaced by the
"itemName" attribute in "item" element.
The "operation" element is optional. If specified, then the
attributes "op", "opName" and "opHandler" are required.
If the "operation" element is defined, the "op" attribute is required
and specifies a string to represent the operation.
If the "operation" element is defined, the "opName" attribute is
required and specifies the operation name or a mapping table name.
If the "operation" element is defined, the "opHandler" attribute is
required and specifies the fully qualified classname to handle the
operation.
The "source" element is required when create new category, but is
optional when modify an existing category. All attributes are required
when specifies "source" element in modifying category.
The "dbType" attribute is optional and specifies the supported
database type (MSSQL = "1", POSTGRESQL = "10", ORACLE = 100). Support
for all databases is specified by dbType="111".
The "level" attribute is optional. Default is set to "0". It specifies
the top level database view of this category.
The "share" attribute is optional. Default is set to "0". The database
view does not share for other categories. For this version, there is
no support of sharing database view.
The "dbViewName" attribute is optional. It specifies the database view
name of this category.
The "action" attribute is required when specifies "source" element in
modifying category. It value should be "MODIFY", "ADD" or "DELETE".
The "version" element is optional. If specified, then the attributes
"major" and "minor" are required. If the "version" element is
defined, the "major" attribute is required and specifies the major
version of the XML file.
If the "version" element is defined, the "minor" attribute is required
and specifies the minor version of the XML file.
The "replaceCategory" element is optional when modifies category. the
user should not specify this element when create a new category.
The "catName" is required when specifies "replaceCategory" element. It
specifies the name of the existing category which will be replaced by
the "catName" in the "category" element.
Commenting
Comments may be included in XML files. The comment must begin with
the characters "<!--" and end with the characters "-->". Comments may
span multiple lines within the beginning and ending character tags.
Examples
This section contains some examples of report category XML files.
This example shows a file containing the definition of report
categories named "Installed Controllers 12th floor" and "Inventory
12th floor".
<?xml version="1.0" encoding="UTF-8"?>
<categoryList>
<category catName="Inventory 12th floor" displayFlag="1" queryType="1" editFlag="1" categoryId="1" plugin="0">
<version major="1" minor="0"/>
<group groupLocale="en_US" parent="General" child=""/>
<input sourceType="0">
<sourceHandler/>
<source dbType="111">
CREATE VIEW R_Inventory_12th_floor
AS
SELECT devices.DeviceKey, devices.Name AS DeviceName, IPAddress.IPAddress, devices.ProductName,
DB_DeviceInfoEx.SerialNumber, DB_DeviceInfoEx.AssetTag, DB_DeviceInfoEx.TotalMemory AS MemorySize,
DB_DeviceInfoEx.ROMVersion, DB_DeviceInfoEx.OSName, DB_DeviceInfoEx.OSVendor,
IPAddress.IPAddressNumber AS IPLongValue, DC_ProliantHost.ServerRole,
CIM_ComputerSystem.dc_SystemLocation AS Location,
CIM_ComputerSystem.PrimaryOwnerContact AS DeviceOwner,
devices.ProductType AS ProductType,
devices.OverallStatus AS DeviceStatus,
CIM_OperatingSystem.LastBootUpTime AS DeviceBootTime, CIM_ComputerSystem.SnapshotID
FROM DB_DeviceInfoEx RIGHT OUTER JOIN
devices LEFT OUTER JOIN
CIM_ComputerSystem LEFT OUTER JOIN
CIM_OperatingSystem ON CIM_ComputerSystem.NodeID = CIM_OperatingSystem.NodeID AND
CIM_ComputerSystem.SnapshotID = CIM_OperatingSystem.SnapshotID LEFT OUTER JOIN
DC_ProliantHost ON CIM_ComputerSystem.NodeID = DC_ProliantHost.NodeID AND
CIM_ComputerSystem.SnapshotID = DC_ProliantHost.SnapshotID ON
devices.DeviceKey = CIM_ComputerSystem.NodeID LEFT OUTER JOIN
IPAddress ON devices.DeviceKey = IPAddress.DeviceKey and IPAddress.ipindex = 0 ON
DB_DeviceInfoEx.DeviceKey = devices.DeviceKey
</source>
</input>
<displayName displayLocale="en_US">Inventory 12th floor</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<item itemName="System Name" displayFlag="1">
<displayName displayLocale="en_US">System Name</displayName>
<dbViewName>R_Inventory1</dbViewName>
<dbViewColName>DeviceName</dbViewColName>
<displayOrder>1</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="IP Address" displayFlag="1">
<displayName displayLocale="en_US">IP Address</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>IPAddress</dbViewColName>
<displayOrder>2</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="System Status" displayFlag="1">
<displayName displayLocale="en_US">System Status</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>DeviceStatus</dbViewColName>
<displayOrder>3</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Product Type" displayFlag="1">
<displayName displayLocale="en_US">Product Type</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>ProductType</dbViewColName>
<displayOrder>4</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Product Model" displayFlag="1">
<displayName displayLocale="en_US">Product Model</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>ProductName</dbViewColName>
<displayOrder>5</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Serial Number" displayFlag="1">
<displayName displayLocale="en_US">Serial Number</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>SerialNumber</dbViewColName>
<displayOrder>6</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Asset Tag" displayFlag="1">
<displayName displayLocale="en_US">Asset Tag</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>AssetTag</dbViewColName>
<displayOrder>7</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Memory Size (KB)" displayFlag="1">
<displayName displayLocale="en_US">Memory Size (KB)</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>MemorySize</dbViewColName>
<displayOrder>8</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="ROM Version" displayFlag="1">
<displayName displayLocale="en_US">ROM Version</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>ROMVersion</dbViewColName>
<displayOrder>9</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Operating System Name" displayFlag="1">
<displayName displayLocale="en_US">Operating System Name</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>OSName</dbViewColName>
<displayOrder>10</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Operating System Vendor" displayFlag="1">
<displayName displayLocale="en_US">Operating System Vendor</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>OSVendor</dbViewColName>
<displayOrder>11</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Server Role" displayFlag="1">
<displayName displayLocale="en_US">Server Role</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>ServerRole</dbViewColName>
<displayOrder>12</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Location" displayFlag="1">
<displayName displayLocale="en_US">Location</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>Location</dbViewColName>
<displayOrder>13</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="System Owner" displayFlag="1">
<displayName displayLocale="en_US">System Owner</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>DeviceOwner</dbViewColName>
<displayOrder>14</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="System Boot Up Time" displayFlag="1">
<displayName displayLocale="en_US">System Boot Up Time</displayName>
<dbViewName>R_Inventory_12th_floor</dbViewName>
<dbViewColName>DeviceBootTime</dbViewColName>
<displayOrder>15</displayOrder>
<privilege>0</privilege>
</item>
<privilege>0</privilege>
</category>
<category catName="Installed Controllers 12th floor" displayFlag="1" queryType="1" editFlag="1" categoryId="1" plugin="0">
<version major="1" minor="0"/>
<group groupLocale="en_US" parent="General" child=""/>
<input sourceType="0">
<sourceHandler/>
<source dbType="111">
CREATE VIEW R_InstalledBoards12
AS
SELECT devices.DeviceKey, devices.Name AS DeviceName, CIM_PhysicalElement.Name AS BoardName,
CIM_PhysicalElement.Model AS BoardModel, CIM_PhysicalElement.Version AS BoardRevision,
CIM_PhysicalElement.dc_FirmwareRevision AS BoardFirmware, CIM_PhysicalElement.SerialNumber AS BoardSerial,
CIM_PhysicalElement.Slot_Number AS Slot, CIM_PhysicalElement.SnapshotID, CIM_PhysicalElement.dc_HWLocation AS Location,
CIM_PhysicalElement.Tag
FROM CIM_PhysicalElement LEFT OUTER JOIN
devices ON CIM_PhysicalElement.NodeID = devices.DeviceKey
WHERE (NOT (CIM_PhysicalElement.Name IS NULL)) AND (CIM_PhysicalElement.Tag NOT LIKE '%Drive%') AND
(CIM_PhysicalElement.Tag NOT LIKE '%Blade%') AND (CIM_PhysicalElement.Tag NOT LIKE '%Power%') AND
(NOT (CIM_PhysicalElement.Tag LIKE N'%Connector%')) AND (NOT (CIM_PhysicalElement.Tag LIKE N'%Storage%')) AND
(NOT (CIM_PhysicalElement.Name LIKE N'%bridge%')) AND (NOT (CIM_PhysicalElement.Name LIKE N'%PROCESSOR%')) AND
(NOT (CIM_PhysicalElement.Name LIKE N'%Other%')) AND (NOT (CIM_PhysicalElement.Tag LIKE N'%EISA Board 0%')) OR
(CIM_PhysicalElement.Tag NOT LIKE '%Drive%') AND (CIM_PhysicalElement.Tag NOT LIKE '%Blade%') AND
(CIM_PhysicalElement.Tag NOT LIKE '%Power%') AND (NOT (CIM_PhysicalElement.Tag LIKE N'%Connector%')) AND
(NOT (CIM_PhysicalElement.Tag LIKE N'%Storage%')) AND (NOT (CIM_PhysicalElement.Model IS NULL)) AND
(NOT (CIM_PhysicalElement.Tag LIKE N'%EISA Board 0%')) OR
(CIM_PhysicalElement.Tag LIKE N'%Controller%')
</source>
</input>
<displayName displayLocale="en_US">Installed Controllers 12th floor</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<item itemName="System Name" displayFlag="1">
<displayName displayLocale="en_US">System Name</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>DeviceName</dbViewColName>
<displayOrder>1</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Slot" displayFlag="1">
<displayName displayLocale="en_US">Slot</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>Slot</dbViewColName>
<displayOrder>2</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Board Name" displayFlag="1">
<displayName displayLocale="en_US">Board Name</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>BoardName</dbViewColName>
<displayOrder>3</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Board Revision" displayFlag="1">
<displayName displayLocale="en_US">Board Revision</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>BoardRevision</dbViewColName>
<displayOrder>4</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Board Model" displayFlag="1">
<displayName displayLocale="en_US">Board Model</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>BoardModel</dbViewColName>
<displayOrder>5</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Board Firmware" displayFlag="1">
<displayName displayLocale="en_US">Board Firmware</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>BoardFirmware</dbViewColName>
<displayOrder>6</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Board Serial Number" displayFlag="1">
<displayName displayLocale="en_US">Board Serial Number</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>BoardSerial</dbViewColName>
<displayOrder>7</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Location" displayFlag="1">
<displayName displayLocale="en_US">Location</displayName>
<dbViewName>R_InstalledBoards12</dbViewName>
<dbViewColName>Location</dbViewColName>
<displayOrder>8</displayOrder>
<privilege>0</privilege>
</item>
<privilege>0</privilege>
</category>
</categoryList>
This example shows how to rename an existing category "Power Supply"
to "My Power Supply",
change the database view, rename item "Model Name" to "My Model
Name", add new item "Physical Location" and delete item "Status" in
the "Power Supply" category.
<?xml version="1.0" encoding="UTF-8"?>
<categoryList>
<category catName="My Power Supply" action="MODIFY">
<replaceCategory catName="Power Supply"
<input sourceType="0">
<sourceHandler/>
<source dbType="111" level="0" share="0" dbViewName="R_PowerSupply" action="MODIFY">
CREATE VIEW R_PowerSupply AS
SELECT CIM_PowerSupply.NodeID AS DeviceKey, CIM_PowerSupply.SystemName AS DeviceName, CIM_PowerSupply.DeviceID,
CIM_PhysicalElement.Model AS ModelName, CIM_PhysicalElement.SerialNumber,
CIM_PhysicalElement.dc_FirmwareRevision AS FirmwareRev, CIM_PowerSupply.Availability AS ConditionVal,
CIM_PowerSupply.TotalOutputPower / 1000 AS MaxCapacity, CIM_PowerSupply.dc_CurrentOutputPower / 1000 AS UsedCapacity,
CIM_PowerSupply.dc_RedundancyState AS RedundancyState, CIM_PowerSupply.dc_PowerSupplyStatus AS Status,
CIM_PowerSupply.R_Condition AS Condition, CIM_PowerSupply.SnapshotID, CIM_PowerSupply.OtherIdentifyingInfo AS Description,
CIM_PowerSupply.Type, CIM_PowerSupply.Location AS PhysicalLocation, CIM_PowerSupply.Manufacturer
FROM CIM_PhysicalElement RIGHT OUTER JOIN
CIM_PowerSupply ON CIM_PhysicalElement.NodeID = CIM_PowerSupply.NodeID AND
CIM_PhysicalElement.SnapshotID = CIM_PowerSupply.SnapshotID AND CIM_PhysicalElement.Tag = CIM_PowerSupply.DeviceID
</source>
</input>
<item itemName="My Model Name" action="MODIFY">
<replaceItem itemName="Model Name"/>
<displayName displayLocale="en_US">My Model Name</displayName>
</item>
<item itemName="Physical Location" displayFlag="1" action="ADD">
<displayName displayLocale="en_US">Physical Location</displayName>
<dbViewName>R_PowerSupply</dbViewName>
<dbViewColName>PhysicalLocation</dbViewColName>
<displayOrder>12</displayOrder>
<privilege>0</privilege>
</item>
<item itemName="Status" displayFlag="1" action="DELETE">
</item>
</category>
</categoryList>
LIMITATIONS
This command may only be run on the CMS.
AUTHOR
mxreport was developed by the Hewlett-Packard Company.
SEE ALSO for HP-UX
mxreport(1M), mxreport(4)
SEE ALSO for Linux
mxreport(8), mxreport(4)