Looking for pointers at this stage or if someone else has encountered the same issue. Worth noting that a “Curl” test or using a basic Powershell script to invoke the API works using a test integration.
Can you share an example of the payload your graylog is sending? Can you confirm if it’s the same one you are using with curl?
The scripts renders the message based at the contents at request.content.check_result, so you need to first make sure the content it’s there and also sent with json headers as well.
A great way to debug this is to set your graylog to point to a website like https://webhook.site/ and match that with your curl command.
Hello @dudanogueira !
I’ve tried your fix on Graylog 4.3 and unfortunately it doesn’t work(I just see empty notifications in RC), since message structure has been completely changed in the recent versions (Alerts)
I’ve collected new structure using webhook site you suggested.
Could you please take a look and suggest a fix?
But it should be pretty straightforward, as now it seems to only send one message per payload.
I will take a look on this later today and try to come up with a nice example. As I don’t use graylog, do you know what fields are the interesting ones to have at the message?
This is my first expirience with Graylog webhooks and I also can’t say for sure.
So far only message field comes to my mind
Probably backlog also should be considered, as it includes samples of previous logs triggered current notification, but so far I don’t even know how to trigger such notification
Thanks a lot for the prompt response and your efforts!
I’m a bit confused, since I still receive empty message in RocketChat
Here is what I see in the log:
I20220709-14:59:10.376(0) Integrations ➔ Incoming WebHook.info Post integration: graylog
I20220709-14:59:10.389(0) API ➔ info 37.48.76.140 - m8QsnPaBXcK7CNsfS [2022-07-09T14:59:10.389Z] "POST /hooks/qjLDsKD9Qs44Jv2qa/T2SYC2dchQzxRBKy4xf8PkLLpnNbrAPygMwkuX4mnsAYaasY" 200 - "undefined" "okhttp/3.14.6" |
Could you please let me know what can be done for further analysis?
UPD:
My bad - I just missed “Enable Script” button, test notification is ok, checking further