TinyStat
A simple status page service, written in PHP
🌐 Demo | 🗒️ 中文介绍 | 🗒️ Français
Features
- TCP/UDP/ICMP/HTTP Service support
- Locale support
- Incident description with markdown support
- Email/Discord/Kook/DingTalk/WeCom notification
- MySQL/SQLite3 support
Requirements
- PHP >= 7.0
- Extension: cURL, Socket, PDO
- MySQL / Mariadb with InnoDB support
- SQLite3 (optional)
- Terminal access (for cron/console)
Installation
- Clone this repo to your website root folder
cd /data/wwwroot/my-website.com/ git clone https://github.com/kasuganosoras/TinyStat . - Create a new database, using
utf8mb4charset. (Skip this step if you are using SQLite) - Edit your config.php and change the database info.
- Running the following command in your terminal to initialize the database
php console.php install - Create a new user
php console.php createuser - Open the browser and visit your website to check the installation
- Using
screenor other terminal manager to run thecron.phpin background.cd /data/wwwroot/my-website.com/ screen -Dms tinystat /usr/local/php/bin/php cron.phpYou can also use systemd to manage the service.
File: /etc/systemd/system/tinystat.service
[Unit]
Description=TinyStat Service
After=network.target
[Service]
WorkingDirectory=/data/wwwroot/my-website.com/
ExecStart=/usr/local/php/bin/php cron.php
Restart=always
RestartSec=5s
[Install]
WantedBy=multi-user.target
TO-DO
- [x] Email notification
- [x] Service display sort
- [ ] Subscribe the status
License
This project is open source under the MIT license.