Trình giám sát máy chủ

GET https://dwandev.com/api/server-monitors/
curl --request GET \
--url 'https://dwandev.com/api/server-monitors/' \
--header 'Authorization: Bearer {api_key}' \
Tham số Chi tiết Mô tả
page Tùy chọn Số nguyên Số trang mà bạn muốn lấy kết quả. Mặc định là 1.
results_per_page Tùy chọn Số nguyên Số lượng kết quả bạn muốn trên mỗi trang. Giá trị cho phép là: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Mặc định là 25.
{ "data": [ { "id": 1, "project_id": 0, "name": "Sample", "target": "123.123.123.123", "settings": { "server_check_interval_seconds": 60 }, "cpu_usage": 0.7, "ram_usage": 30.65, "disk_usage": 16.49, "cpu_load_1": 0, "cpu_load_5": 0, "cpu_load_15": 0, "is_enabled": true, "total_logs": 100, "last_log_datetime": "2024-01-14 02:45:05", "datetime": "2025-04-12 06:02:27", "last_datetime": null } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://dwandev.com/api/server-monitors?&page=1", "last": "https://dwandev.com/api/server-monitors?&page=1", "next": null, "prev": null, "self": "https://dwandev.com/api/server-monitors?&page=1" } }
GET https://dwandev.com/api/server-monitors/{server_monitor_id}
curl --request GET \
--url 'https://dwandev.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "project_id": 0, "name": "Sample", "target": "123.123.123.123", "settings": { "server_check_interval_seconds": 60 }, "cpu_usage": 0.7, "ram_usage": 30.65, "disk_usage": 16.49, "cpu_load_1": 0, "cpu_load_5": 0, "cpu_load_15": 0, "is_enabled": true, "total_logs": 100, "last_log_datetime": "2024-01-14 02:45:05", "datetime": "2025-04-12 06:02:27", "last_datetime": null } }
POST https://dwandev.com/api/server-monitors
Tham số Chi tiết Mô tả
name Bắt buộc Chuỗi -
target Bắt buộc Chuỗi -
project_id Tùy chọn Số nguyên -
notifications Tùy chọn Mảng ID trình xử lý thông báo
server_check_interval_seconds Tùy chọn Số nguyên Giá trị cho phép: 60, 300, 600, 900, 1800 (giây)
alert_metric[key] Tùy chọn Chuỗi Giá trị cho phép: cpu_usage, disk_usage, ram_usage
alert_rule[key] Tùy chọn Chuỗi Giá trị cho phép: is_higher, is_lower
alert_value[key] Tùy chọn Chuỗi Giá trị cho phép: 1-99
alert_trigger[key] Tùy chọn Chuỗi Giá trị cho phép: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
is_enabled Tùy chọn Boolean -
curl --request POST \
--url 'https://dwandev.com/api/server-monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=example.com' \
{ "data": { "id": 1 } }
POST https://dwandev.com/api/server-monitors/{server_monitor_id}
Tham số Chi tiết Mô tả
name Bắt buộc Chuỗi -
target Bắt buộc Chuỗi -
project_id Tùy chọn Số nguyên -
notifications Tùy chọn Mảng ID trình xử lý thông báo
server_check_interval_seconds Tùy chọn Số nguyên Giá trị cho phép: 60, 300, 600, 900, 1800 (giây)
alert_metric[key] Tùy chọn Chuỗi Giá trị cho phép: cpu_usage, disk_usage, ram_usage
alert_rule[key] Tùy chọn Chuỗi Giá trị cho phép: is_higher, is_lower
alert_value[key] Tùy chọn Chuỗi Giá trị cho phép: 1-99
alert_trigger[key] Tùy chọn Chuỗi Giá trị cho phép: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
is_enabled Tùy chọn Boolean -
curl --request POST \
--url 'https://dwandev.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
{ "data": { "id": 1 } }
DELETE https://dwandev.com/api/server-monitors/{server_monitor_id}
curl --request DELETE \
--url 'https://dwandev.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \