Notifications can be configured to use Slack channels as a notification sink.
In preparation an administrator needs to create a custom bot user for each Slack team that wants to receive notifications:
In addition you need to configure the Slack integration in the OneOps notification service called Antenna by setting the environment variables for the Tomcat server running Antenna:
slack.url
: The URL to reach the Slack chat service. Defaults to https://slack.com
. You need to ensure that
this host can be reached on the network. In an open deployment on the internet this is already the case. If OneOps
runs in an isolated network you need to open up the network or introduce a reverse proxy server that can forward
requests between Antenna and Slack. One option for such a reverse proxy server is
NGINX.
slack.tokens
: The Slack bot API tokens need to be provided to Antenna with this configuration. The supported
syntax is a comma separated list of all your bot user tokens for each team like team1=<token1>,team2=<token2>
.
Assuming your OneOps installation is managed and run by OneOps itself you can configure those environment variables for Antenna with the OneOps user interface:
slack.url
and slack.tokens
as requiredIf OneOps is running via a manual install and is not managed by OneOps itself you have to configure the environment variables in the startup scripts for the Tomcat instance running Antenna.
With the administrator setup completed you can create your Slack notification sinks:
account.notification.slack.sink
.critical
and Value to :fire: ${text}
results in the Fire emoji to be
inserted before any occurrence of critical
.