Integration Guide

Integrating SSLytics with your workflow and other tools

Introduction

SSLytics offers various integration options to fit seamlessly into your existing workflow and tools. This guide covers how to integrate SSLytics with your CI/CD pipeline, monitoring systems, and other tools to automate SSL certificate management and monitoring.

Available Integration Methods

SSLytics provides several methods for integration:

  • Webhooks: Receive real-time notifications when certificate status changes
  • Email Notifications: Get alerts via email
  • Slack Integration: Receive alerts and reports in Slack channels
  • Custom Integrations: Build your own integrations using our API

Setting Up Webhook Integration

Webhooks allow you to receive real-time notifications when certificate status changes.

  1. Go to the Integrations tab in your SSLytics dashboard
  2. Click on "Webhooks" and then "Add Webhook"
  3. Configure your webhook:
    • Webhook URL: The URL that will receive the webhook payload
    • Events: Select the events you want to be notified about (e.g., certificate expiry, grade change, security issue)
    • Secret: Set a secret key to verify webhook authenticity
  4. Click "Save" to activate the webhook
  5. Test the webhook to ensure it's working correctly

Webhook Payload Example

{
  "event": "certificate_expiry",
  "domain": "example.com",
  "data": {
    "expiryDate": "2023-12-31T23:59:59Z",
    "daysUntilExpiry": 30,
    "issuer": "Let's Encrypt"
  },
  "timestamp": "2023-12-01T12:00:00Z"
}

Setting Up Slack Integration

Receive alerts and reports directly in your Slack channels.

  1. Go to the Integrations tab in your SSLytics dashboard
  2. Click on "Slack" and then "Connect to Slack"
  3. Authorize SSLytics to access your Slack workspace
  4. Select the channel where you want to receive notifications
  5. Configure notification settings:
    • Alert Types: Choose which types of alerts to send to Slack
    • Notification Frequency: Set how often to send notifications
    • Mention Users: Configure user mentions for critical alerts
  6. Click "Save" to activate the integration
  7. Send a test notification to verify the integration

Email Notification Setup

Configure email notifications for SSL certificate alerts.

  1. Go to the Integrations tab in your SSLytics dashboard
  2. Click on "Email Notifications"
  3. Add email recipients:
    • Enter email addresses for team members who should receive notifications
    • Optionally, create distribution groups for different types of alerts
  4. Configure notification settings:
    • Alert Types: Choose which types of alerts to send via email
    • Notification Frequency: Set how often to send notifications (immediate, daily digest, weekly digest)
  5. Click "Save" to activate email notifications
  6. Send a test email to verify the configuration

Integrating with CI/CD Pipelines

Automate SSL certificate checks as part of your CI/CD pipeline.

GitHub Actions Example

name: SSL Certificate Check

on:
  schedule:
    - cron: '0 0 * * *'  # Run daily at midnight
  workflow_dispatch:      # Allow manual triggering

jobs:
  check-ssl:
    runs-on: ubuntu-latest
    steps:
      - name: Check SSL Certificates
        run: |
          curl -X POST "https://api.sslytics.com/v1/bulk-check" \
            -H "Authorization: Bearer ${{ secrets.SSLYTICS_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d '{
              "domains": [
                "example.com",
                "api.example.com",
                "store.example.com"
              ]
            }'

Jenkins Pipeline Example

pipeline {
    agent any
    
    stages {
        stage('Check SSL Certificates') {
            steps {
                sh '''
                curl -X POST "https://api.sslytics.com/v1/bulk-check" \
                  -H "Authorization: Bearer ${SSLYTICS_API_KEY}" \
                  -H "Content-Type: application/json" \
                  -d '{
                    "domains": [
                      "example.com",
                      "api.example.com",
                      "store.example.com"
                    ]
                  }'
                '''
            }
        }
    }
}

Integrating with Monitoring Systems

Integrate SSLytics with your existing monitoring systems.

Prometheus/Grafana Integration

You can use webhooks to push SSL certificate metrics to Prometheus and visualize them in Grafana.

  1. Set up a webhook endpoint that converts SSLytics alerts to Prometheus metrics
  2. Configure SSLytics to send webhooks to this endpoint
  3. Create Grafana dashboards to visualize the metrics

Nagios/Icinga Integration

Integrate SSLytics alerts with Nagios or Icinga.

  1. Set up a webhook endpoint that converts SSLytics alerts to Nagios/Icinga passive checks
  2. Configure SSLytics to send webhooks to this endpoint
  3. Configure Nagios/Icinga to process these passive checks

Custom Integrations

Build custom integrations using the SSLytics API.

  1. Go to the Integrations tab and select "API Access"
  2. Generate an API key with the appropriate permissions
  3. Use the API documentation to build your custom integration
  4. Test your integration thoroughly before deploying to production

Best Practices for Integrations

  • Use Secure API Key Storage: Store API keys securely using environment variables or secrets management
  • Implement Proper Error Handling: Ensure your integration can handle API errors gracefully
  • Set Up Redundant Notifications: Use multiple notification channels for critical alerts
  • Monitor API Usage: Keep track of your API usage to avoid hitting rate limits
  • Regularly Test Integrations: Periodically verify that your integrations are working correctly

Troubleshooting Integration Issues

If you encounter issues with your integrations, here are some common problems and solutions:

  • Webhook Not Receiving Events: Verify the webhook URL is correct and accessible from the internet
  • API Rate Limiting: Implement backoff strategies and optimize API usage
  • Authentication Failures: Check that your API key is valid and has the necessary permissions
  • Data Format Issues: Ensure your integration correctly parses the JSON payload

Conclusion

By integrating SSLytics with your existing tools and workflows, you can automate SSL certificate management and monitoring, reducing the risk of certificate-related issues and improving your security posture.

If you have any questions or need assistance with integrations, please contact our support team at support@sslytics.com.