fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.92k stars 405 forks source link

Webhook for failing policies not sending data #20447

Closed YoanAncelly closed 1 month ago

YoanAncelly commented 1 month ago

Fleet version: 4.53.1<!-- Copy this from the "My account" page in the Fleet UI, or run fleetctl --version -->

Web browser and operating system: Chrome 126.0.6478.127 running on Windows


💥  Actual behavior

Failing policies webhook is not sending request to my webhook server even when all configured.

🧑‍💻  Steps to reproduce

  1. Enable webhook automation for failing policies by using my webhook url
  2. Disable crowdsec service
  3. Check policy status (expected to be "No")
  4. No response received

🕯️ More info (optional)

image

sharon-fdm commented 1 month ago

Timeboxing to 2 points

jacobshandling commented 1 month ago

Hi @YoanAncelly, by "No response received" you mean you didn't see a request come in at your webhook URL, right? Also, after waiting 24hrs, did you still not see a request? Fleet by default checks for hosts newly failing policies to send a webhook once per day

You can also try running fleetctl trigger --name cleanups_then_aggregation (collects summary of failing hosts/policies) followed by fleetctl trigger --name automations (should trigger your webhook) to expedite the process.

YoanAncelly commented 1 month ago

Hi @jacobshandling thanks for your reply

Finally I receive the requests to my webhook but only once a day at 2am. Is there a way to change this behaviour to something like testing at 8am ?

jacobshandling commented 1 month ago

@YoanAncelly try the steps I outlined above, that should reset your 24hrs to start whenever you run those triggers. I'm going to close this issue now as behavior is as expected, but feel free to follow up with us if that doesn't work and you'd like further help!

fleet-release commented 1 month ago

Webhooks silent, still, Policies fall, unseen. Fixed, clarity blooms.