Skip to content

LittleJake/server-monitor

Folders and files

NameName
Last commit message
Last commit date
Oct 29, 2024
Feb 15, 2025
Feb 15, 2025
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Feb 15, 2025
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Feb 4, 2025
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024
Oct 29, 2024

Repository files navigation

Server Monitor

Apache 2.0

GitHub Repo stars

基于ThinkPHP5.1的服务器监控平台,需要配合服务端python脚本,使用Redis存储相关数据。

使用

安装

git clone https://github.com/LittleJake/server-monitor
cd server-monitor
composer install
cp .env.example .env

API上报节点密钥操作(增/删/查)(TODO)

php think token help

配置Redis数据源

vim .env

刷新数据缓存

php think refresh:cache

界面演示

首页

Node

Node2

Other

Demo

Demo

数据结构

Collection

{
    "Disk": {
        // Based on different mountpoint.
        "mountpoint": {
            "total": "0.00",
            "used": "0.00",
            "free": "0.00",
            "percent": 0
        },
    },
    "Memory": {
        "Mem": {
            "total": "0.00",
            "used": "0.00",
            "free": "0.00",
            "percent": 0.0
        },
        "Swap": {
            "total": "0.00",
            "used": "0.00",
            "free": "0.00",
            "percent": 0.0
        }
    },
    "Load": {
        // Metrics based on platform.
        "metric": 0.0
    },
    "Network": {
        "RX": {
            "bytes": 0,
            "packets": 0
        },
        "TX": {
            "bytes": 0,
            "packets": 0
        }
    },
    "Thermal": {
        // Celsius
        "sensor": 0.0,
    },
    "Battery": {
        "percent": 0.0,
    }
}

Info

{
    "CPU": "",
    "System Version": "",
    "IPV4": "masked ipv4",
    "IPV6": "masked ipv6",
    "Uptime": "time in readable form",
    "Connection": "",
    "Process": "",
    "Load Average": "",
    "Update Time": "",
    "Country": "extract from ip-api.com",
    "Country Code": "extract from ip-api.com",
    "Throughput": "Gigabytes",
}

开源协议

Apache 2.0

鸣谢

MDUI

ThinkPHP

ip-api.com

Sponsors

Thanks for the amazing VM server provided by DartNode.