4.1.10 Creating a Custom Data Collection Item Modifying the Custom Data Item XML File

Section 4.1.8, “Creating a New Rule: An Example” shows how to create a custom rule and Appendix D, Data Collection Items shows the data items you can use in rule creation. In some circumstances, you might want to create a rule that uses a custom data collection item.

To create additional custom data collection items, edit the share/mysql-monitor-agent/items/custom.xml custom rule file added during installation. The custom.xml is installed automatically, but is not modified during an upgrade installation. The rules file is listed last in the agent-item-files configuration parameter, so any rules and data collection items you add to this file supersede the standard data collection definitions.

After you make changes to the custom.xml, restart the agent to load the custom definitions.