fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Webhook for failing policies not sending data

Open pyxl-dev opened this issue 2 years ago • 5 comments

Fleet version: 4.53.1

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

pyxl-dev avatar Jul 15 '24 14:07 pyxl-dev

Timeboxing to 2 points

sharon-fdm avatar Jul 15 '24 18:07 sharon-fdm

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.

jacobshandling avatar Jul 18 '24 21:07 jacobshandling

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 ?

pyxl-dev avatar Jul 23 '24 09:07 pyxl-dev

@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!

jacobshandling avatar Jul 24 '24 16:07 jacobshandling

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

fleet-release avatar Jul 24 '24 16:07 fleet-release