Skip to content

slack.q

Jas edited this page Apr 9, 2019 · 3 revisions

Slack Notification Integration

This library allows you to send messages to Slack directly from a kdb process via the Slack WebHook integration.

.slack.notify

Sends a message to Slack as the specified user via the specified WebHook URL. The function expects a user name that the message will appear from. The user does not have to be a real Slack user, and if you don't specify it, it will default to user@host.

If the function returns false (0b), it will also log the error for investigation.

This library uses .Q.hp to POST to an HTTPS endpoint therefore you need to ensure that your SSL settings are correct for kdb prior to using this library:

  1. Depending on your OS you may need to update the location of the SSL certificates with the SSL_CA_CERT_PATH environment variable
  2. You can simply disable SSL server verification (not recommended) with the command: export SSL_VERIFY_SERVER=NO

Example

.slack.notify[`$"slack-test-user"; "https://hooks.slack.com/services/..."; "This is a test"]
Clone this wiki locally