Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Osquery features in 8.5 #2561

Merged
merged 61 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
171adfc
First draft
nastasha-solomon Oct 11, 2022
2bd1c96
Added parts of 2512
nastasha-solomon Oct 11, 2022
c13d486
Added missing syntax
nastasha-solomon Oct 11, 2022
e278c0f
More content
nastasha-solomon Oct 11, 2022
0c50fe4
Adding license reqs
nastasha-solomon Oct 11, 2022
ada8a79
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 11, 2022
0374511
More restruc and content
nastasha-solomon Oct 11, 2022
dadcbdd
Heading changes
nastasha-solomon Oct 11, 2022
d015693
Moar steps
nastasha-solomon Oct 11, 2022
88b626d
Adjusted intro
nastasha-solomon Oct 11, 2022
74c1c58
Fixed anchor
nastasha-solomon Oct 12, 2022
d7f269a
New topic
nastasha-solomon Oct 12, 2022
4b1c535
New section
nastasha-solomon Oct 12, 2022
a422e19
Title change
nastasha-solomon Oct 12, 2022
7148518
Update docs/detections/view-osquery-results.asciidoc
nastasha-solomon Oct 12, 2022
eeebf5b
Update docs/detections/view-osquery-results.asciidoc
nastasha-solomon Oct 12, 2022
a8c904e
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 12, 2022
bdd31cb
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 12, 2022
f9aaec5
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon Oct 12, 2022
1d5f5d5
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 12, 2022
9e21cef
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 12, 2022
ce81877
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 12, 2022
c40f5f4
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 12, 2022
af1d574
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 12, 2022
edd27aa
Update docs/detections/view-osquery-results.asciidoc
nastasha-solomon Oct 12, 2022
d0207be
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 13, 2022
1795ad3
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon Oct 13, 2022
03ed9c7
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 13, 2022
746f90b
Update docs/detections/use-osquery.asciidoc
nastasha-solomon Oct 13, 2022
15f68f1
Moved req block
nastasha-solomon Oct 13, 2022
7b21d0f
Update docs/detections/alerts-run-osquery.asciidoc
nastasha-solomon Oct 13, 2022
4b0d0a1
Update docs/detections/alerts-view-details.asciidoc
nastasha-solomon Oct 13, 2022
45fbc88
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 13, 2022
5d8c9fc
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 13, 2022
e7d0ae1
Update docs/detections/invest-guide-run-osquery.asciidoc
nastasha-solomon Oct 13, 2022
a102c7a
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 13, 2022
c31ce5a
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 13, 2022
9fd6295
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 13, 2022
f4aee22
Update docs/detections/use-osquery.asciidoc
nastasha-solomon Oct 13, 2022
2bd1be7
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 13, 2022
c98037a
Update docs/detections/alerts-run-osquery.asciidoc
nastasha-solomon Oct 13, 2022
308c269
Update docs/detections/view-osquery-results.asciidoc
nastasha-solomon Oct 13, 2022
dd3f648
Joe's review suggestions
nastasha-solomon Oct 13, 2022
a25ebf9
Tomasz's input
nastasha-solomon Oct 13, 2022
eff5b24
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 18, 2022
e0194a4
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 18, 2022
15eca97
Update docs/detections/view-osquery-results.asciidoc
nastasha-solomon Oct 18, 2022
125692e
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 18, 2022
945e37f
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 18, 2022
aa40f7e
Updated TOC
nastasha-solomon Oct 18, 2022
f71d55b
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 18, 2022
0129f7d
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 19, 2022
937bbb9
Update docs/detections/osquery-response-action.asciidoc
nastasha-solomon Oct 19, 2022
ab6cc2d
Update docs/detections/use-osquery.asciidoc
nastasha-solomon Oct 19, 2022
a0caedf
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 19, 2022
8371920
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 24, 2022
65135d3
Fixes for 2612
nastasha-solomon Oct 24, 2022
298cf4f
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 25, 2022
43b549f
Merge branch 'main' into osquery-8.5-features
nastasha-solomon Oct 26, 2022
b27a731
Addressed 2611.
nastasha-solomon Oct 26, 2022
46727da
Word change
nastasha-solomon Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 13 additions & 51 deletions docs/detections/alerts-run-osquery.asciidoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
[[alerts-run-osquery]]
== Run Osquery from a detection alert
{kibana-ref}/osquery.html[Osquery] allows you to run live queries against an alert's host to learn more about your infrastructure and operating systems. For example, with Osquery, you can search your system for indicators of compromise that might have contributed to the alert. You can then use this data to form your investigation and alert triage efforts.
=== Run Osquery from alerts
Run live queries against an alert's host to learn more about your infrastructure and operating systems. For example, with Osquery, you can search your system for indicators of compromise that might have contributed to the alert. You can then use this data to form your investigation and alert triage efforts.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[IMPORTANT]
============
.Requirements
[sidebar]
--
* The {kibana-ref}/manage-osquery-integration.html[Osquery manager integration] must be installed.
* {agent}'s {fleet-guide}/view-elastic-agent-status.html[status] must be `Healthy`. Refer to {fleet-guide}/fleet-troubleshooting.html[{fleet} Troubleshooting] if it isn't.
* Your role must have {kibana-ref}/osquery.html[Osquery feature privileges].
--

