Detections
Detections currently are queries that execute on a schedule and their results of all queries that are run are saved to our underlying database. You can view the historic detection queries that have run on the RunReveal platform by searching several underlying tables.
scheduled_query_runs
- The results of all scheduled query runs, their execution times, the number of rows they returned, and parameter values that were passed to them.detections
- The rows that your detection queries return. These results contain the metadata of the associated detection, like risk score, mitre attacks, etc.
Utilizing scheduled_query_runs
If you are curious if a query of yours is executing, failing, erroring, or your parameters are being passed correctly, the scheduled_query_runs table is exceptionally helpful.
For example, here's a way to look for errors that have occurred while executing in a detection called 'ExampleQuery'.
select *
from scheduled_query_runs
where queryName='ExampleQuery' and error!='' and executionTime > now() - interval '1 day'
Utilizing detections
The detections table is further subdivided into two views (that you can interact) with like a tables.
signals
- Detection queries that ran with the purpose of collecting data and have no notification channel configured.alerts
- Detection queries that ran and alerted one of your notification channels.
The detections table contains a row for each individual row returned by your query. Fields returned by your query that match the column names of our defined schema are saved directly into those columns in the detection table.
There is a limit of 100 rows that acn be saved with the detection table. If you need to exceed this limit for whatever reason, please contact us.
Detection Data Model
The results of your detection queries are saved to the detections
table. The
detections table contains several fields, along with their types.
id
-String
- Unique identified of the runscheduledRunID
-String
- The unique identifier of the scheduled query runworkspaceID
-String
- Your workspace IDdetectionID
-String
- The identified of the detectiondetectionName
-String
- The name of the detectionrecordsReturned
-Int32
- The number of rows returned by the queryrunTime
-Int64
- The number of nanoseconds the query took to runquery
-String
- The actual query that was run for the scheduled queryparams
-Map(String, String)
- The supplied parameters to the scheduled querycolumnNames
-Array(String)
- An ordered array of column names returned by the querycolumnTypes
-Array(String)
- An ordered array of the column types returned by the queryresults
-String
- An array of the first 100 returned values from the queryseverity
-String
- A string representing the severity of the alertactor
-Map(String, String)
- Details about the user that ran the queryresources
-Array(String)
DEFAULT [] - Details about the resources returned from the querysrcIP
-String
- Details about the srcIP in the log entriesdstIP
-String
- Details about the dstIPs from the log entriesnotificationNames
-Array(String)
- The names of the notification channelscategories
-Array(String)
DEFAULT [] - The categories that the query belongs tomitreAttacks
-Array(LowCardinality(String))
DEFAULT [] - The MITRE ATT&CK technique categories that the query belongs to
These tables can be accessed like any other table in RunReveal
To query the detection table:
select * from detections
To query the signals view:
select * from signals
To query the alerts view:
select * from alerts