diff --git a/apps/serverstatus/1.1.4/.env.sample b/apps/serverstatus/1.1.4/.env.sample new file mode 100644 index 00000000..a574f5ff --- /dev/null +++ b/apps/serverstatus/1.1.4/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME="serverstatus" +PANEL_APP_PORT_HTTP=40269 +PANEL_APP_PORT_COMM=35601 +SERVERSTATUS_CONFIG_PATH="./data/server/config.json" +SERVERSTATUS_JSON_PATH="./data/web/json" diff --git a/apps/serverstatus/1.1.4/data.yml b/apps/serverstatus/1.1.4/data.yml new file mode 100644 index 00000000..ff64c231 --- /dev/null +++ b/apps/serverstatus/1.1.4/data.yml @@ -0,0 +1,32 @@ +additionalProperties: + formFields: + - default: "./data/server/config.json" + disabled: true + envKey: SERVERSTATUS_CONFIG_PATH + labelEn: Server Status Config Path + labelZh: 服务器状态配置路径 + required: true + type: text + - default: "./data/web/json" + disabled: true + envKey: SERVERSTATUS_JSON_PATH + labelEn: Server Status Monthly Traffic State Path + labelZh: 探针月流量状态路径 + required: true + type: text + - default: "35601" + edit: true + envKey: PANEL_APP_PORT_COMM + labelEn: Communication Port + labelZh: 通信端口 + required: true + rule: paramPort + type: number + - default: "40269" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web 端口 + required: true + rule: paramPort + type: number diff --git a/apps/serverstatus/1.1.4/data/server/config.json b/apps/serverstatus/1.1.4/data/server/config.json new file mode 100644 index 00000000..fe6c42ac --- /dev/null +++ b/apps/serverstatus/1.1.4/data/server/config.json @@ -0,0 +1,99 @@ +{ + "servers": [ + { + "username": "s01", + "name": "node1", + "type": "xen", + "host": "host1", + "location": "🇨🇳", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "username": "s02", + "name": "node2", + "type": "vmware", + "host": "host2", + "location": "🇯🇵", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "disabled": true, + "username": "s03", + "name": "node3", + "type": "hyper", + "host": "host3", + "location": "🇫🇷", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "username": "s04", + "name": "node4", + "type": "kvm", + "host": "host4", + "location": "🇰🇷", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + } + ], + "monitors": [ + { + "name": "baidu", + "host": "https://www.baidu.com", + "interval": 300, + "type": "https" + }, + { + "name": "aliyun", + "host": "https://www.aliyun.com", + "interval": 300, + "type": "https" + }, + { + "name": "114", + "host": "114.114.114.114:53", + "interval": 300, + "type": "tcp" + } + ], + "watchdog": [ + { + "name": "cpu high warning,exclude username s01", + "rule": "cpu>90&load_1>5&username!='s01'", + "interval": 600, + "callback": "https://yourSMSurl" + }, + { + "name": "memory high warning, exclude less than 1GB vps", + "rule": "(memory_used/memory_total)*100>90&memory_total>1048576", + "interval": 300, + "callback": "https://yourSMSurl" + }, + { + "name": "offline warning", + "rule": "online4=0&online6=0", + "interval": 600, + "callback": "https://yourSMSurl" + }, + { + "name": "ddcc attack,limit type Oracle", + "rule": "tcp_count>600&type='Oracle'", + "interval": 300, + "callback": "https://yourSMSurl" + }, + { + "name": "month traffic warning", + "rule": "(network_out-last_network_out)/1024/1024/1024>999", + "interval": 3600, + "callback": "https://yourSMSurl" + }, + { + "name": "you can parse an expression combining any known field", + "rule": "load_5>3", + "interval": 900, + "callback": "https://yourSMSurl" + } + ] +} \ No newline at end of file diff --git a/apps/serverstatus/1.1.4/docker-compose.yml b/apps/serverstatus/1.1.4/docker-compose.yml new file mode 100644 index 00000000..5abfdf37 --- /dev/null +++ b/apps/serverstatus/1.1.4/docker-compose.yml @@ -0,0 +1,25 @@ +services: + serverstatus: + image: "cppla/serverstatus:1.1.4" + healthcheck: + test: ["CMD-SHELL", "curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'"] + interval: 30s + timeout: 10s + retries: 5 + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - ${SERVERSTATUS_CONFIG_PATH}:/ServerStatus/server/config.json + - ${SERVERSTATUS_JSON_PATH}:/usr/share/nginx/html/json + ports: + - ${PANEL_APP_PORT_COMM}:35601 + - ${PANEL_APP_PORT_HTTP}:80 + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true + diff --git a/apps/serverstatus/README.md b/apps/serverstatus/README.md new file mode 100644 index 00000000..41ffd096 --- /dev/null +++ b/apps/serverstatus/README.md @@ -0,0 +1,13 @@ +# ServerStatus 中文版: + +* ServerStatus中文版是一个酷炫高逼格的云探针、云监控、服务器云监控、多服务器探针~。 +* 在线演示:https://tz.cloudcpp.com + +## 客户端配置 +【客户端】: +```bash +wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python3 client-linux.py SERVER={$SERVER} USER={$USER} PASSWORD={$PASSWORD} >/dev/null 2>&1 & + +#eg: +wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python3 client-linux.py SERVER=45.79.67.132 USER=s04 >/dev/null 2>&1 & +``` \ No newline at end of file diff --git a/apps/serverstatus/data.yml b/apps/serverstatus/data.yml new file mode 100644 index 00000000..d9b70d9b --- /dev/null +++ b/apps/serverstatus/data.yml @@ -0,0 +1,19 @@ +name: ServerStatus +tags: + - 实用工具 +title: 多服务器状态监控 +description: 多服务器状态监控 +additionalProperties: + key: serverstatus + name: ServerStatus + tags: + - Tool + shortDescZh: 多服务器状态监控 + shortDescEn: Multi-server status monitoring + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/cppla/ServerStatus + github: https://github.com/cppla/ServerStatus + document: https://github.com/cppla/ServerStatus diff --git a/apps/serverstatus/latest/.env.sample b/apps/serverstatus/latest/.env.sample new file mode 100644 index 00000000..a574f5ff --- /dev/null +++ b/apps/serverstatus/latest/.env.sample @@ -0,0 +1,5 @@ +CONTAINER_NAME="serverstatus" +PANEL_APP_PORT_HTTP=40269 +PANEL_APP_PORT_COMM=35601 +SERVERSTATUS_CONFIG_PATH="./data/server/config.json" +SERVERSTATUS_JSON_PATH="./data/web/json" diff --git a/apps/serverstatus/latest/data.yml b/apps/serverstatus/latest/data.yml new file mode 100644 index 00000000..ff64c231 --- /dev/null +++ b/apps/serverstatus/latest/data.yml @@ -0,0 +1,32 @@ +additionalProperties: + formFields: + - default: "./data/server/config.json" + disabled: true + envKey: SERVERSTATUS_CONFIG_PATH + labelEn: Server Status Config Path + labelZh: 服务器状态配置路径 + required: true + type: text + - default: "./data/web/json" + disabled: true + envKey: SERVERSTATUS_JSON_PATH + labelEn: Server Status Monthly Traffic State Path + labelZh: 探针月流量状态路径 + required: true + type: text + - default: "35601" + edit: true + envKey: PANEL_APP_PORT_COMM + labelEn: Communication Port + labelZh: 通信端口 + required: true + rule: paramPort + type: number + - default: "40269" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web 端口 + required: true + rule: paramPort + type: number diff --git a/apps/serverstatus/latest/data/server/config.json b/apps/serverstatus/latest/data/server/config.json new file mode 100644 index 00000000..fe6c42ac --- /dev/null +++ b/apps/serverstatus/latest/data/server/config.json @@ -0,0 +1,99 @@ +{ + "servers": [ + { + "username": "s01", + "name": "node1", + "type": "xen", + "host": "host1", + "location": "🇨🇳", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "username": "s02", + "name": "node2", + "type": "vmware", + "host": "host2", + "location": "🇯🇵", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "disabled": true, + "username": "s03", + "name": "node3", + "type": "hyper", + "host": "host3", + "location": "🇫🇷", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + }, + { + "username": "s04", + "name": "node4", + "type": "kvm", + "host": "host4", + "location": "🇰🇷", + "password": "USER_DEFAULT_PASSWORD", + "monthstart": 1 + } + ], + "monitors": [ + { + "name": "baidu", + "host": "https://www.baidu.com", + "interval": 300, + "type": "https" + }, + { + "name": "aliyun", + "host": "https://www.aliyun.com", + "interval": 300, + "type": "https" + }, + { + "name": "114", + "host": "114.114.114.114:53", + "interval": 300, + "type": "tcp" + } + ], + "watchdog": [ + { + "name": "cpu high warning,exclude username s01", + "rule": "cpu>90&load_1>5&username!='s01'", + "interval": 600, + "callback": "https://yourSMSurl" + }, + { + "name": "memory high warning, exclude less than 1GB vps", + "rule": "(memory_used/memory_total)*100>90&memory_total>1048576", + "interval": 300, + "callback": "https://yourSMSurl" + }, + { + "name": "offline warning", + "rule": "online4=0&online6=0", + "interval": 600, + "callback": "https://yourSMSurl" + }, + { + "name": "ddcc attack,limit type Oracle", + "rule": "tcp_count>600&type='Oracle'", + "interval": 300, + "callback": "https://yourSMSurl" + }, + { + "name": "month traffic warning", + "rule": "(network_out-last_network_out)/1024/1024/1024>999", + "interval": 3600, + "callback": "https://yourSMSurl" + }, + { + "name": "you can parse an expression combining any known field", + "rule": "load_5>3", + "interval": 900, + "callback": "https://yourSMSurl" + } + ] +} \ No newline at end of file diff --git a/apps/serverstatus/latest/docker-compose.yml b/apps/serverstatus/latest/docker-compose.yml new file mode 100644 index 00000000..5c26b713 --- /dev/null +++ b/apps/serverstatus/latest/docker-compose.yml @@ -0,0 +1,25 @@ +services: + serverstatus: + image: "cppla/serverstatus:latest" + healthcheck: + test: ["CMD-SHELL", "curl --fail http://localhost:80 || bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'"] + interval: 30s + timeout: 10s + retries: 5 + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - ${SERVERSTATUS_CONFIG_PATH}:/ServerStatus/server/config.json + - ${SERVERSTATUS_JSON_PATH}:/usr/share/nginx/html/json + ports: + - ${PANEL_APP_PORT_COMM}:35601 + - ${PANEL_APP_PORT_HTTP}:80 + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true + diff --git a/apps/serverstatus/logo.png b/apps/serverstatus/logo.png new file mode 100644 index 00000000..9cec3e62 Binary files /dev/null and b/apps/serverstatus/logo.png differ