Daily SSL certificate monitoring and checking tool
Project description
SSL Checker
SSL Checker is a Python-based tool that monitors SSL certificates for specified domains and sends notifications when certificates are nearing expiration.
Features
- Checks SSL certificates for multiple domains
- Stores certificate information in a SQLite database
- Sends notifications via WeChat Work (企业微信) when certificates are close to expiration
- Configurable through simple text files
- Designed to run as a cron job on Linux systems
Requirements
- Python 3.8+
- Poetry for dependency management
Installation
-
Clone the repository:
git clone https://github.com/yourusername/ssl-checker.git cd ssl-checker
-
Install dependencies using Poetry:
poetry install
Configuration
-
Create a
~/.ssl-checker/domains.txt
file with the domains you want to monitor:example.com:Example Website yourdomain.com:Your Website
-
Create a
~/.ssl-checker/notify-rule.json
file with your WeChat Work webhook URL:[ { "id": "notify1", "type": "qyweixin", "url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=your-key-here" } ]
Usage
Run the SSL Checker manually:
poetry run ssl-checker
To set up automatic checking, add a cron job:
0 0 * * * /path/to/your/poetry/environment/bin/ssl-checker
This will run the SSL Checker daily at midnight.
Development
This project uses:
- Poetry for dependency management
- Black for code formatting
- Flake8 for linting
- Pytest for testing
To set up the development environment:
-
Install development dependencies:
poetry install --dev
-
Run tests:
poetry run pytest
-
Format code:
poetry run black .
-
Run linter:
poetry run flake8
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ssl_daily_check-0.1.0.tar.gz
.
File metadata
- Download URL: ssl_daily_check-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af2b64c7f0eb39163708dc8d3c686444ff0211f0c597046fa3b4cc7900e1c767 |
|
MD5 | 233eb9c11b230d99303126f9224004de |
|
BLAKE2b-256 | 85fa1c943a74e87142a0e2130bb92ea8fc84156bfcd152fdbe64df7432d71e2e |
File details
Details for the file ssl_daily_check-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ssl_daily_check-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae6444ca78a7d16319349df66885c621254aa85bdd21b764ae2997400b21e01 |
|
MD5 | 5c369b0f2f6da6b13e1204f278be8b61 |
|
BLAKE2b-256 | 4369266e515752a68e3f203e312c7017c9f8148143500e2ee8aaf94c39870ed1 |