Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the main distributable is in .ZIP format
  • the plugin scripts and other contents are structured in subdirectories:
    • /files: contains all files commonly used across different platforms (required)
    • /files-posix: contains Linux-specific files (optional)
    • /files-win: contains Windows-specific files (optional)
  • an XML file at the root of the distributable that defines the plugin

Understanding the Plugin's XML Definition

A plugin's XML definition performs several key tasks:

...

Plugin XML Definition

<uptime ...
  ... target_grouping="other">
<exec>com.uptimesoftware.uptime.CustomScriptRunner</exec>
  <class>Enhanced Log Monitor</class>
  <erdc_version>1.0</erdc_version>?
  <category>Operating System Monitors</category>
  <category_related>Domain Services</category_related>
  <grid_info>
    <supported_versions>7.2,7.3</supported_versions>
    <supported_platforms>windows</supported_platforms>
    <requires_agent_scripts>true</requires_agent_scripts>
    <upgrade_in_place>true</upgrade_in_place>
  </grid_info>
  <help>tooltip text on add monitors page</help>
  <elements>
    [plugin input/output settings definition]
  </elements>
</uptime>

  • <exec>: the Java application executed to collect data
  • <class>: the name of the plugin as it appears in the list of up.time service monitors
  • the version-, category-, and grid-related elements define the plugin as a manageable asset within an up.time deployment
  • <help>: elaborate on the plugin purpose; appears as a tool tip
  • <elements>: use <group> and <element> child elements to create configuration fields (see below for more information)
Plugin Input Settings Definition

<element name="mandatoryInputField" parameter_type="input"
 data_type="string" gui_basic="1" range_type="0">
  <gui_type> <string/> </gui_type>
  <control_options>size:40 </control_options>
  <default_value>plugins/scripts/sample
   /script.php
</default_value>
  <short_description>Script Name</short_description>
  <long_description>script to execute</long_description>
  <validation_rule><alphanumeric/></validation_rule>
  <error_message>
    <alphanumeric>this is a required field</alphanumeric>
  </error_message>
</element>

This first input element is a mandatory input field that accepts a string value, denoting a script name that will be executed by the plugin.

<element name="CheckBox" parameter_type="input"
 data_type="boolean" gui_basic="1" range_type="0">
  <gui_type> <boolean/> </gui_type>
  <control_options>size:40 </control_options>
  <default_value/>
  <short_description>Confirm Variable</short_description>
  <long_description>enable a variable</long_description>
  <validation_rule/>
  <error_message/>
</element>

The second input element is a check box that passes a boolean to the executed script.

<element name="mandatoryInputField" parameter_type="input"
 data_type="string" gui_basic="1" range_type="0">
  <gui_type>
    <single_select type="dropdown">
      <value>None</value>
      <value>All</value>
      <value>Option 1</value>
      <value>Option 2</value>
      <value>Option 3</value>
    </single_select>
  </gui_type>
  <control_options>size:8 </control_options>
  <default_value>None</default_value>
  <short_description>Select an Option</short_description>
  <long_description>select from a list</long_description>
  <validation_rule><alphanumeric/></validation_rule>
  <error_message>
    <alphanumeric>this is a required field</alphanumeric>
  </error_message>
</element>

The third input element is a drop-down that passes one of several string-based options to the executed script.

Plugin Outputs Settings Defintion

<element name="serverResponse" parameter_type="output"
 data_type="string"
gui_basic="1" range_type="0" units="">
  <control_options>size: 8</control_options>
  <default_value/>
  <short_description>Server Response</short_description>
  <long_description>compare a string</long_description>
  <validation_rule/>
  <error_message/>
  <gui_type><string/></gui_type>
</element>

For the first output element, the plugin accepts a string value that will be compared against output from the executed script. The string data type determines the comparative options to determine warning and critical conditions.

<group name="Specific Metric Type Check" switch="0">
  <short_description/>
  <long_description/>
  <element name="usageRate", parameter_type="output"
   data_type="integer" range_type="0" units="%">
    <control_options>size: 8</control_options>
    <default_value/>
    <short_description>Usage Rate</short_description>
    <long_description>returned integer</long_description>
    <validation_rule/>
    <error_message/>
   <gui_type><integer/></gui_type>
  </element>

  <element name="usageRaw" parameter_type="output"
   data_type="ranged" gui_basic="1" range_type="0"
   units="">
    <control_options>size: 8</control_options>
    <default_value/>
    <short_description>Raw Usage</short_description>
    <long_description>returned range</long_description>
    <validation_rule/>
    <error_message/>
    <gui_type><decimal/></gui_type>
  </element>
</group>

The next two output elements are similar enough to be paired on the configuration screen using <group> as a parent element. The name attribute is the grouping label in the user interface. The units attribute adds a label after the field to assist the user.

The first of the two elements accepts integer values and compares them to integer values returned through the script.

The second of the two elements accepts decimal values and compares them to a range of values returned through the script.

Definition XML Reference

The following table summarizes valid values for the various XML elements, child elemetns, and attributes that define a plugin.

...