There are many plugins available for Rundeck to integrate with Slack. In this blog, I’ve explained in simple steps to configure Rundeck Job Notifications with Slack. This blog is useful for the use-cases like audit, monitor and maintain logs of Rundeck job executions.
I spent many hours of searching and fixing unexpected errors/issues in different version of Rundeck, which are all covered and documented as simple steps in this blog.
I’m using Higanworks’s plugin downloadable from GitHub
Advantages:
- Single window to view all notifications from Rundeck {better than pile of emails}
- Multiple users/groups can be notified by adding them to the notifications channel {no need to mess with distribution lists etc}
- Logging and Auditing now made easier by using the powerful search options available in Slack
Requirements:
- Rundeck 2.10.x or above {Running on CentOS 7}
- openjdk version “1.8.0_171”
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode) - Rundeck-slack-incoming-webhook-plugin v.0.6.dev or above
- Working Slack user account,
- Dedicated channel for Rundeck notifications with webhook app enabled
Downloads:
Pre-Installation Steps
- Create a new private channel in slack {e.g: rundeck_notifications}
- Webhook URL for the newly created channel. Refer SlackĀ guide
Install and Configuration Steps
By now server is ready with installation of Rundeck and plugin downloaded from the Github. Make sure Rundeck server has internet access to connect and send messages to slack.
- Copy rundeck-slack-incoming-webhook-plugin-x.y.z.jar executable file to Rundeck’s libext directory {/var/lib/rundeck/libext}
- After the above file is placed in the libext directory, Rundeck automatically configure the plugin and no further user actions required. No need to restart Rundeck service. Please refer Rundeck Plugins Installation Guide for further details.
- Below screenshot show new option ‘Slack Incoming Webhook’ available while Creating/Editing jobs in Rundeck. Paste here the webhook generated for new rundeck_notifications channel
- Sample output for reference. Slack channel rundeck_notifications showing notifications generated by Rundeck Job executions
References:
https://github.com/higanworks/rundeck-slack-incoming-webhook-plugin
http://rundeck.org/docs/plugins-user-guide/installing.html
https://api.slack.com/incoming-webhooks
Image Courtesy:
https://github.com/higanworks/rundeck-slack-incoming-webhook-plugin
If you are facing any problem let me know by using ‘Comments’ section below and I will try my best to help you.