From 57a28ed18df1be21aabdf82a9e52daef60f9b4d8 Mon Sep 17 00:00:00 2001 From: Rachael Shaw Date: Wed, 10 Apr 2024 15:28:17 -0500 Subject: [PATCH] #14916 Configuration change: Host status webhook per-team (#15612) Adds `webhook_settings.host_status_webhook` options to team config for #14916. Also updated conceptual docs that reference this config (and cut down some content to make room). --- docs/Configuration/configuration-files/README.md | 6 ++++++ docs/REST API/rest-api.md | 5 +++++ docs/Using Fleet/Automations.md | 10 ++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/Configuration/configuration-files/README.md b/docs/Configuration/configuration-files/README.md index a5f8ced68a..fa02bcb76c 100644 --- a/docs/Configuration/configuration-files/README.md +++ b/docs/Configuration/configuration-files/README.md @@ -234,6 +234,12 @@ spec: secrets: - secret: RzTlxPvugG4o4O5IKS/HqEDJUmI1hwBoffff - secret: JZ/C/Z7ucq22dt/zjx2kEuDBN0iLjqfz + webhook_settings: + host_status_webhook: + days_count: 0 + destination_url: "" + enable_host_status_webhook: false + host_percentage: 0 host_expiry_settings: host_expiry_enabled: true host_expiry_window: 14 diff --git a/docs/REST API/rest-api.md b/docs/REST API/rest-api.md index 4d7de79712..4e1f057990 100644 --- a/docs/REST API/rest-api.md +++ b/docs/REST API/rest-api.md @@ -8578,6 +8578,11 @@ _Available in Fleet Premium_ |     enable_failing_policies_webhook | boolean | body | Whether or not the failing policies webhook is enabled. | |     destination_url | string | body | The URL to deliver the webhook requests to. | |     policy_ids | array | body | List of policy IDs to enable failing policies webhook. | +|   host_status_webhook | object | body | Host status webhook settings. | +|     enable_host_status_webhook | boolean | body | Whether or not the host status webhook is enabled. | +|     destination_url | string | body | The URL to deliver the webhook request to. | +|     host_percentage | integer | body | The minimum percentage of hosts that must fail to check in to Fleet in order to trigger the webhook request. | +|     days_count | integer | body | The minimum number of days that the configured `host_percentage` must fail to check in to Fleet in order to trigger the webhook request. | |     host_batch_size | integer | body | Maximum number of hosts to batch on failing policy webhook requests. The default, 0, means no batching (all hosts failing a policy are sent on one request). | | integrations | object | body | Integrations settings for the team. Note that integrations referenced here must already exist globally, created by a call to [Modify configuration](#modify-configuration). | |   jira | array | body | Jira integrations configuration. | diff --git a/docs/Using Fleet/Automations.md b/docs/Using Fleet/Automations.md index 2a3808b678..c34d884d14 100644 --- a/docs/Using Fleet/Automations.md +++ b/docs/Using Fleet/Automations.md @@ -130,9 +130,9 @@ Follow the steps below to configure Jira or Zendesk as a ticket destination: ## Host status automations -Host status automations send a webhook request if a configured percentage of hosts have not checked in to Fleet for a configured number of days. +Host status automations send a webhook request if a configured percentage of hosts have not checked in to Fleet for a configured number of days. This can be customized [globally](https://fleetdm.com/docs/configuration/configuration-files#organization-settingss) or [per-team](https://fleetdm.com/docs/configuration/configuration-files#teams). -Fleet sends these webhook requests once per day by default. This interval can be updated with the `webhook_settings.interval` configuration option using the [`config` YAML document](https://fleetdm.com/docs/using-fleet/configuration-files#organization-settings) and the `fleetctl apply` command. Note that this interval currently configures both host status and failing policy automations. +Fleet sends these webhook requests once per day by default. This interval can be updated with the `webhook_settings.interval` [configuration option](https://fleetdm.com/docs/configuration/configuration-files#organization-settings). Note that this interval currently configures both host status and failing policy automations. Example webhook payload: @@ -147,9 +147,11 @@ POST https://server.com/example because the Host status webhook is enabeld in your Fleet instance.", "data": { - "unseen_hosts": 1, - "total_hosts": 2, + "unseen_hosts": 3, + "total_hosts": 12, "days_unseen": 3, + "team_id": 123, + "host_ids": [1, 2, 3] } } ```