Code Monkey home page Code Monkey logo

serverstatus-hotaru's Introduction

ServerStatus-Hotaru

云探针、多服务器探针、云监控、多服务器云监控

基于 ServerStatus-Toyo 最新版本稍作修改。

特性

服务端客户端脚本支持系统:Centos 7、Debian 8、Ubuntu 15.10 及以上、ArchLinux

Python 客户端:支持 Python 版本:Python 2.7+

Go 客户端:如果您的客户端环境无法使用 Python, 可以使用 Go 编写的客户端

开源地址:https://github.com/cokemine/ServerStatus-goclient

流量计算:客户端可以选择使用 vnStat 按月计算流量,会自动编译安装最新版本vnStat(ArchLinux 会从软件源安装最新版本)。如不使用 vnStat ,则默认计算流量方式为重启后流量清零。请注意 ServerStatus 不会把协议为 GPLv2 的 vnStat 作为必须的依赖。

前端基于 Vue 3.0 和 SemanticUI 制作,如需修改前端建议自行修改打包。

前端所使用一些静态资源见前端仓库下的声明。

前端开源地址:https://github.com/cokemine/hotaru_theme

其他说明

ServerStatus-Hotaru 将会停留在轻量级的 ServerStatus,不会再添加新的功能

如果你有以下需求:

1、服务端更低的 IO 占用

2、Websocket 支持

3、Docker 支持

4、更方便服务器的顺序调整

5、客户端掉线 Telegram Bot 通知

6、使用 Web 管理、添加、修改客户端信息

7、等等

欢迎使用 NodeStatus: https://github.com/cokemine/nodestatus

本项目仍会继续维护

安装方法

服务端:

wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/status.sh
# wget https://cokemine.coding.net/p/hotarunet/d/ServerStatus-Hotaru/git/raw/master/status.sh 若服务器位于**大陆建议选择 Coding.net 仓库
bash status.sh s

客户端:

bash status.sh c

手动安装服务端

mkdir -p /usr/local/ServerStatus/server
apt install wget unzip curl vim build-essential
cd /tmp
wget https://github.com/cokemine/ServerStatus-Hotaru/archive/master.zip
unzip master.zip
cd ./ServerStatus-Hotaru-master/server
make #编译生成二进制文件
chmod +x sergate
mv sergate /usr/local/ServerStatus/server
vim /usr/local/ServerStatus/server/config.json #修改配置文件
#下载前端
cd /tmp && wget https://github.com/cokemine/hotaru_theme/releases/latest/download/hotaru-theme.zip
unzip hotaru-theme.zip
mv ./hotaru-theme /usr/local/ServerStatus/web #此为站点根目录,请自行设置
nohup ./sergate --config=config.json --web-dir=/usr/local/ServerStatus/web --port=35601 > /tmp/serverstatus_server.log 2>&1 & #默认端口35601

手动安装客户端

使用 Psutil 版客户端即可使 ServerStatus 客户端在 Windows 等其他平台运行

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 若未安装pip
python get-pip.py
python pip install psutil
# 修改 status-psutil.py
python status-psutil.py

Linux 版客户端支持绝大部分 Linux 发行版系统,一般不需要使用 psutil 版客户端。

apt install python3 python3-pip wget
pip3 install psutil
wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/clients/status-psutil.py
vim status-psutil.py #修改客户端配置文件
python3 status-psutil.py
# https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/clients/status-client.py 默认版本无需 psutil 依赖

更新前端

默认服务端更新不会更新前端。因为更新前端会导致自己自定义的前端消失。

