diff --git a/docs/customservices.md b/docs/customservices.md index c1f0812..41c0402 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -18,6 +18,7 @@ within Homer: - [Docker Socket Proxy](#docker-socket-proxy) - [Emby / Jellyfin](#emby--jellyfin) - [FreshRSS](#freshrss) +- [Gatus](#gatus) - [Gitea / Forgejo](#gitea--forgejo) - [Glances](#glances) - [Gotify](#gotify) @@ -154,6 +155,32 @@ The FreshRSS service displays unread and subscriptions counts from your FreshRSS updateInterval: 5000 # (Optional) Interval (in ms) for updating the stats ``` +## Gatus + +The Gatus service displays information about the configured services from the defined Gatus server. +Two lines are needed in the config.yml : + +```yaml + type: "Gatus" + url: "http://192.168.0.151/gatus" + +``` + +Optionally, the results can be filtered to only include jobs in the defined groups: +```yaml + groups: [Services, External] +``` + +The status can be checked regularly by defining an update Interval in ms: +```yaml + updateInterval: 5000 +``` + +The average times can be hidden (saves their calculation also) by setting the following: +```yaml + hideaverages: true +``` + ## Gitea / Forgejo This service displays a version string instead of a subtitle. Example configuration: diff --git a/dummy-data/gatus/api/v1/endpoints/statuses b/dummy-data/gatus/api/v1/endpoints/statuses new file mode 100644 index 0000000..1f97de5 --- /dev/null +++ b/dummy-data/gatus/api/v1/endpoints/statuses @@ -0,0 +1,211 @@ +[ + { + "name": "Gateway", + "group": "Services", + "key": "services_gateway", + "results": [ + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:35:41.784208588Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:40:41.804489793Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:45:41.837925713Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:50:41.848391366Z" + } + ] + }, + { + "name": "Website", + "group": "External", + "key": "external_website", + "results": [ + { + "status": 200, + "hostname": "www.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": false + } + ], + "success": false, + "timestamp": "2025-05-26T07:35:41.784208588Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": false + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": false, + "timestamp": "2025-05-26T07:40:41.804489793Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:45:41.837925713Z" + }, + { + "status": 200, + "hostname": "gateway.example.com", + "duration": 10000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": true + }, + { + "condition": "[RESPONSE_TIME] < 500", + "success": true + } + ], + "success": true, + "timestamp": "2025-05-26T07:50:41.848391366Z" + } + ] + }, + { + "name": "DNS", + "group": "Services", + "key": "services_dns", + "results": [ + { + "status": 200, + "hostname": "ns1.example", + "duration": 20000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": false + } + ], + "success": false, + "timestamp": "2025-05-26T07:35:41.784208588Z" + }, + { + "status": 200, + "hostname": "ns1.example.com", + "duration": 20000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": false + } + ], + "success": false, + "timestamp": "2025-05-26T07:40:41.804489793Z" + }, + { + "status": 200, + "hostname": "ns1.example.com", + "duration": 20000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": false + } + ], + "success": false, + "timestamp": "2025-05-26T07:45:41.837925713Z" + }, + { + "status": 200, + "hostname": "ns1.example.com", + "duration": 20000, + "conditionResults": [ + { + "condition": "[STATUS] == 200", + "success": false + } + ], + "success": false, + "timestamp": "2025-05-26T07:50:41.848391366Z" + } + ] + } +] diff --git a/src/components/services/Gatus.vue b/src/components/services/Gatus.vue new file mode 100644 index 0000000..01ec347 --- /dev/null +++ b/src/components/services/Gatus.vue @@ -0,0 +1,153 @@ + + + + +