Share a homemade monitoring system using PHP that has been running stably for a long time

本站首发!本站首发!本站首发!
===========2025-12-17=============
增加更多通知类型,还能自定义webhook
有更多新想法都提出来吧,我来实现!


===========2025-12-15=============
没想到大家这么喜欢,我顺手更新了个企业微信机器人的通知
后续看情况再增加功能~你也可以自己加,或者请求加入git,一起让这个项目更强大
当初后台登录纯偷懒,懒得写sql,所以账号密码存储在了本地,哈哈哈,之后有需要再重构吧~

正题:

你喜欢了就行,全部开源了,没有任何加密。

github:

演示站:

https://starry.itzkb.cn/monitor/
后台:/admin
登录账号密码请在login.php中修改

这个项目起源于我有很多子站,然后想监控状态,发现好多一些监控的平台要么收费,要么就是延迟太大,于是乎我就简陋的搞了一个系统,但是没想到稳定运行了6个月+,通知由于我是iPhone所以只适配了bark,其他的你们自行用AI添加或者自己集成就行。

功能特性

  • :magnifying_glass_tilted_left: 多类型监控: 支持HTTP、HTTPS和API监控
  • :alarm_clock: 灵活间隔: 可自定义检查间隔时间
  • :bar_chart: 实时状态: 实时显示网站状态和响应时间
  • :bell: 通知提醒: 支持Bark推送通知
  • :crescent_moon: 主题切换: 支持浅色/深色主题切换
  • :mobile_phone: 响应式设计: 适配各种设备屏幕
  • :bullseye: 排序功能: 支持拖拽排序,自定义显示顺序

前台功能

  • 状态概览: 查看所有监控网站的状态
  • 实时数据: 显示响应时间和最后检查时间
  • 主题切换: 点击右上角图标切换浅色/深色主题
  • 自动刷新: 页面每60秒自动刷新

后台管理

  • 添加网站: 添加新的监控网站
  • 编辑设置: 修改网站配置和检查间隔
  • 排序管理:
    • 拖拽左侧的排序图标调整顺序
    • 点击"保存排序"按钮保存更改
    • 排序会影响前台显示顺序
  • 状态控制: 启用/禁用监控
  • 日志查看: 查看历史监控记录
  • 通知配置: 设置Bark推送通知

排序功能使用

  1. 在后台管理页面,每个网站行左侧有拖拽图标
  2. 点击并拖拽图标可以调整网站顺序
  3. 调整完成后点击"保存排序"按钮
  4. 排序更改会立即反映在前台显示中

文件结构

statusMonitor/
├── admin/              # 后台管理
│   ├── index.php      # 网站管理列表
│   ├── add_site.php   # 添加网站
│   ├── edit_site.php  # 编辑网站
│   ├── logs.php       # 查看日志
│   └── notification.php # 通知配置
├── config/
│   └── database.php   # 数据库配置
├── cron/
│   └── check_sites.php # 定时检查脚本
├── includes/
│   └── functions.php  # 核心函数
├── install/
│   ├── install.sql    # 数据库结构
│   └── add_sort_order.sql # 排序字段
└── index.php          # 前台显示

技术栈

  • 后端: PHP 7.4+
  • 数据库: MySQL 5.7+
  • 前端: Bootstrap 5, Font Awesome
  • 排序: Sortable.js
  • 主题: CSS变量 + JavaScript
13 Likes

Thanks for sharing

thank you for open sourcing

Admire the Gods

Thank you for sharing

Thank you for sharing. Saved.

Thanks

This is not bad, useful

1 Like

thank you for sharing

It’s also very refreshing and quite good.

Thank you for sharing

Thanks for sharing

Not bad, thanks for sharing

Sharing is helpful, even if not useful.

1 Like

Thank you for sharing

Thank the great contributor!

Thank you for sharing, should we add a link to the website for easy access?

Considering adding this, but it conflicted with another product I was working on at the time, so I didn’t add it: https://product.itzkb.cn, which is very simple and you just need one line of code for your frontend list, or throw it into AI and add it! After all, it’s open source, so feel free to use it however you like.

1 Like

Simplicity and usability are the most important!

1 Like

I set it up, but one website keeps showing an exception, even though it’s actually working!\n\nhttp://alay.loc.cc

1 Like