Integrate Rundeck notifications with Slack

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}

2018-06-17 11_11_23-Mint [Running] - Oracle VM VirtualBox

  • 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

configuration

  • Sample output for reference. Slack channel rundeck_notifications showing notifications generated by Rundeck Job executions

2018_06_17_11_24_31_Slack_Rubicon.png

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.

Advertisements

Rundeck SSL Configuration

Rundeck is an OSS that automate routine operational procedures in data center or cloud environments. Here is the blog to configure SSL on Rundeck for secure transaction within intranet and internet. This blog is a reference to configure SSL for Rundeck running on Linux (CentOS/Debian)

Phase 1:

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

  • Create PKCS#12 keystore (.pfx file)
#keytool -genkeypair -keystore myKeystore.pfx -storetype PKCS12 -storepass password -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=Sustaining, O=Virtustream, L=McLean, ST=VA, C=US" -ext san=dns:servername.com,dns:localhost,ip:127.0.0.1,ip:xx.xx.xx.xx

Replace servername.com with FQDN of the Rundeck server and xx with Rundeck server IP address Continue reading “Rundeck SSL Configuration”

Convert Python 2.x code to 3.x

If you got a Python code written in 2.x version and need an easy way to convert to 3.x. Then use the online Python Code converter. Click here

This online converter saved me a lot of time and efforts by the conversion of a good number of scripts.

Python Script to Validate VMAX3 Hot Spare Drives Compliance

In VMAX3 or any enterprise-class storage arrays, hot spares are used to replace failing or failed disks in the storage array. Hot Spare drives need to be of the same configuration and size (can be larger) as that of the failing/failed disk. VMAX3 with Hypermax use Direct Sparing to automatically replace a failing disk. Please click here to know more…

This script would fetch hot spare drives count per VMAX3 array and generates a dash. This dash shows compliance report across all DCs.

Continue reading “Python Script to Validate VMAX3 Hot Spare Drives Compliance”

Slack: Python script to count member’s messages

“Launched in 2014, Slack is the fastest growing business application in history. Millions of people around the world use Slack to bring their teams together, make sense of their work, and drive their business forward.”

I love using this ‘productivity tool’ and we do use @here quite often 😛

Recently, one of my colleagues came to me with an idea to develop a script to count # of messages in a given list of slack channels on a given day.

Continue reading “Slack: Python script to count member’s messages”

VMAX3 Snapshot Aging Report

Data Storage cleanup/reclaim is similar to how we manage “kinds of stuff” in our homes. We think what to keep and not to after taking the holistic decision. Time & Value will decide what is to be discarded in near future…

An All-Flash Storage array (AFA’s) gives the best performance and greater value to the business. But every GB of All-Flash Storage is at least 3 times costlier than that of mechanical drives. It is critical to perform frequent clean up of these kinds of arrays to make sure that only the mission/business critical data and deserving information should reside on All-Flash array.

From the business perspective, the concerned team needs to do the regular drills to identify then inform IT Ops to discard stale or amassed data ASAP. This requires the team to do a logical distinction of information based on value or tasks, seek approvals from respective Business Unit Owners before proceeding to do clean up.

Continue reading “VMAX3 Snapshot Aging Report”

Setup Active Directory Authentication for Rundeck

Rundeck is a simple & easy product to setup workflow and automation tool. By default, it comes with the default local user accounts. Rundeck supports LDAP, AD, PAM and Pre-Auth methods. But the downside is Rundeck’s documentation which is not that great to configure LDAP/AD based authentication.

After multiple attempts and spending a whole day searching on the internet; able to configure AD authentication… Here are the simple steps for Rundeck AD auth configuration.

Continue reading “Setup Active Directory Authentication for Rundeck”