You must complete the following to access Osquery and run searches against your hosts:

* Enable the {kibana-ref}/manage-osquery-integration.html[Osquery manager integration] on the host associated with the alert.
* Update your {kibana-ref}/osquery.html[role's privileges] to allow access to Osquery.
* Verify that {fleet-guide}/view-elastic-agent-status.html[{agent}'s status] is *Healthy*. Refer to {fleet-guide}/fleet-troubleshooting.html[{fleet} Troubleshooting] if it is not.
============

[float]
[[osquery-alert-action]]
=== Run live queries
To run Osquery from an alert:

. Do one of the following from the Alerts table:
** Click the *View details* button to open the Alert details flyout, then click *Take action -> Run Osquery*.
Expand All @@ -34,41 +30,7 @@ TIP: Refer to {kibana-ref}/osquery.html#osquery-prebuilt-packs-queries[prebuilt
[role="screenshot"]
image::images/setup-query.png[width=80%][height=80%][Shows how to set up a single query]

. Click **Submit**. Queries will timeout after 5 minutes if there are no responses.
. Click *Save for later* to save the query for future use (optional).
. Click **Submit**. Queries will timeout after 5 minutes if there are no responses. Otherwise, query results display within the flyout.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
+
TIP: To save the query for future use, click *Save for later* and define the ID,
description, and other {kibana-ref}/osquery.html#osquery-manage-query[details].

[float]
[[osquery-results-single]]
=== Review single query results

Results for single queries appear in the *Results* tab. When you run a query, the number of agents queried and query status temporarily display in a status bar above the results table. Agent responses can be `Sucessful`, `Not yet responded` (pending), and `Failed`.

[role="screenshot"]
image::images/single-query-results.png[width=80%][height=80%][Shows query results]

[float]
[[osquery-results-pack]]
=== Review query pack results

Results for each query in the pack appear in the *Results* tab. Click the expand button (image:images/pack-expand-button-osquery.png[Click markdown icon,20,20]) at the far right of each query row to display query results. The number of agents that were queried and their responses are shown for each query. Agent responses are color-coded. Green is `Sucessful`, `Not yet responded` (pending) is gray, and `Failed` is red.

[role="screenshot"]
image::images/pack-query-results.png[width=80%][height=80%][Shows query results]

[float]
[[osquery-investigate]]
=== Investigate query results

From the results table, you can:

* Click the *View in Discover* button (image:images/discover-button-osquery.png[Click markdown icon,20,20]) to explore the results in Discover.
* Click the *View in Lens* button (image:images/lens-button-osquery.png[Click markdown icon,20,20]) to navigate to Lens, where you can use the drag-and-drop *Lens* editor to create visualizations.
* Click the *Timeline* button (image:images/timeline-button-osquery.png[Click markdown icon,20,20]) to investigate a single query result in Timeline or *Add to timeline investigation* to investigate all results. This option is only available for single query results.

+
When you open all results in Timeline, the events in Timeline are filtered based on the `action_ID` generated by the Osquery query.
+

* View more information about the request, such as failures, by opening the *Status* tab.
NOTE: Refer to <<view-osquery-results>> for more information about query results.
1 change: 1 addition & 0 deletions docs/detections/alerts-view-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The alert details flyout contains these informational tabs:
* *Threat Intel*: A list of individual threats matching the alert. <<alert-details-threat-intel, Learn more.>>
* *Table*: The alert data in table format. Data is organized into field-value pairs.
* *JSON*: The alert data in JSON format.
* *Osquery Results*: Results from queries attached rules display on the *Osquery Results* tab. <<add-osquery-response-action,Learn more.>>
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[role="screenshot"]
image::images/alert-details-flyout.png[Alert details flyout]
Expand Down
10 changes: 9 additions & 1 deletion docs/detections/detections-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ include::alerts-view-details.asciidoc[leveloffset=+1]

include::alerts-add-to-cases.asciidoc[leveloffset=+1]

include::alerts-run-osquery.asciidoc[]
include::use-osquery.asciidoc[]

include::osquery-response-action.asciidoc[][leveloffset=+1]

include::invest-guide-run-osquery.asciidoc[][leveloffset=+1]

include::alerts-run-osquery.asciidoc[][leveloffset=+1]

include::view-osquery-results.asciidoc[][leveloffset=+1]

include::visual-event-analyzer.asciidoc[]

Expand Down
Binary file modified docs/detections/images/alert-details-flyout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/detections/images/available-action-types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/detections/images/case-button-osquery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/detections/images/osquery-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/detections/images/pack-query-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/detections/images/rule-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/detections/images/setup-single-query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/detections/images/single-query-results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/detections/invest-guide-run-osquery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[[invest-guide-run-osquery]]
=== Run Osquery from investigation guides
Investigation guides on detection rules provide guidance for triaging, analyzing, and responding to potential security issues. When you build a custom rule, you can also set up an investigation guide that incorporates Osquery. This allows you to run live queries from a rule's investigation guide as you analyze alerts produced by the rule.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

.Requirements
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
[sidebar]
--
* The {kibana-ref}/manage-osquery-integration.html[Osquery manager integration] must be installed.
* {agent}'s {fleet-guide}/view-elastic-agent-status.html[status] must be `Healthy`. Refer to {fleet-guide}/fleet-troubleshooting.html[{fleet} Troubleshooting] if it isn't.
* Your role must have {kibana-ref}/osquery.html[Osquery feature privileges].
--

[role="screenshot"]
image::images/osquery-investigation-guide.png[Shows a live query in an investigation guide]

[float]
[[add-live-queries-ig]]
=== Add live queries to an investigation guide

NOTE: You can only add Osquery to investigation guides for custom rules because prebuilt rules cannot be edited.

. Go to *Manage* -> *Rules*, select a rule, then click *Edit rule settings* on the rule details page.
. Select the *About* tab, then expand the rule's advanced settings.
. Scroll down to the Investigation guide section. In the toolbar, click the *Osquery* button (image:images/osquery-button.png[Click the Osquery button,20,20]).
.. Add a descriptive label for the query; for example, `Search for executables`.
.. Select a saved query or enter a new one.
.. Expand the **Advanced** section to view or set {kibana-ref}/osquery.html#osquery-map-fields[mapped ECS fields] included in the results from the live query (optional).
+
[role="screenshot"]
image::images/setup-osquery-investigation-guide.png[width=70%][height=70%][Shows results from running a query from an investigation guide]
. Click *Save changes* to add the query to the rule's investigation guide.

[float]
[[run-live-queries-ig]]
=== Run live queries from an investigation guide
Open a rule to view its details, then do the following:

. Go the About section of the rule details page and click *Investigation guide*.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
. Click the query. The Run Osquery pane displays with the *Query* field autofilled. Do the following:
.. Select one or more {agent}s or groups to query. Start typing in the search field to get suggestions for {agent}s by name, ID, platform, and policy.
.. Expand the **Advanced** section to view or set {kibana-ref}/osquery.html#osquery-map-fields[mapped ECS fields] included in the results from the live query (optional).
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
. Click *Save for later* to save the query for future use (optional).
. Click *Submit* to run the query. Query results display in the flyout.
+
NOTE: Refer to <<view-osquery-results>> for more information about query results.
+
[role="screenshot"]
image::images/run-query-investigation-guide.png[width=80%][height=80%][Shows results from running a query from an investigation guide]
62 changes: 62 additions & 0 deletions docs/detections/osquery-response-action.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[[osquery-response-action]]
=== Add Osquery Response Actions
preview::[]

Osquery Response Actions allow you to add live queries to custom query rules so you can automatically collect data on systems the rule is monitoring. Use this data to support your alert triage and investigation efforts.

.Requirements
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
[sidebar]
--
* Osquery Response Actions are available with a https://www.elastic.co/pricing[Platinum or Enterprise subscription].
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
* The {kibana-ref}/manage-osquery-integration.html[Osquery manager integration] must be installed.
* {agent}'s {fleet-guide}/view-elastic-agent-status.html[status] must be `Healthy`. Refer to {fleet-guide}/fleet-troubleshooting.html[{fleet} Troubleshooting] if it isn't.
* Your role must have {kibana-ref}/osquery.html[Osquery feature privileges].
--

[role="screenshot"]
image::images/available-response-actions.png[Available response actions]

[float]
[[add-osquery-response-action]]
=== Add Osquery Response Actions to rules

You can add Osquery Response Actions to new or existing custom query rules. Queries are run every time the rule executes.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

. Choose one of the following:
** *New rule*: When you are on the last step of <<create-custom-rule,custom query rule>>, go to the Response Actions section and click the *osquery* icon.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
** *Existing rule*: Edit the rule's settings, then go to the *Actions* tab. In the tab, click the *osquery* icon under the Response Actions section.
. Specify whether you want to set up a single live query or a pack:
** *Query*: Select a saved query or enter a new one. After you enter the query, you can expand the **Advanced** section to view or set {kibana-ref}/osquery.html#osquery-map-fields[mapped ECS fields] included in the results from the live query. Mapping ECS fields is optional.
** *Pack*: Select from query packs that have been loaded and activated. After you select a pack, all of the queries in the pack are displayed.
+
TIP: Refer to {kibana-ref}/osquery.html#osquery-prebuilt-packs-queries[prebuilt packs] to learn about using and managing Elastic prebuilt packs.
+
[role="screenshot"]
image::images/setup-single-query.png[Shows how to set up a single query]
+

. Click the *osquery* icon to add more live queries (optional).
. Create the rule or save your changes to finish adding the queries.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[float]
[[edit-osquery-response-action]]
=== Edit Osquery Response Actions

If you want to choose a different query or query pack for the Osquery Response Action to use, edit the rule to update the Response Action.

IMPORTANT: If you edited a saved query or query pack that an Osquery Response Action is using, you must reselect the saved query or query pack on the related Osquery Response Action. Query changes are not automatically applied to Osquery Response Actions.

. Edit the rule's settings, then go to the *Actions* tab.
. Modify the settings for Osquery Response Actions you've added.
. Click *Save changes*.

[float]
[[find-osquery-response-action-results]]
=== Find query results

When an alert is generated, Osquery automatically collects data on the system related to the alert. Query results are displayed within the *Osquery Results* tab in the Alert details flyout. The number next to the *Osquery Results* tab represents the number of queries attached to the rule.

NOTE: Refer to <<view-osquery-results>> for more information about query results.

[role="screenshot"]
image::images/osquery-results-tab.png[width=80%][height=80%][Shows how to set up a single query]
16 changes: 15 additions & 1 deletion docs/detections/rules-ui-create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Creating a new rule requires the following steps:
. <<rule-ui-advanced-params>>
. <<rule-schedule>>
. <<rule-notifications>>
. <<rule-response-action>>

[IMPORTANT]
==============
Expand Down Expand Up @@ -435,6 +436,7 @@ image::images/rule-actions.png[]
. Do *one* of the following:

* Continue with <<rule-notifications, setting up alert notifications>> (optional).
* Continue with <<rule-response-action, setting up Response Actions>> (optional).
* Create the rule (with or without activation).
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[float]
Expand Down Expand Up @@ -567,9 +569,21 @@ Example using the mustache "current element" notation `{{.}}` to output all the
{{#signal.rule.references}} {{.}} {{/signal.rule.references}}
--------------------------------------------------

[float]
[[rule-response-action]]
=== Set up response actions (optional)
Use Response Actions to set up additional functionality that will run whenever a rule executes.

preview::[]

The Osquery Response Action allows you to include live Osquery queries with a custom query rule. When an alert is generated, Osquery automatically collects data on the system related to the alert. Refer to <<osquery-response-action>> to learn more.

[role="screenshot"]
image::images/available-response-actions.png[Shows available response actions]

[float]
[[indicator-value-lists]]
==== Use value lists with indicator match rules
=== Use value lists with indicator match rules

While there are numerous ways you can add data into indicator indices, you can use value lists as the indicator match index in an indicator match rule. Take the following scenario, for example:

Expand Down
10 changes: 10 additions & 0 deletions docs/detections/use-osquery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[use-osquery]]
== Use Osquery

Osquery is an open source tool that lets you use SQL to query operating systems like a database. When you add the {kibana-ref}/manage-osquery-integration.html[Osquery manager integration] to an {agent} policy, Osquery is deployed to all agents assigned to that policy. After completing this setup, you can {kibana-ref}/osquery.html[run live queries and schedule recurring queries] for agents and begin gathering data from your entire environment.

Osquery is supported across all systems (Linux, macOS, and Windows). You can use it with {elastic-sec} to perform real-time incident response, threat hunting, and regular monitoring to detect vulnerability or compliance issues. The following Osquery features are available from {elastic-sec}:
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

* *<<osquery-response-action,Osquery Response Actions>>* - Use Osquery Response Actions to add live queries to custom query rules.
* *<<invest-guide-run-osquery,Live queries from investigation guides>>* - Incorporate live queries into investigation guides to enhance your research capabilities while investigating possible security issues.
* *<<alerts-run-osquery,Live queries from alerts>>* - Run live queries against an alert's host to learn more about your infrastructure and operating systems.
46 changes: 46 additions & 0 deletions docs/detections/view-osquery-results.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[[view-osquery-results]]
=== Examine Osquery results
Osquery provides you with relevant, timely data that you can use to better understand and monitor your environment. When you run queries, results are indexed and then displayed the Results table, which you can filter, sort, and interact with.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[float]
[[osquery-result-types]]
=== Results table
The Results table displays results from single queries and query packs.

[float]
[[review-single-osquery-results]]
==== Single query results

Results for single queries appear on the *Results* tab. When you run a query, the number of agents queried and query status temporarily display in a status bar above the results table. Agent responses can be `Sucessful`, `Not yet responded` (pending), and `Failed`.

[role="screenshot"]
image::images/single-query-results.png[width=80%][height=80%][Shows query results]

[float]
[[review-pack-osquery-results]]
==== Query pack results

Results for each query in the pack appear in the *Results* tab. Click the expand icon (image:images/pack-expand-button-osquery.png[Click markdown icon,20,20]) at the far right of each query row to display query results. The number of agents that were queried and their responses are shown for each query. Agent responses are color-coded. Green is `Sucessful`, `Not yet responded` (pending) is gray, and `Failed` is red.

[role="screenshot"]
image::images/pack-query-results.png[width=80%][height=80%][Shows query results]

[float]
[[investigate-osquery-results]]
=== Investigate query results

From the results table, you can:

* Click *View in Discover* (image:images/discover-button-osquery.png[Click the View in Discover button,20,20]) to explore the results in Discover.
* Click *View in Lens* (image:images/lens-button-osquery.png[Click the View in Lens button,20,20]) to navigate to Lens, where you can use the drag-and-drop *Lens* editor to create visualizations.
* Click *Timeline* (image:images/timeline-button-osquery.png[Click Timeline button,20,20]) to investigate a single query result in Timeline or *Add to timeline investigation* to investigate all results. This option is only available for single query results.

+
When you open all results in Timeline, the events in Timeline are filtered based on the `action_ID` generated by the Osquery query.
+

* Click *Add to Case* (image:images/case-button-osquery.png[Click Add to Case button,20,20]) to add the query results to a new or existing case.
+
NOTE: If you add the results to a new case, you are prompted to specify the solution that you want the create the case within. Ensure you select the correct solution. From {elastic-sec}, you cannot access cases created in {observability} or Stack Management.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

* View more information about the request, such as failures, by opening the *Status* tab.