As a more advanced SQL user, you can use the open text SQL Builder to get more granular in running your queries. Also, you can run recommended queries directly or after modifying them according to your environment.
Prerequisites
Refer to these resources for writing a valid SQL query:
Procedure
- Navigate to the page and define a query under the SQL Query tab.
- Select a policy that contains endpoints or a specific endpoint for the query to run against it.
If you select a policy with no endpoints, a warning text displays.
- Enter a SQL string into the SQL configuration field.
You can copy the SQL from a Recommended Query, the Query Exchange or write it based on the Osquery schema.
- Execute your live query in either way.
- To start a one-time query, click Run.
- To schedule a query to run daily, weekly, or monthly, select Schedule query.