API Stability Long-Term

The runningQueries() GraphQL query is used to get a list of running queries.

For more information on saved queries, see the User Functions (Saved Searches) reference page where saved queries are discussed. Also, look at the Searching Data documentation page as it relates to recent queries and saving queries.

Syntax

Below is the syntax for the runningQueries() query field:

graphql
runningQueries(
     searchTerm: string
     sortField: SortField
     sortOrder: SortOrder
   ): RunningQueries!

Below is an example of how this query field might be used:

Show:
graphql
query {
  runningQueries(searchTerm:"host", global: true, 
                 sortField: Status, sortOrder: Ascending)
   {totalNumberOfQueries, queries {
    id, initiatedBy, view} }
}
Example Responses
Show:
json
{
  "data": {
    "runningQueries": {
      "totalNumberOfQueries": 1,
      "queries": [
        {
          "id": "IQ-ZAVBkI4t4XtriaV1cHWmtBaD",
          "initiatedBy": "Bob Newhart (bob@company.com)",
          "view": "humio"
        }
      ]
    }
  }
}

Given Datatypes

For the given datatype, SortField, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: SortField

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 16, 2024
Ageboolean  Long-TermWhether to sort by age of events.
DeltaLiveCostboolean  Long-TermWhether to sort by change of live cost.
DeltaLiveCPUboolean  Long-TermWhether to sort by change of live CPU.
DeltaStaticCostboolean  Long-TermWhether to sort by change of static cost.
DeltaStaticCPUboolean  Long-TermWhether to sort by change of static CPU.
DeltaTotalCostboolean  Long-TermWhether to sort by change of total cost.
DeltaTotalMemoryAllocationboolean  Long-TermWhether to sort by change in total memory allocation.
InitiatedByboolean  Long-TermWhether to sort by which user or entity initiated.
LiveCostboolean  Long-TermWhether to sort by live cost.
StaticCostboolean  Long-TermWhether to sort by change of total cost.
Statusboolean  Long-TermWhether to sort by event status.
TotalCostboolean  Long-TermWhether to sort by total cost.
TotalLiveCPUboolean  Long-TermWhether to sort by total live CPU.
TotalMemoryAllocationboolean  Long-TermWhether to sort by total memory allocation.
TotalStaticCPUboolean  Long-TermWhether to sort by total static CPU.
Viewboolean  Long-TermWhether to sort by view.

The given datatype, SortOrder is also an enumerated list, but with only two choices: Ascending, or Descending.

Returned Datatypes

The returned datatype runningQueries() has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: RunningQueries

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Oct 3, 2024
queries[RunningQuery]yes Long-TermQueries being executed, at most 1000 queries are returned. See RunningQuery.
totalIncludedByteslongyes Long-TermTotal size of included bytes for all queries being executed.
totalNumberOfClientsintegeryes Long-TermTotal number of clients querying.
totalNumberOfLiveQueriesintegeryes Long-TermTotal number of live queries being executed.
totalNumberOfQueriesintegeryes Long-TermTotal number of queries being executed.
totalQueuedByteslongyes Long-TermTotal size of remaining bytes to be processed for all queries being executed.
totalSkippedByteslongyes Long-TermTotal size of skipped bytes for all queries being executed.
updateAvailableInlongyes Long-TermNumber of milliseconds until next update is available.