rm -rf /usr/local/ServerStatus/web/*
wget https://github.com/cokemine/hotaru_theme/releases/latest/download/hotaru-theme.zip
unzip hotaru-theme.zip
mv ./hotaru-theme/* /usr/local/ServerStatus/web/
service status-server restart
# systemctl restart status-server

关于前端旗帜图标

目前通过脚本使用旗帜图标仅支援当前国家/地区在 ISO 3166-1 标准里,否则可能会出现无法添加的情况,如欧盟 EU,但是前端是具备该旗帜的。你可能需要手动加入。方法是修改/usr/local/ServerStatus/server/config.json,将你想修改的服务器的region改成你需要的。

同时,前端还具备以下特殊旗帜,可供选择使用,启用也是需要上述修改。

Transgender flag: trans

Rainbow flag: rainbow

Pirate flag: pirate

Toyo版本修改方法

如果你使用 Toyo 版本或其他版本的 ServerStatus,请备份你的config文件并重新编译安装本版本服务端

配置文件: /usr/local/ServerStatus/server/config.json 备份并自行添加region

{
   "username": "Name",
   "password": "Password",
   "name": "Your Servername",
   "type": "KVM",
   "host": "None",
   "location": "洛杉矶",
   "disabled": false,
   "region": "US"
},

替换配置文件,重启 ServerStatus

效果演示

相关开源项目 :

感谢

serverstatus-hotaru's People

Contributors

a2vszxlh avatar cokemine avatar coldercoder avatar dongfeisay avatar myxuchangbin avatar qwq233 avatar reiyy avatar theconanedogawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

serverstatus-hotaru's Issues

一个小问题

//serverstatus_tw.js
TableRow.children["memory"].children[0].children[0].className = "progress-bar progress-bar-warning"; // 此处没有效果

似乎显示的css是
progress-bar {
background: linear-gradient(to right, #44ce78 0%,#43ce9f 100%)!important; //main.css - 3785
}

.progress-bar-warning {
background-color: #f0ad4e; //Coce.css - 5758 ,虽然有定义,但是无法显示效果
}

需要修改caddy.service文件但是在/etc/systemd/system 无法找到

全程跟着步骤安装的探针,没有单独下载过caddy
因为需要加上cloudfalre的CDN因此下载了一个官方的插件来实现

curl https://getcaddy.com | bash -s personal tls.dns.cloudflare

但是需要修改当中的 caddy.service 中的环境变量才能实现
未能在一般情况下caddyservice存在的路径下找到,通过 find命令也没有搜索到在这个路径下有这个文件
求帮助,谢谢谢谢!

求助

Screenshot_2020-12-27-23-19-23-184_mark via

大佬,装完之后一直这样

同时搭建服务端和客户端无法正常显示

服务器A同时搭了服务端和客户端,服务器B只搭建了客户端。只能正常显示B的信息,A的全部信息都无法显示,一直在图中的状态以及红色的维护中切换,以下是nohup.out文件内容:

nohup: ignoring input
Connecting...
Authentication successful. Access granted.
^@^@You are connecting via: IPv4
^@^@
Timeout.
^@^@
Timeout.
^@^@
Disconnected...
Connecting...
Authentication successful. Access granted.
^@^@You are connecting via: IPv4
^@^@
Timeout.
^@^@
Timeout.
^@^@
Disconnected...
Connecting...
Authentication successful. Access granted.
^@^@You are connecting via: IPv4
^@^@
~             

image

一个错误

当我从本地html上传到服务器出现了错误

Refused to apply style from 'http://networkstatus.ml/css/global.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

是否考虑支持下docker?

使用docker-compose快速拉起服务端(包括前端),以及拉起(心跳客户端)无论是从环境隔离上还是快速部署上考虑都是比较好的解决方案。

安装过bbr plus 后无法编译serverstats服务端

gcc -c -Iinclude -Wall -O2 src/system.c -o obj/system.o
In file included from /usr/include/sys/socket.h:39:0,
from src/system.c:19:
/usr/include/bits/socket.h:346:24: 致命错误:asm/socket.h:没有那个文件或目录
#include <asm/socket.h>
^
编译中断。
make: *** [obj/system.o] 错误 1
[错误] ServerStatus 服务端编译失败 !

若干问题

1.我把服务端放搭建在IPV6 only的VPS上,现在只能通过IPV6的代理才能访问主页,在移动IPV4下访问不了。如何能在IPV4网络下访问正常呢?
2.CPU 一直为0,请问CPU、RAM和ROM三项数据是如何采集的呢?其中CPU一直为0肯定不正确的,该VPS正在使用中的。在finalshell里看大概是30%-70%是正常的。
3.脚本体验的问题,即添加完一个节点就全部退出来了,需要继续添加又要输入多次bash status.sh s,再按7-1,添加多个监控客服端不方便。最好一直能留在菜单,并有个退出设置的选项。

IPV6 only VPS安装完后访问不了

Caddy看状态已经启动了,域名也解析了。但无论是域名还是IP就是访问不了网页。服务器已经重启的了。访问页面显示

无法访问此网站找不到 vps.formyvmess.tk 的服务器 IP 地址。
请试试以下办法:

检查网络连接
检查代理服务器、防火墙和 DNS 配置
运行 Windows 网络诊断
ERR_NAME_NOT_RESOLVED

南非的国旗问题

南非国旗图片被错误地命名为南非洲,且没有与其对应的ZA缩写

手机网页版增加负载显示

手机网页版增加负载显示.....手机每次打开都必须调到电脑网页才能看到......
排版不够的话 可以稍微设置 网页可以稍微向右滑动一下。...
类似于另外一个修改版 那个逻辑 感谢。...

Caddy 解压失败或压缩文件错误 !

Location: https://github.com/caddyserver/caddy/releases/download/v2.1.1/caddy__linux_amd64.tar.gz [following]
--2020-08-02 02:44:59-- https://github.com/caddyserver/caddy/releases/download/v2.1.1/caddy__linux_amd64.tar.gz
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 404 Not Found
2020-08-02 02:44:59 ERROR 404: Not Found

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[错误] Caddy 解压失败或压缩文件错误 !
[错误] Caddy安装失败,请手动部署,Web网页文件位置:

更改网址默认端口

最初安装客户端的时候直接回车了想更改一下端口,请问一下大佬存放端口的文件在哪里?谢谢

运行状态、CPU等全显示为维护中

前几天我在服务端上删除两个节点信息后,打开网站发现节点信息全变红也就是全显示维护中,多次重启服务端和客户端,甚至重装了服务端和客户端再次添加节点后仍显示维护中

手动安装出错:Segmentation fault (core dumped)

同样的环境下逗比大佬的就能正常使用,出错在./sergate这一步,这在好几台服务器上都得到了验证。

root@10-9-69-132:/home/ubuntu/ServerStatus-Toyo/server# ./sergate
[server]: Bound to :35601
^C[EXIT] Caught signal 2
[server]: Closing.
root@10-9-69-132:/home/ubuntu/ServerStatus-Toyo/server# cd /home/ubuntu/ServerStatus-Toyo/ServerStatus-Hotaru/server
root@10-9-69-132:/home/ubuntu/ServerStatus-Toyo/ServerStatus-Hotaru/server# ./sergate
[server]: Bound to :35601
Segmentation fault (core dumped)

网上搜原因后自感无力解决,只好求助大佬

提个意见

可以统计下总共用了多少流量吗,重启一下流量就清零了好难受啊。

Windows支持

emmm咱想着在Windows上面跑py 结果发现没法读数据

Cloudflare开启后显示维护中

不知道是不是只有我出现这种问题 是不是缓存的原因 没开的时候还是好的 开了以后服务器都显示维护中

客户端是否支持MacOS系统

下载和配置客户端时出现以下错误,觉得是脚本不支持MacOS

status.sh: line 938: iptables: command not found
status.sh: line 939: iptables: command not found
sed: 1: "/usr/local/ServerStatus ...": extra characters at the end of l command
sed: 1: "/usr/local/ServerStatus ...": extra characters at the end of l command
sed: 1: "/usr/local/ServerStatus ...": extra characters at the end of l command
sed: 1: "/usr/local/ServerStatus ...": extra characters at the end of l command
status.sh: line 933: iptables: command not found
status.sh: line 934: iptables: command not found
status.sh: line 878: /etc/init.d/status-client: No such file or directory

客户端无法正常显示状态 ('Caught Exception:', IndexError('list index out of range',))

服务端web界面显示该客户端 持续切换从 维护中 到绿色n/a

Python版本2.7.5 CentOS7.9.2009 (两台都报同样的错误)

客户端用 python /usr/local/ServerStatus/client/status-client.py 执行报错如下:

Connecting...
Authentication successful. Access granted.

You are connecting via: IPv4

('Caught Exception:', IndexError('list index out of range',))
Connecting...
Authentication successful. Access granted.

You are connecting via: IPv4

('Caught Exception:', IndexError('list index out of range',))
Connecting...
Authentication successful. Access granted.

You are connecting via: IPv4

客户端IPv6问题

我有两个服务器,一个是有ipv4和ipv6的俄罗斯服务器,还有一个是EuServ的服务器,服务端被安装在了俄罗斯服务器上面,而EuServ的服务器虽然可以用ipv6来ping通俄罗斯服务器的ipv6地址,但是服务端一直显示EuServ维护中,是不是因为并不支持这样做?

全新搭建服务端及客户端仅显示维护中

嗨 CokeMine 按照你的分享资源搭建好服务端 客户端配置好都是一直显示 维护中,试过 CentOS 7 以及 Debian 9 都是一样情况,网页是可以直接登录,安装的时候无论是 域名 还是 IP 都是一样无法获取客户端信息,是否跟 系统自带 Python 版本有关?VPS 是重装系统后全新的。

页面显示迷惑

image
ru如图 这个是被监控的服务器的图片吗? 那为什么我挂载了多台服务器 却只有这一个服务器的图片。。。
嗯 我翻了下index 然后发现了 貌似这个是直接写在默认网页里的,嗯 所以 不是很懂

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.