Skip to content

LittleJake/server-monitor

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.

Thanks for the open source project license provided by JetBrains.

JetBrains Logo (Main) logo.