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 field to specify or change the component's name, which must be unique in the application. 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: A field that shows the fully qualified class name that implements the functionality of this adapter. Use this class name when loading the adapter in StreamSQL programs with the APPLY JAVA statement. You can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.

Start with application: If this field is set to Yes or to a module parameter that evaluates to true, an instance of this adapter starts as part of the containing StreamBase Server. If this field is set to No or to a module parameter that evaluates to false, the adapter is loaded with the server, but does not start until you send an sbadmin resume command, or until you start the component with StreamBase Manager. With this option set to No or false, the adapter does not start even if the application as a whole is suspended and later resumed. The recommended setting is selected by default.

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 and Error Streams to learn about Error Ports.

Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow 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.
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.

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.