Skip to content

SSL Checker script that monitors multiple domains' SSL certificate expirations and sends notifications to Slack channels.

Notifications You must be signed in to change notification settings

alexmeanpug/ssl-checker-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

SSL Checker Script for SLACK

Alt text

Overview

The SSL Checker script is a Bash script designed to check the SSL certificate expiration status for a list of domains and send notifications to Slack channels based on the remaining days until expiration. It utilizes WHOIS information and OpenSSL to retrieve SSL certificate details.

Features

  • Checks SSL certificate expiration for multiple domains.
  • Sends notifications to Slack channels with color-coded information and icons.
  • Supports different Slack channels for each domain.

Prerequisites

Before using the script, ensure the following prerequisites are met:

  1. Bash shell environment.
  2. dig, whois, openssl, and curl commands installed.
  3. Incoming Webhooks integration enabled in your Slack workspace.

Setting up Incoming Webhooks in Slack

  1. Visit Incoming Webhooks.
  2. Click on "Add to Slack" to add the Incoming Webhooks integration to your workspace.
  3. Choose the channel where you want to receive notifications and click on "Add Incoming WebHooks integration."
  4. Copy the generated Webhook URL.

Usage

  1. Clone the repository:
    git clone https://github.com/alexmeanpug/ssl-checker-slack
    cd ssl-checker-slack
  2. Open the script file (ssl-domains.sh) and update the SLACK_WEBHOOK_URL variable with your Slack Incoming Webhook URL.
  3. Make the script executable:
    chmod +x ssl-domains.sh
  4. Edit the DOMAINS array in the script, adding domains and their corresponding Slack channels.
  5. Run the script:
    ./ssl-domains.sh

Configuration

  • SLACK_WEBHOOK_URL: Your Slack Incoming Webhook URL for sending notifications.
  • DOMAINS: An array containing domains and their associated Slack channels.

Output

The script will display information about each domain, including the domain name, expiry date, remaining days until expiration, color-coded status, and the Slack channel it's notifying.

Notes

  • Ensure proper permissions are set for the script (chmod +x).
  • Use the copied Webhook URL to update the SLACK_WEBHOOK_URL variable in the script.
  • Update the DOMAINS array with the desired domains and Slack channels.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

SSL Checker script that monitors multiple domains' SSL certificate expirations and sends notifications to Slack channels.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages