sonar-running-batch-rules
Retrieves the list and status of currently running batch detection scenarios.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | None |
| License usage | N/A |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
sonar-running-batch-rules
Output fields
| Field | Type | Description |
|---|---|---|
guid | string | Batch detection scenario GUID |
name | string | Batch detection scenario name |
submit_time | timestamp | Time the execution was requested |
start_time | timestamp | Time execution started |
query_id | integer | ID of the running query |
Error codes
Parse errors
N/A
Runtime errors
N/A
Description
The sonar-running-batch-rules command retrieves the list of batch detection scenarios currently running in Sonar. If no scenarios are running, no results are returned.
Examples
-
Retrieve the list of running batch detection scenarios
sonar-running-batch-rulesRetrieves the GUID, name, submission time, start time, and query ID of all currently running batch detection scenarios.
-
Filter long-running scenarios
sonar-running-batch-rules | eval elapsed = datediff(now(), submit_time, "m") | search elapsed > 60 | sort elapsed descRetrieves batch detection scenarios that have been running for more than 60 minutes since submission, sorted by elapsed time in descending order.