Open haotao666 opened 2 years ago
As you can see, pinpoint-batch expects String as return. It seems like your webhook receiving part replied with JSON, not String.
It seems like the webhook has been successfully received and dealt with in your receiving application, just pinpoint-batch was expecting String as a return but it got another type as the response.
If you have no control over the return type your webhook destination is sending, you might need to implement another server to process this.
Please refer to slack-receiver project.
Hi, I have created my Pinpoint APM infrastructure in the dockerized environment, now, my concern is that I need to implement alarm alerts on my Slack channel. I have my webhook URL but I don't know where or in which directory or files I need to configure the slack webhook URL and what should be the parameter. I have tried this I(PINPOINT_NOTIFICATION_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxxxxxxxx/xxxxxxxxxxx )n the .env file but I am not able to see the slack option in alarm settings of pinpoint web UI. Please help. It would be very helpful.
Thanks
@PIYUSHRAJ24 There isn't ready-to-go slack webhook implementation on Pinpoint. Currently there should be another server to translate received pinpoint webhook into slack webhook format and then send it to your slack. That slack receiver project above does exactly that so it might be worth checking it.
Can you please guide me, I have already created the package with the Slack receiver project by mentioning the Slack webhook URL in application.properties. after that I got a jar file I have run the jar file it is running perfectly but whenever I am trying to access http://10.136.184.102:8085/api/send/slack URL. Showing error Whitelabel Error Page
@PIYUSHRAJ24
you can't access that page because it is there for POST requests.
I haven't used slack receiver before but it seems like you should put http://10.136.184.102:8085/api/send/slack
as url when adding pinpoint webhook?
After adding webhook, first test with total count = 1 alarm with that webhook and see if it works.
Okay, Let me try. Thanks for your help.
pinpoint-batch-2.3.2.jar Prompt when webhook alarm is triggered: org.springframework.web.client.RestClientException: Error while extracting response for type [class java.lang.String] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type![image](https://user-images.githubusercontent.com/92361186/147041586-9667dc89-6bcf-4d8a-83a0-c195f37d7e89.png)
java.lang.String
from Object value (tokenJsonToken.START_OBJECT
); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of typejava.lang.String
from Object value (tokenJsonToken.START_OBJECT
) at [Source: (PushbackInputStream); line: 1, column: 1]