system-streams

Retrieves the list and status of stream queries registered in the system.

Command properties

PropertyDescription
Command typeDriver query
Required permissionCluster administrator
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

system-streams

Output fields

FieldTypeDescription
source_typestringData source type. One of logger, table, or stream
namestringStream query name
runningbooleanWhether running (true: running, false: stopped)
enabledbooleanWhether enabled (true: enabled, false: disabled)
asyncbooleanWhether in asynchronous mode (true: async, false: sync)
error_codestringLast error code. Returns null if there is no error.
error_msgstringLast error message. Returns null if there is no error.
descriptionstringDescription of the stream query
intervalintegerRefresh interval (unit: seconds). 0 means unlimited; only streamable commands can be used.
query_stringstringQuery string
input_countlongNumber of input records
output_countlongNumber of output records
last_input_attimestampMost recent input time. Returns null if there has been no input.
last_output_attimestampMost recent output time. Returns null if there has been no output.
ownerstringName of the account that created the stream query
created_attimestampCreation timestamp
modified_attimestampLast modification timestamp
last_refresh_attimestampMost recent refresh time
last_countlongNumber of records processed during the last execution
last_timelongElapsed time of the last execution (unit: nanoseconds)
total_countlongCumulative number of records processed
total_timelongCumulative elapsed time (unit: nanoseconds)
max_countlongMaximum number of records processed in a single execution
max_timelongMaximum elapsed time in a single execution (unit: nanoseconds)
input_tablesarrayList of input table names
input_loggersarrayList of input collector names
input_streamsarrayList of input stream query names

Error codes

Parsing errors
Error codeMessageDescription
95020no-read-permissionThe command was run by an account without cluster administrator permission
Runtime errors

N/A

Description

The system-streams command retrieves the list and status of stream queries registered in the system. You can check the name, running status, input/output record counts, and performance counters for each stream query.

Cluster administrator permission is required to run this command. Running it without administrator permission causes error code 95020.

The source_type field indicates the data source type of the stream query. logger means a collector, table means a table, and stream means another stream query is used as the data source.

Performance counter fields (last_count, last_time, total_count, total_time, max_count, max_time) only return values when performance statistics have been collected for the stream query.

Examples

  1. Retrieve all stream queries

    system-streams
    

    Retrieves the status and configuration of all stream queries registered in the system.

  2. Retrieve only running stream queries

    system-streams | search running == true
    

    Filters and retrieves only stream queries that are currently running.

  3. Count stream queries by data source type

    system-streams | stats count by source_type
    

    Counts the number of stream queries by data source type.

  4. Retrieve stream queries with errors

    system-streams | search isnotnull(error_code)
    

    Filters and retrieves only stream queries that have errors, to check error codes and messages.