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:
runningQueries(
searchTerm: string
sortField: SortField
sortOrder: SortOrder
): RunningQueries!
Below is an example of how this query field might be used:
query {
runningQueries(searchTerm:"host", global: true,
sortField: Status, sortOrder: Ascending)
{totalNumberOfQueries, queries {
id, initiatedBy, view} }
}
{
"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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
Age | boolean | Long-Term | Whether to sort by age of events. | ||
DeltaLiveCost | boolean | Long-Term | Whether to sort by change of live cost. | ||
DeltaLiveCPU | boolean | Long-Term | Whether to sort by change of live CPU. | ||
DeltaStaticCost | boolean | Long-Term | Whether to sort by change of static cost. | ||
DeltaStaticCPU | boolean | Long-Term | Whether to sort by change of static CPU. | ||
DeltaTotalCost | boolean | Long-Term | Whether to sort by change of total cost. | ||
DeltaTotalMemoryAllocation | boolean | Long-Term | Whether to sort by change in total memory allocation. | ||
InitiatedBy | boolean | Long-Term | Whether to sort by which user or entity initiated. | ||
LiveCost | boolean | Long-Term | Whether to sort by live cost. | ||
StaticCost | boolean | Long-Term | Whether to sort by change of total cost. | ||
Status | boolean | Long-Term | Whether to sort by event status. | ||
TotalCost | boolean | Long-Term | Whether to sort by total cost. | ||
TotalLiveCPU | boolean | Long-Term | Whether to sort by total live CPU. | ||
TotalMemoryAllocation | boolean | Long-Term | Whether to sort by total memory allocation. | ||
TotalStaticCPU | boolean | Long-Term | Whether to sort by total static CPU. | ||
View | boolean | Long-Term | Whether 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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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-Term | Queries being executed, at most 1000 queries are returned. See RunningQuery . | |
totalIncludedBytes | long | yes | Long-Term | Total size of included bytes for all queries being executed. | |
totalNumberOfClients | integer | yes | Long-Term | Total number of clients querying. | |
totalNumberOfLiveQueries | integer | yes | Long-Term | Total number of live queries being executed. | |
totalNumberOfQueries | integer | yes | Long-Term | Total number of queries being executed. | |
totalQueuedBytes | long | yes | Long-Term | Total size of remaining bytes to be processed for all queries being executed. | |
totalSkippedBytes | long | yes | Long-Term | Total size of skipped bytes for all queries being executed. | |
updateAvailableIn | long | yes | Long-Term | Number of milliseconds until next update is available. |