I am getting a 401 unauthorized when trying to send a test alert to a Webhock contact point.
It seems that the request is somehow malformed. I tried it with different configurations. One config:
Corresponding debug logs:
logger=user.service t=2023-01-25T15:24:26.405786976+01:00 level=debug msg="got user from local cache" cachekey=signed-in-user-1-1
logger=accesscontrol.service t=2023-01-25T15:24:26.405888477+01:00 level=debug msg="using cached permissions" key=rbac-permissions-1-user-1
logger=alerting.notifier.webhook t=2023-01-25T15:24:26.433293772+01:00 level=error msg="Missing receiver"
logger=alerting.notifier.webhook t=2023-01-25T15:24:26.433374173+01:00 level=error msg="Missing group labels"
logger=notifications t=2023-01-25T15:24:26.433552875+01:00 level=debug msg="Sending webhook" url=https://XXXX.xx/dest/445b382099246447.json httpmethod=POST
logger=notifications t=2023-01-25T15:24:26.490847493+01:00 level=debug msg="Webhook failed" url=https://XXXX.xx/dest/445b382099246447.json statuscode="401 Unauthorized" body=
logger=context userId=1 orgId=1 uname=admin t=2023-01-25T15:24:26.491703503+01:00 level=info msg="Request Completed" method=POST path=/api/alertmanager/grafana/config/api/v1/receivers/test status=207 remote_addr=10.123.45.192 time_ms=86 duration=86.301731ms size=404 referer="XXXX?alertmanager=grafana" handler=/api/alertmanager/grafana/config/api/v1/receivers/test
I also tried to send the request by using Basic Auth.
I have sent a test curl to the destination from the Grafana server that was successful (same user).
Curl:
curl --location --request POST 'https://XXX/dest/445b382099246447.json' \
--header 'Authorization: Bearer dfghjkl4567890fghjkl'' \
--data-raw ''
Grafana version: 9.3.2
Is there a way to get more debugging output?
Does someone have a clue what’s the issue?