Traverse uses an XML file format called a "test descriptor" to describe settings for plugin tests. Here is an example test descriptor that might be used to describe a plugin that monitors weather information.
Weather Information Plugin Test Descriptor
<monitor type="weather" plugintype="java"
resource="com.weatherwatchers.netvigilplugin.WeatherPlugin">
<testtype>
<displayName>Current Temperature</displayName>
<displayCategory>application</displayCategory>
<subType>temperature</subType>
<units>degrees C</units>
<severityAscendsWithValue>true</severityAscendsWithValue>
<defaultWarningThreshold>100</defaultWarningThreshold>
<defaultCriticalThreshold>120</defaultCriticalThreshold>
<shadowWarningThreshold>100</shadowWarningThreshold>
<shadowCriticalThreshold>120</shadowCriticalThreshold>
<slaThreshold>120</slaThreshold>
<testInterval>180</testInterval>
<testField>
<fieldName>city</fieldName>
<fieldDisplayName>City</fieldDisplayName>
<isRequired>true</isRequired>
<isPassword>false</isPassword>
<defaultValue>Muskogee</defaultValue>
</testField>
<testField>
<fieldName>state</fieldName>
<fieldDisplayName>State/Province</fieldDisplayName>
<isRequired>true</isRequired>
<isPassword>false</isPassword>
<defaultValue>OK</defaultValue>
</testField>
<testField>
<fieldName>country</fieldName>
<fieldDisplayName>Country</fieldDisplayName>
<isRequired>true</isRequired>
<isPassword>false</isPassword>
<defaultValue>US</defaultValue>
</testField>
</testtype>
</monitor>
The first element is the monitor element. The monitor element defines what monitor the different tests belong to. There are three attributes for the monitor element:
Monitor Element Attributes
Attributes |
Description |
type |
This defines a type name for the plugin, and the type of monitoring it does. The value of type will show up in the DGE status line when displaying the testing queues and monitor status, and will be used in the Web application |
plugintype |
This attribute describes the type of plugin. For a Java plugin monitor, this parameter should be set to java. |
resource |
This is the name of the resource of that should be used to do the tests. For a plugintype of java, this should be the fully qualified name of a Java class file that implements the [NetvigilPlugin] interface. |
The configuration file also requires a testType
definition as described above. You should make a different XML test descriptor for each type of monitor you want to create. To group multiple tests that belong to the same general test type, each monitor type can have multiple testType
definitions with subType
defined for each test. These can be contained within a single monitor descriptor or spread across separate XML files.