The MonKit plugin is used to display charts of data delivered in XML compliant with monkit.xsd. Monkit also has a small Java API you can use to produce the XML.
For clients who wish to see the graphs produced by Monkit. Access to google API site is required. Since it uses the graphing engine to create the charts. If you do not have access to the internet from the machine you're browsing the job, you can use version 0.2.4
The idea of this plugin is, that given any xml complying to the xsd http://code.praqma.net/schemas/monkit/1.0.1/monkit.xsd a chart will be produced and displayed in the project.
The basic format is given as a set of categories, which contains a set of observations.
Each category will be displayed as a chart and each observation for a category will be a graph in that chart.
The formation of the xml can be eased with a small tool, MonKit, which is written in java and can be found at github https://github.com/Praqma/MonKit.
The charts looks like this:
As an additional feature, MonKit plugin can set the build health. This can be configured like this:
This should be read as, the category "disk" is at full health at 75 or above and unstable at 50 and below. The values between these two numbers are interpolated to a build health percentage.
This section will describe how to use MonKit as an API.
For now there's only an API for Java.
MonKit can be included in your Maven project if you include our repository in the distributionManagement section and the dependency in the dependencies section - like this:
The API works as follows:
- Create a MonKit instance.
- Add a category
- Add an observation
- Repeat from 2 or 3
- save() it
By default MonKit saves the xml file to the current workspace in a file called monkit.xml.
The filename can be given as a File argument to the constructor or save().
Two static methods are available to generate MonKit instances:
- fromString(String), where String is a velformed valid MonKit xml String
- fromXML(File), where File points to a velformed valid MonKit xml File
The previous code will produce a file called monkit.xml in the current working directory.
The following code will produce three MonKit instances, merge them, create a final instance and save it to "myfile.xml" in the current working directory.
The Javadoc can be seen at http://code.praqma.net/docs/monkit/