botkube
botkube copied to clipboard
[BUG] Botkube failed to send webhook with error code of 400
Describe the bug I install bot kube with helm and take this error on pod logs "Error Posting Webhook: 400". I tried on other pods at the same cluster webhook is working.
To Reproduce
- Install botkube with helm like this command:
helm install botkube --namespace botkube
--set communications.webhook.enabled=true
--set communications.webhook.url='xxxxxxxx'
--set config.settings.clustername=xxxxxxxx
infracloudio/botkube - Check logs with kubectl command.
Expected behavior Send alert to my slack channel via webhook.
@canberkkoc could you please let me know which platform you are using? Is it Slack/Teams webhook or some other platform.
Hello @PrasadG193 I use webhook for slack.
@PrasadG193 : I too face the same issue. I am on EKS 1.21 - Slack Integration using Webhook. With debug enabled, I got the below error.:
ERRO[2021-08-30T20:15:23Z] Error Posting Webhook: 400
DEBU[2021-08-30T20:15:23Z] Event Not Sent to Webhook { v1/pods error Pod adapter-5dd48bf55d-82cqg sbx [Error: failed to start container "adapter": Error response from daemon: OCI runtime create failed: container_linux.go:364: creating new parent process caused: container_linux.go:2005: running lstat on namespace path "/proc/32621/ns/ipc" caused: lstat /proc/32621/ns/ipc: no such file or directory: unknown] error Failed error v21-cluster 2021-08-30 20:15:23 +0000 UTC 1 false v1/pods [] []}
Hi, I am using webhook for Webex Teams and I too see the same error ( I am running Kops v1.18 and botkube-v0.12.2)
ERRO[2021-09-01T22:09:57Z] Error Posting Webhook: 400
DEBU[2021-09-01T22:09:57Z] Event Not Sent to Webhook { v1/pods error Pod test-nginx spice-stage [Error: ImagePullBackOff] error Failed error ipvkb-stva 2021-09-01 22:09:54 +0000 UTC 1 false v1/pods [] []}
DEBU[2021-09-01T22:09:57Z] Event successfully sent to Webhook { v1/pods error Pod test-nginx spice-stage [Error: ImagePullBackOff] error Failed error ipvkb-stva 2021-09-01 22:09:54 +0000 UTC 1 false v1/pods [] []}
Hi I got the same 400 error when using google chat web hook. I have used the following installation command
helm install --version v0.12.3 botkube --namespace botkube \ --set communications.webhook.enabled=true \ --set communications.webhook.url="https://chat.googleapis.com/v1/spaces/********" \ --set config.settings.clustername=docker-desktop-test\ --set image.repository=infracloudio/botkube \ --set image.tag=v0.12.3 \ infracloudio/botkube
Hi, is there any fix?
Hello everyone, This is not really an error for the webhook integration. Status code were returned directly from the target system, so in this case (status code 400 - "Bad request") the target system (Google Chat, Webex) indicated it couldn't handle the request. That means, you would need an adapter which converts the Botkube outgoing webhook payload to the one you want to integrate with.
This is how the payload is defined on Botkube side: https://github.com/kubeshop/botkube/blob/main/pkg/sink/webhook.go#L33
Hope that helps. Cheers!