A.4 Agent_BuildDynamicLegendXML

This function builds a dynamic legend (or AC legend) string suitable for passing to the Agent_CreateData function as the AC legend argument. Dynamic legends built with this function are compatible with Analysis Center, and all datastreams to be consumed by Analysis Center should build their dynamic legends using this function.

The arguments to this function are listed below in the order they should be passed to the function.

Required arguments:

  • $measurement_desc defines the measurement, such as "Current Session Count" or "Time Since Last Restart."

  • $measurement_units defines the units associated with the measurement, such as "Sessions" for the "Current Session Count" measurement or "Seconds" for the "Time Since Last Restart" measurement. In the case of "Current Session Count," you can also specify the units as the empty string, because the units are evident from the name of the measurement.

  • $measured_resource defines a string that indicates the specific resource to which the datastream is related, such as "Application Server Two" for the "Current Session Count" measurement or "NetIQ Agent Service" for the "Time Since Last Restart" measurement.

Returns:

  • This function returns an XML string suitable for passing to the Agent_CreateData function as the AC-compatible legend argument, for use by the NetIQ Analysis Center reporting application.

Example Usage:

  • To build an AC legend:

    $ac_legend = Agent_BuildDynamicLegendXML "Current Session Count" "Sessions" "Application Server Two"