Skip to content

Commit c9ed002

Browse files
jacobshandlingJacob Shandlingrachaelshaw
authored
Refine query result webhook docs (#29884)
## Follow up for #29834 --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: Rachael Shaw <r@rachael.wtf>
1 parent 44e6f27 commit c9ed002

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

articles/automations.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@ destination. Data is sent according to a query's interval.
3131

3232
### Webhook
3333

34-
Each time a scheduled query runs, results are sent via webhook to your configured destination URL.
35-
To use Webhook logging for scheduled queries, run Fleet with these environment variables:
36-
37-
```
38-
FLEET_OSQUERY_RESULT_LOG_PLUGIN="webhook"
39-
FLEET_WEBHOOK_STATUS_URL="<target_status_url>"
40-
FLEET_WEBHOOK_RESULT_URL="<target_result_url>"
41-
```
34+
Results from scheduled queries can be written to an arbitrary external webhook of your choosing.
35+
First, follow the [configuration docs](https://fleetdm.com/docs/deploying/configuration#webhook).
36+
Then in the UI:
37+
38+
1. Navigate to the **Queries** page, select the relevant team, and click **Manage automations**
39+
2. In the modal that opens, confirm that you see "Log destination: Webhook", and when you hover over
40+
"Webhook", you see "Each time a query runs, the data is sent via webhook to:
41+
<target_result_url>"
42+
3. Select the queries that you want to send data to this webhook
43+
4. Click **Save**
44+
45+
Results from the selected scheduled queries will be sent to the configured results URL. *Not configurable per-query.*
4246

4347
### Amazon Kinesis Data Firehose
4448

articles/log-destinations.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,7 @@ Note that Firehose logging has limits [discussed in the documentation](https://d
4444

4545
## Webhook
4646

47-
Results from scheduled queries are written to an arbitrary external webhook of your choosing. To use, run Fleet with the
48-
following environment variables set:
49-
50-
```
51-
FLEET_OSQUERY_RESULT_LOG_PLUGIN="webhook"
52-
FLEET_WEBHOOK_STATUS_URL="<target_status_url>"
53-
FLEET_WEBHOOK_RESULT_URL="<target_result_url>"
54-
```
55-
47+
See [webhook configuration docs](https://fleetdm.com/docs/deploying/configuration#webhook)
5648

5749
## Snowflake
5850

docs/Configuration/fleet-server-configuration.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,30 @@ to zero will retain all logs. _Note_ max_age may still cause them to be deleted.
12511251
max_backups: 0
12521252
```
12531253

1254+
## Webhook
1255+
1256+
To use webhook logging for query results, the following two Fleet config values must *both* be set:
1257+
1258+
### Set log method to 'webhook' by
1259+
- Command line flag: `--osquery_result_log_plugin="webhook"`,
1260+
- Environment variable: `FLEET_OSQUERY_RESULT_LOG_PLUGIN="webhook"`, or
1261+
- Config file:
1262+
```yaml
1263+
osquery:
1264+
result_log_plugin: "webhook"
1265+
```
1266+
1267+
and
1268+
1269+
### Set the desired result URL by
1270+
- Command line flag: `--webhook_result_url="<target_result_url>"`,
1271+
- Environment variable: `FLEET_WEBHOOK_RESULT_URL="<target_result_url>"`, or
1272+
- Config file:
1273+
```yaml
1274+
webhook:
1275+
result_url: "<target_result_url>"
1276+
```
1277+
12541278
## Firehose
12551279

12561280
### firehose_region

0 commit comments

Comments
 (0)