Setup incoming webhook and a blank message gets pushed to the channel

Description

I have setup a new rocket chat instance via snap on a raspberry pi. All seems to have gone well as I can load rocket chat via a web browser, create user accounts and send messages etc.

I’m trying to setup an incoming webhook so I get messages published from prometheus Alert Manager.

I’ve setup the webook and tried using the curl command that is given, this seems to run and produces this in the command prompt:

curl -X POST -H 'Content-Type: application/json' -d '{"text":"Test message"}' "http://192.168.1.18:3030/hooks/MyToken"
curl: (6) Could not resolve host: application
{"success":true}

This produces a blank message posted to the correct channel. Why does the content of the message not come through?

In Rocket chat, with debugging turned on, the log looks like this:

{"level":30,"time":"2023-06-09T08:22:55.269Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Incoming WebHook","msg":"Post integration:","name":"Test intergration Prometheus"} 
{"level":20,"time":"2023-06-09T08:22:55.273Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Incoming WebHook","urlParams":{"integrationId":"R93REZK8m8xgqJz3o","token":"TokenRemoved"},"bodyParams":{"'{text:Test message}'":""}} 
{"level":20,"time":"2023-06-09T08:22:55.306Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id mentions for hook beforeSaveMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.314Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id filterATAllTag for hook beforeSaveMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.318Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id filterATHereTag for hook beforeSaveMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.321Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id ReplyEmail for hook beforeSaveMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.324Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id jumpToMessage for hook beforeSaveMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.326Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id spotify-save for hook beforeSaveMessage"} 
{"level":35,"time":"2023-06-09T08:22:55.341Z","pid":1080,"hostname":"pihole","name":"API","method":"POST","url":"/hooks/MyToken","userAgent":"curl/8.0.1","length":"21","host":"192.168.1.18:3030","remoteIP":"192.168.1.45","status":200,"responseTime":75} 
{"level":20,"time":"2023-06-09T08:22:55.370Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Outgoing WebHook","msg":"Execute Trigger:","arg":"sendMessage"} 
{"level":20,"time":"2023-06-09T08:22:55.372Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Outgoing WebHook","msg":"Got the event arguments for the event: sendMessage","argObject":{"event":"sendMessage","message":{"alias":"","msg":"","attachments":[],"parseUrls":true,"bot":{"i":"xxxxxxxxxxxxx"},"groupable":false,"ts":"2023-06-09T08:22:55.306Z","u":{"_id":"yHPAMbeC4bzpTEBtZ","username":"nick","name":"Nick"},"rid":"GENERAL","urls":[],"mentions":[],"channels":[],"_updatedAt":"2023-06-09T08:22:55.329Z","_id":"qxAoWNjDuc8YvXY2n"},"room":{"_id":"GENERAL","ts":"2023-06-08T14:00:41.045Z","t":"c","name":"general","usernames":[],"msgs":5,"usersCount":2,"default":true,"_updatedAt":"2023-06-09T08:19:00.970Z","lastMessage":{"alias":"","msg":"","attachments":[],"parseUrls":true,"bot":{"i":"R93REZK8m8xgqJz3o"},"groupable":false,"ts":"2023-06-09T08:19:00.944Z","u":{"_id":"yHPAMbeC4bzpTEBtZ","username":"nick","name":"Nick"},"rid":"GENERAL","urls":[],"mentions":[],"channels":[],"_updatedAt":"2023-06-09T08:19:00.952Z","_id":"R87SSs3BuExexpCLC"},"lm":"2023-06-09T08:19:00.944Z"}}} 
{"level":20,"time":"2023-06-09T08:22:55.375Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Outgoing WebHook","msg":"Starting search for triggers for the room: GENERAL"} 
{"level":20,"time":"2023-06-09T08:22:55.377Z","pid":1080,"hostname":"pihole","name":"Integrations","section":"Outgoing WebHook","msg":"Found 0 to iterate over and see if the match the event."} 
{"level":20,"time":"2023-06-09T08:22:55.405Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id emojione-shortnameToUnicode for hook beforeSendMessageNotifications"} 
{"level":20,"time":"2023-06-09T08:22:55.432Z","pid":1080,"hostname":"pihole","name":"Callbacks","msg":"Executing callback with id filter-markdown for hook renderNotification"} 
{"level":20,"time":"2023-06-09T08:22:57.427Z","pid":1080,"hostname":"pihole","name":"Push","msg":"Sending notification {\"createdAt\":\"2023-06-09T08:22:57.426Z\",\"createdBy\":\"<SERVER>\",\"sent\":false,\"sending\":0,\"from\":\"push\",\"title\":\"#general\",\"text\":\"nick: \",\"userId\":\"W8bK4XHY6SeD7wdvs\",\"payload\":{\"host\":\"http://192.168.1.18:3030/\",\"messageId\":\"qxAoWNjDuc8YvXY2n\",\"notificationType\":\"message\",\"rid\":\"GENERAL\",\"sender\":{\"_id\":\"yHPAMbeC4bzpTEBtZ\",\"username\":\"nick\",\"name\":\"Nick\"},\"senderName\":\"nick\",\"type\":\"c\",\"name\":\"general\"},\"badge\":1,\"sound\":\"default\",\"notId\":-1246319129,\"apn\":{\"category\":\"MESSAGE\"},\"gcm\":{\"image\":\"http://192.168.1.18:3030/images/logo/android-chrome-192x192.png\",\"style\":\"inbox\"}}"} 
{"level":20,"time":"2023-06-09T08:22:57.431Z","pid":1080,"hostname":"pihole","name":"Push","msg":"send message \"#general\" to userId 'W8bK4XHY6SeD7wdvs'"} 
{"level":20,"time":"2023-06-09T08:22:57.443Z","pid":1080,"hostname":"pihole","name":"Push","msg":"Sent message \"#general\" to 0 ios apps 0 android apps"} 
{"level":20,"time":"2023-06-09T08:22:57.451Z","pid":1080,"hostname":"pihole","name":"Push","msg":"GUIDE: The \"appTokensCollection\" is empty - No clients have registered on the server yet..."}

Server Setup Information

  • Version of Rocket.Chat Server: 4.1.2
  • Operating System: raspbian
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.22.7
  • MongoDB Version: 3.6.23
  • Proxy: None
  • Firewalls involved: UFW enabled, ports 80 and 443 have been allowed.