LYCHEE is a command-line tool that integrates CI/CD deployment, system monitoring, and alert notifications. It is designed to simplify your operational workflow, ensure the healthy operation of your system services, and send timely notifications when issues arise. Say goodbye to tedious tasks and embrace efficiency! ✨
Warning: This project is currently in dev mode. There may be significant changes in the future. Issues are welcome!
- Systemd Service Monitoring: Provides basic and effective monitoring for
systemctlservices to ensure they are running correctly. 👁️🗨️ - Lark Integration: Seamlessly sends alerts and notifications to your Lark groups. 📨
- Basic Log Anomaly Detection: Monitors service logs for specific keywords to help you detect potential issues early (currently a basic implementation, pending comprehensive testing). 🔍
- Service Health Checks: Actively checks if specified services are running correctly, and records and filters relevant logs for analysis. ❤️🩹
- Multi-Account Log Forwarding: Enhanced log forwarding feature that supports sending logs to multiple accounts or destinations. 📧
- Container Management: Support for monitoring and managing containerized applications. 🐳
Installing LYCHEE on Ubuntu distributions is straightforward.
Simply run the installation script with sudo:
sudo ./install.sh- Go 1.24.4 or higher
You can also use Nix Flake for a reproducible build environment.
To build the executable, run:
go build -o lychee ./cmd/app/main.gonix build .After building or installing, you can run LYCHEE by specifying a configuration file:
./lychee -config configs/config.yamlHere is a sample config.yaml to help you get started:
# config.yaml
# The frequency in seconds at which LYCHEE checks service status and logs. ⏱️
checkInterval: 60
# Lark bot Webhook URL for sending notifications. 🔔
lark:
WebhookURLs:
- "[https://open.feishu.cn/open-apis/bot/v2/hook/URLA](https://open.feishu.cn/open-apis/bot/v2/hook/URLA)"
- "[https://open.feishu.cn/open-apis/bot/v2/hook/URLB](https://open.feishu.cn/open-apis/bot/v2/hook/URLB)"
# --- Systemd Service Monitoring ---
# A list of systemd services to monitor. LYCHEE will check if they are in an 'active' state. ✅
systemd:
services:
- "daed.service"
- "sshd.service"
- "nginx.service"
# --- Journald Log Monitoring ---
# Configure log monitoring for specific services and keywords.
# LYCHEE will send an alert if any of the specified keywords are found in the service's Journal logs. 🚨
journal:
- serviceName: "nginx.service"
keywords:
- "error"
- "failed"
- "denied"
- serviceName: "sshd.service"
keywords:
- "Failed password"
- "Invalid user"We welcome contributions! Please see our Contributing Guide for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
