Daily SSL certificate monitoring and checking tool
Project description
SSL Daily Check
SSL Daily Check 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/rtmax0/ssl-daily-check.git cd ssl-checker
-
Install dependencies using Poetry:
poetry install
Configuration
-
Create a
~/.ssl-daily-check/domains.txt
file with the domains you want to monitor:example.com:Example Website yourdomain.com:Your Website
-
Create a
~/.ssl-daily-check/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 Daily Check 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.1.tar.gz
.
File metadata
- Download URL: ssl_daily_check-0.1.1.tar.gz
- Upload date:
- Size: 4.7 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 | 88b28dfdc4f67851156c771087377304dbda983b7949ac37a23726bc055d9936 |
|
MD5 | 9f44ad1c0549dd636623e8d9ec7beb2d |
|
BLAKE2b-256 | 7bcd7bf43a8f0ae0efe94d698727a2dd1f1895ea24f4400630efa91d3201b1e8 |
File details
Details for the file ssl_daily_check-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: ssl_daily_check-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 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 | 904ed8ff17173525fbcc56fbb7e0b33e5c3f31139cbe0ebae93c5b538ddffe95 |
|
MD5 | 3f6152bdf8386cd57a434094130766a1 |
|
BLAKE2b-256 | 3b38c0277233341e6033711d67b99bee3c9f43f2cf793e581ad28f10ddb475ca |