StreamBase Monitor Input Adapter

Introduction

The TIBCO StreamBaseĀ® Monitor Adapter consumes StreamBase Server performance and profile statistics and provides them as tuples to an EventFlow application. The statistics gathered include CPU usage, input and output rates, thread counts, and memory usage. StreamBase profiling statistics are described on Profiling.

Ports

The StreamBase Monitor adapter emits output on six ports. Ports other than Status can be enabled or disabled individually in the Adapter Properties tab if they are not required by your application; ports other than Status are disabled by default.

The output ports are:

  1. Status: Reports adapter status information, such as connecting or disconnecting from a target server. The Type field is reserved for future use, and always contains the value CONNECTION. The Action field contains the action performed on the connection, and Message contains additional information about the action. Possible action strings are: CONNECTED, CONNECTING, DISCONNECTED, INITIALIZING, RESUMING, UNAVAILABLE, WARNING, FAILED, and INFORMATION.

  2. Operator Info emits information about operators in the StreamBase application. The fields are:

    • time (timestamp): The time supplied in the snapshot.

    • operatorName (string): The fully qualified name of the operator.

    • size (int): The size reported by the operator, if any.

    • percentUsage (double): The CPU percentage charged to this operator.

    • profilerMSDelta (long): The number of milliseconds this operator used during the last snapshot interval.

    • inTPS (int): The number of tuples that entered the operator in the last snapshot interval.

    • outTPS (int): The number of tuples that exited the operator in the last snapshot interval.

  3. Module Info emits information about module input and output queues in a StreamBase application. The fields are:

    • time (timestamp): The time supplied in the snapshot.

    • moduleName (string): The name of the module.

    • queues (list(tuple)): A list of tuples that have queue information. The schema of the queues tuple is as follows:

      • queueName (string): The name of the queue.

      • batchLatency (int): The total amount of time batches waited in the last snapshot interval.

      • batchProcessingTime (int): The total amount of time it took batches to be processed in the last snapshot interval.

      • currentQueueLength (int): How many tuples are on this queue.

      • maxQueueLength (int): The maximum number of tuples ever seen at one time on the queue.

  4. Thread Info emits information about StreamBase application threads. The fields are:

    • time (timestamp): The time supplied in the snapshot.

    • threadName (string): The name of the thread.

    • userTime (long): The number of user CPU milliseconds this thread used in the last snapshot interval.

    • systemTime (long): The number of system CPU milliseconds this thread used in the last snapshot interval.

  5. Stream Info emits information about input and output streams for an application. The fields are:

    • time (timestamp): The time supplied in the snapshot.

    • streamName (string): The fully qualified name of the stream.

    • deltaTuples (long): The number of tuples to flow out of this stream in the last snapshot interval.

  6. System Info emits information about the current StreamBase Server and its Java Virtual Machine. The fields are:

    • time (timestamp): The time supplied in the snapshot.

    • timeRunning (int): The number of seconds the server has been up.

    • ClientCount (int): The number of clients connected to the server.

    • dequeueClientCount (int): The number of dequeue clients connected to the server.

    • totalNumberThreads (int): The total number of threads in the server.

    • totalMemory (long): The total amount of memory available for use in the StreamBase Server process.

    • freeMemory (long): The amount of memory free.

    • maxMemory (long): The maximum amount of memory that the server process is allowed to allocate.

    • usedMemory (long): The total amount of memory currently in use in the server process.

    • gcCollectors (list(tuple)): List of tuples with information about garbage collection. The list is null if not supported by the current StreamBase version or the Java virtual machine. The schema of this tuple is:

      • name (string): The name of this garbage collector. This name is generated by the JVM vendor; refer to your Java documentation for more information about individual collectors.

      • count (long): The total number of collections this collector has done since the JVM started.

      • timeMS (long): The total number of milliseconds this collector has used since the JVM started.

Properties

General Tab

The StreamBase Monitor Adapter has the following properties on the General tab in its Properties View in StreamBase Studio:

Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.

Adapter: A read-only field that shows the formal name of the adapter.

Class name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.

Start options: This field provides a link to the Cluster Aware tab, where you configure the conditions under which this adapter starts.

Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.

Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow Editor canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.

Adapter Properties Tab

The StreamBase Monitor Adapter has the following properties on the Adapter Settings tab in its Properties View in StreamBase Studio:

Property Description
Monitor Remote Server If disabled (the default), the adapter monitors the StreamBase Server instance in which it is running. If enabled, it connects to the server specified by the StreamBase URI property below.
StreamBase URI If Monitor Remote Server is enabled, this field specifies the URI of the server to be monitored, in the form of a StreamBase URI as described in sburi(5).
Reconnect Wait Interval The number of seconds to wait between attempts to connect to the server. One second is the default.
Enable Operator Info Disabled by default. Select to enable the Operator Info output port.
Enable Module Info Disabled by default. Select to enable the Module Info output port.
Enable Thread Info Disabled by default. Select to enable the Thread Info output port.
Enable Stream Info Disabled by default. Select to enable the Stream Info output port.
Enable System Info Disabled by default. Select to enable the System Info output port.

Cluster Aware Tab

Use the settings in this tab to allow this operator or adapter to start and stop based on conditions that occur at runtime in a cluster with more than one node. During initial development of the fragment that contains this operator or adapter, and for maximum compatibility with TIBCO Streaming releases before 10.5.0, leave the Cluster start policy control in its default setting, Start with module.

Cluster awareness is an advanced topic that requires an understanding of StreamBase Runtime architecture features, including clusters, quorums, availability zones, and partitions. See Cluster Awareness Tab Settings on the Using Cluster Awareness page for instructions on configuring this tab.

Concurrency Tab

Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.

Caution

Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.