-
Notifications
You must be signed in to change notification settings - Fork 17
slack.q
Jas edited this page Apr 9, 2019
·
3 revisions
This library allows you to send messages to Slack directly from a kdb process via the Slack WebHook integration.
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:
- Depending on your OS you may need to update the location of the SSL certificates with the
SSL_CA_CERT_PATH
environment variable - You can simply disable SSL server verification (not recommended) with the command:
export SSL_VERIFY_SERVER=NO
.slack.notify[`$"slack-test-user"; "https://hooks.slack.com/services/..."; "This is a test"]
Copyright (C) Sport Trades Ltd 2017 - 2020, John Keys and Jaskirat Rajasansir 2020 - 2024