31.2.1 Custom.xml

The following XML shows the structure of a custom data collection:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE classes SYSTEM "items-mysql-monitor.dtd">

              <precondition><![CDATA[Add Precondition Query Here]]></precondition>
              <query><![CDATA[Add Main Query Here]]></query>
                  <attribute name="AttributeName1"/>
                  <attribute name="AttributeName2"/>


Table 31.2 Custom Data Collection Class Elements

Element Description


Container element for all defined classes.


Container element for the definition of the collection.


Logical grouping for the new data collection item.


Name of the custom data collection. Do not use spaces or special characters in this element.


(Optional) Query which checks some conditions. If the query returns true, the main query is executed. For example, the precondition query can be used to check the version of the MySQL server. See Section, “Precondition Queries” for more information.


The main query. For more information, see Section, “Main Queries”


Enables you to label the types of data returned by the query. Possible types are: STRING, INTEGER, and FLOAT. This information is required by the advisor receiving the data. It is also possible to define one or more attributes as counters. See Section 31.2.3, “Data Collection Attributes” for more information.

The values in the namespace and classname elements are used as the first two elements of the name.