Domain migration

This commit is contained in:
TwinProduction 2021-09-18 12:42:11 -04:00
parent 9bd5c38a96
commit 044f0454f8
8 changed files with 116 additions and 117 deletions

View File

@ -14,7 +14,7 @@ the response time, the certificate expiration, the body and many others. The ici
checks can be paired with alerting via Slack, PagerDuty, Discord and even Twilio. checks can be paired with alerting via Slack, PagerDuty, Discord and even Twilio.
I personally deploy it in my Kubernetes cluster and let it monitor the status of my I personally deploy it in my Kubernetes cluster and let it monitor the status of my
core applications: https://status.twinnation.org/ core applications: https://status.twin.sh/
<details> <details>
<summary><b>Quick start</b></summary> <summary><b>Quick start</b></summary>
@ -101,7 +101,7 @@ The main features of Gatus are:
- **Alerting**: While having a pretty visual dashboard is useful to keep track of the state of your application(s), you probably don't want to stare at it all day. Thus, notifications via Slack, Mattermost, Messagebird, PagerDuty, Twilio and Teams are supported out of the box with the ability to configure a custom alerting provider for any needs you might have, whether it be a different provider or a custom application that manages automated rollbacks. - **Alerting**: While having a pretty visual dashboard is useful to keep track of the state of your application(s), you probably don't want to stare at it all day. Thus, notifications via Slack, Mattermost, Messagebird, PagerDuty, Twilio and Teams are supported out of the box with the ability to configure a custom alerting provider for any needs you might have, whether it be a different provider or a custom application that manages automated rollbacks.
- **Metrics** - **Metrics**
- **Low resource consumption**: As with most Go applications, the resource footprint that this application requires is negligibly small. - **Low resource consumption**: As with most Go applications, the resource footprint that this application requires is negligibly small.
- **[Badges](#badges)**: ![Uptime 7d](https://status.twinnation.org/api/v1/services/core_website-external/uptimes/7d/badge.svg) ![Response time 24h](https://status.twinnation.org/api/v1/services/core_website-external/response-times/24h/badge.svg) - **[Badges](#badges)**: ![Uptime 7d](https://status.twin.sh/api/v1/services/core_website-external/uptimes/7d/badge.svg) ![Response time 24h](https://status.twin.sh/api/v1/services/core_website-external/response-times/24h/badge.svg)
## Usage ## Usage
@ -114,8 +114,8 @@ Here's a simple example:
```yaml ```yaml
metrics: true # Whether to expose metrics at /metrics metrics: true # Whether to expose metrics at /metrics
services: services:
- name: twinnation # Name of your service, can be anything - name: website # Name of your service, can be anything
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s # Duration to wait between every status check (default: 60s) interval: 30s # Duration to wait between every status check (default: 60s)
conditions: conditions:
- "[STATUS] == 200" # Status must be 200 - "[STATUS] == 200" # Status must be 200
@ -282,8 +282,8 @@ Note that this configuration is only available under `services[]`, `alerting.mat
Here's an example with the client configuration under `service[]`: Here's an example with the client configuration under `service[]`:
```yaml ```yaml
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
client: client:
insecure: false insecure: false
ignore-redirect: false ignore-redirect: false
@ -326,8 +326,8 @@ alerting:
webhook-url: "https://discord.com/api/webhooks/**********/**********" webhook-url: "https://discord.com/api/webhooks/**********/**********"
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -357,8 +357,8 @@ alerting:
insecure: true insecure: true
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -393,9 +393,9 @@ alerting:
originator: "31619191918" originator: "31619191918"
recipients: "31619191919,31619191920" recipients: "31619191919,31619191920"
services: services:
- name: twinnation - name: website
interval: 30s interval: 30s
url: "https://twinnation.org/health" url: "https://twin.sh/health"
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
- "[BODY].status == UP" - "[BODY].status == UP"
@ -427,8 +427,8 @@ alerting:
integration-key: "********************************" integration-key: "********************************"
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -457,8 +457,8 @@ alerting:
webhook-url: "https://hooks.slack.com/services/**********/**********/**********" webhook-url: "https://hooks.slack.com/services/**********/**********/**********"
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -494,8 +494,8 @@ alerting:
webhook-url: "https://********.webhook.office.com/webhookb2/************" webhook-url: "https://********.webhook.office.com/webhookb2/************"
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -527,8 +527,8 @@ alerting:
id: "0123456789" id: "0123456789"
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -563,9 +563,9 @@ alerting:
to: "+1-234-567-8901" to: "+1-234-567-8901"
services: services:
- name: twinnation - name: website
interval: 30s interval: 30s
url: "https://twinnation.org/health" url: "https://twin.sh/health"
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
- "[BODY].status == UP" - "[BODY].status == UP"
@ -616,8 +616,8 @@ alerting:
"text": "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]" "text": "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]"
} }
services: services:
- name: twinnation - name: website
url: "https://twinnation.org/health" url: "https://twin.sh/health"
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -1048,9 +1048,9 @@ web:
### Badges ### Badges
### Uptime ### Uptime
![Uptime 1h](https://status.twinnation.org/api/v1/services/core_website-external/uptimes/1h/badge.svg) ![Uptime 1h](https://status.twin.sh/api/v1/services/core_website-external/uptimes/1h/badge.svg)
![Uptime 24h](https://status.twinnation.org/api/v1/services/core_website-external/uptimes/24h/badge.svg) ![Uptime 24h](https://status.twin.sh/api/v1/services/core_website-external/uptimes/24h/badge.svg)
![Uptime 7d](https://status.twinnation.org/api/v1/services/core_website-external/uptimes/7d/badge.svg) ![Uptime 7d](https://status.twin.sh/api/v1/services/core_website-external/uptimes/7d/badge.svg)
Gatus can automatically generate a SVG badge for one of your monitored services. Gatus can automatically generate a SVG badge for one of your monitored services.
This allows you to put badges in your individual services' README or even create your own status page, if you This allows you to put badges in your individual services' README or even create your own status page, if you
@ -1075,15 +1075,15 @@ https://example.com/api/v1/services/_frontend/uptimes/7d/badge.svg
``` ```
Example: Example:
``` ```
![Uptime 24h](https://status.twinnation.org/api/v1/services/core_website-external/uptimes/24h/badge.svg) ![Uptime 24h](https://status.twin.sh/api/v1/services/core_website-external/uptimes/24h/badge.svg)
``` ```
If you'd like to see a visual example of each badges available, you can simply navigate to the service's detail page. If you'd like to see a visual example of each badges available, you can simply navigate to the service's detail page.
### Response time ### Response time
![Response time 1h](https://status.twinnation.org/api/v1/services/core_website-external/response-times/1h/badge.svg) ![Response time 1h](https://status.twin.sh/api/v1/services/core_website-external/response-times/1h/badge.svg)
![Response time 24h](https://status.twinnation.org/api/v1/services/core_website-external/response-times/24h/badge.svg) ![Response time 24h](https://status.twin.sh/api/v1/services/core_website-external/response-times/24h/badge.svg)
![Response time 7d](https://status.twinnation.org/api/v1/services/core_website-external/response-times/7d/badge.svg) ![Response time 7d](https://status.twin.sh/api/v1/services/core_website-external/response-times/7d/badge.svg)
The endpoint to generate a badge is the following: The endpoint to generate a badge is the following:
``` ```
@ -1101,13 +1101,13 @@ All services are available via a GET request to the following endpoint:
``` ```
/api/v1/services/statuses /api/v1/services/statuses
```` ````
Example: https://status.twinnation.org/api/v1/services/statuses Example: https://status.twin.sh/api/v1/services/statuses
Specific services can also be queried by using the following pattern: Specific services can also be queried by using the following pattern:
``` ```
/api/v1/services/{group}_{service}/statuses /api/v1/services/{group}_{service}/statuses
``` ```
Example: https://status.twinnation.org/api/v1/services/core_website-home/statuses Example: https://status.twin.sh/api/v1/services/core_website-home/statuses
Gzip compression will be used if the `Accept-Encoding` HTTP header contains `gzip`. Gzip compression will be used if the `Accept-Encoding` HTTP header contains `gzip`.

View File

@ -37,7 +37,6 @@ func (provider *AlertProvider) ToCustomAlertProvider(service *core.Service, aler
} else { } else {
message = fmt.Sprintf("TRIGGERED: %s - %s", service.Name, alert.GetDescription()) message = fmt.Sprintf("TRIGGERED: %s - %s", service.Name, alert.GetDescription())
} }
return &custom.AlertProvider{ return &custom.AlertProvider{
URL: restAPIURL, URL: restAPIURL,
Method: http.MethodPost, Method: http.MethodPost,

View File

@ -46,8 +46,8 @@ storage:
ui: ui:
title: Test title: Test
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
interval: 15s interval: 15s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
@ -83,8 +83,8 @@ services:
t.Error("Should have returned two services") t.Error("Should have returned two services")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Method != "GET" { if config.Services[0].Method != "GET" {
t.Errorf("Method should have been %s (default)", "GET") t.Errorf("Method should have been %s (default)", "GET")
@ -153,8 +153,8 @@ services:
func TestParseAndValidateConfigBytesDefault(t *testing.T) { func TestParseAndValidateConfigBytesDefault(t *testing.T) {
config, err := parseAndValidateConfigBytes([]byte(` config, err := parseAndValidateConfigBytes([]byte(`
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -173,8 +173,8 @@ services:
if config.Web.Port != DefaultPort { if config.Web.Port != DefaultPort {
t.Errorf("Port should have been %d, because it is the default value", DefaultPort) t.Errorf("Port should have been %d, because it is the default value", DefaultPort)
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -195,8 +195,8 @@ func TestParseAndValidateConfigBytesWithAddress(t *testing.T) {
web: web:
address: 127.0.0.1 address: 127.0.0.1
services: services:
- name: twinnation - name: website
url: https://twinnation.org/actuator/health url: https://twin.sh/actuator/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -209,8 +209,8 @@ services:
if config.Metrics { if config.Metrics {
t.Error("Metrics should've been false by default") t.Error("Metrics should've been false by default")
} }
if config.Services[0].URL != "https://twinnation.org/actuator/health" { if config.Services[0].URL != "https://twin.sh/actuator/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/actuator/health") t.Errorf("URL should have been %s", "https://twin.sh/actuator/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -228,8 +228,8 @@ func TestParseAndValidateConfigBytesWithPort(t *testing.T) {
web: web:
port: 12345 port: 12345
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -242,8 +242,8 @@ services:
if config.Metrics { if config.Metrics {
t.Error("Metrics should've been false by default") t.Error("Metrics should've been false by default")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -262,8 +262,8 @@ web:
port: 12345 port: 12345
address: 127.0.0.1 address: 127.0.0.1
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -276,8 +276,8 @@ services:
if config.Metrics { if config.Metrics {
t.Error("Metrics should've been false by default") t.Error("Metrics should've been false by default")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -296,8 +296,8 @@ web:
port: 65536 port: 65536
address: 127.0.0.1 address: 127.0.0.1
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -310,8 +310,8 @@ func TestParseAndValidateConfigBytesWithMetricsAndCustomUserAgentHeader(t *testi
config, err := parseAndValidateConfigBytes([]byte(` config, err := parseAndValidateConfigBytes([]byte(`
metrics: true metrics: true
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
headers: headers:
User-Agent: Test/2.0 User-Agent: Test/2.0
conditions: conditions:
@ -326,8 +326,8 @@ services:
if !config.Metrics { if !config.Metrics {
t.Error("Metrics should have been true") t.Error("Metrics should have been true")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -350,8 +350,8 @@ web:
address: 192.168.0.1 address: 192.168.0.1
port: 9090 port: 9090
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -370,8 +370,8 @@ services:
if config.Web.Port != 9090 { if config.Web.Port != 9090 {
t.Errorf("Port should have been %d, because it is specified in config", 9090) t.Errorf("Port should have been %d, because it is specified in config", 9090)
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -427,8 +427,8 @@ alerting:
webhook-url: "http://example.com" webhook-url: "http://example.com"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: slack - type: slack
enabled: true enabled: true
@ -471,8 +471,8 @@ services:
if len(config.Services) != 1 { if len(config.Services) != 1 {
t.Error("There should've been 1 service") t.Error("There should've been 1 service")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -633,8 +633,8 @@ alerting:
enabled: true enabled: true
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: slack - type: slack
- type: pagerduty - type: pagerduty
@ -748,8 +748,8 @@ services:
if len(config.Services) != 1 { if len(config.Services) != 1 {
t.Error("There should've been 1 service") t.Error("There should've been 1 service")
} }
if config.Services[0].URL != "https://twinnation.org/health" { if config.Services[0].URL != "https://twin.sh/health" {
t.Errorf("URL should have been %s", "https://twinnation.org/health") t.Errorf("URL should have been %s", "https://twin.sh/health")
} }
if config.Services[0].Interval != 60*time.Second { if config.Services[0].Interval != 60*time.Second {
t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second) t.Errorf("Interval should have been %s, because it is the default value", 60*time.Second)
@ -871,8 +871,8 @@ alerting:
description: "description" description: "description"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: slack - type: slack
failure-threshold: 10 failure-threshold: 10
@ -946,8 +946,8 @@ alerting:
pagerduty: pagerduty:
integration-key: "INVALID_KEY" integration-key: "INVALID_KEY"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: pagerduty - type: pagerduty
conditions: conditions:
@ -980,8 +980,8 @@ alerting:
"text": "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]" "text": "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]"
} }
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: custom - type: custom
conditions: conditions:
@ -1025,8 +1025,8 @@ alerting:
insecure: true insecure: true
body: "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]" body: "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: custom - type: custom
conditions: conditions:
@ -1065,8 +1065,8 @@ alerting:
url: "https://example.com" url: "https://example.com"
body: "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]" body: "[ALERT_TRIGGERED_OR_RESOLVED]: [SERVICE_NAME] - [ALERT_DESCRIPTION]"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
alerts: alerts:
- type: custom - type: custom
conditions: conditions:
@ -1099,7 +1099,7 @@ func TestParseAndValidateConfigBytesWithInvalidServiceName(t *testing.T) {
_, err := parseAndValidateConfigBytes([]byte(` _, err := parseAndValidateConfigBytes([]byte(`
services: services:
- name: "" - name: ""
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -1145,8 +1145,8 @@ security:
username: "admin" username: "admin"
password-sha512: "invalid-sha512-hash" password-sha512: "invalid-sha512-hash"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`)) `))
@ -1164,8 +1164,8 @@ security:
username: "%s" username: "%s"
password-sha512: "%s" password-sha512: "%s"
services: services:
- name: twinnation - name: website
url: https://twinnation.org/health url: https://twin.sh/health
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"
`, expectedUsername, expectedPasswordHash))) `, expectedUsername, expectedPasswordHash)))

View File

@ -25,8 +25,8 @@ func TestService_IsEnabled(t *testing.T) {
func TestService_ValidateAndSetDefaults(t *testing.T) { func TestService_ValidateAndSetDefaults(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
Alerts: []*alert.Alert{{Type: alert.TypePagerDuty}}, Alerts: []*alert.Alert{{Type: alert.TypePagerDuty}},
} }
@ -70,8 +70,8 @@ func TestService_ValidateAndSetDefaults(t *testing.T) {
func TestService_ValidateAndSetDefaultsWithClientConfig(t *testing.T) { func TestService_ValidateAndSetDefaultsWithClientConfig(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
ClientConfig: &client.Config{ ClientConfig: &client.Config{
Insecure: true, Insecure: true,
@ -159,8 +159,8 @@ func TestService_ValidateAndSetDefaultsWithDNS(t *testing.T) {
func TestService_buildHTTPRequest(t *testing.T) { func TestService_buildHTTPRequest(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
} }
service.ValidateAndSetDefaults() service.ValidateAndSetDefaults()
@ -168,8 +168,8 @@ func TestService_buildHTTPRequest(t *testing.T) {
if request.Method != "GET" { if request.Method != "GET" {
t.Error("request.Method should've been GET, but was", request.Method) t.Error("request.Method should've been GET, but was", request.Method)
} }
if request.Host != "twinnation.org" { if request.Host != "twin.sh" {
t.Error("request.Host should've been twinnation.org, but was", request.Host) t.Error("request.Host should've been twin.sh, but was", request.Host)
} }
if userAgent := request.Header.Get("User-Agent"); userAgent != GatusUserAgent { if userAgent := request.Header.Get("User-Agent"); userAgent != GatusUserAgent {
t.Errorf("request.Header.Get(User-Agent) should've been %s, but was %s", GatusUserAgent, userAgent) t.Errorf("request.Header.Get(User-Agent) should've been %s, but was %s", GatusUserAgent, userAgent)
@ -179,8 +179,8 @@ func TestService_buildHTTPRequest(t *testing.T) {
func TestService_buildHTTPRequestWithCustomUserAgent(t *testing.T) { func TestService_buildHTTPRequestWithCustomUserAgent(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
Headers: map[string]string{ Headers: map[string]string{
"User-Agent": "Test/2.0", "User-Agent": "Test/2.0",
@ -191,8 +191,8 @@ func TestService_buildHTTPRequestWithCustomUserAgent(t *testing.T) {
if request.Method != "GET" { if request.Method != "GET" {
t.Error("request.Method should've been GET, but was", request.Method) t.Error("request.Method should've been GET, but was", request.Method)
} }
if request.Host != "twinnation.org" { if request.Host != "twin.sh" {
t.Error("request.Host should've been twinnation.org, but was", request.Host) t.Error("request.Host should've been twin.sh, but was", request.Host)
} }
if userAgent := request.Header.Get("User-Agent"); userAgent != "Test/2.0" { if userAgent := request.Header.Get("User-Agent"); userAgent != "Test/2.0" {
t.Errorf("request.Header.Get(User-Agent) should've been %s, but was %s", "Test/2.0", userAgent) t.Errorf("request.Header.Get(User-Agent) should've been %s, but was %s", "Test/2.0", userAgent)
@ -202,8 +202,8 @@ func TestService_buildHTTPRequestWithCustomUserAgent(t *testing.T) {
func TestService_buildHTTPRequestWithHostHeader(t *testing.T) { func TestService_buildHTTPRequestWithHostHeader(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "POST", Method: "POST",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
Headers: map[string]string{ Headers: map[string]string{
@ -223,8 +223,8 @@ func TestService_buildHTTPRequestWithHostHeader(t *testing.T) {
func TestService_buildHTTPRequestWithGraphQLEnabled(t *testing.T) { func TestService_buildHTTPRequestWithGraphQLEnabled(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
service := Service{ service := Service{
Name: "twinnation-graphql", Name: "website-graphql",
URL: "https://twinnation.org/graphql", URL: "https://twin.sh/graphql",
Method: "POST", Method: "POST",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
GraphQL: true, GraphQL: true,
@ -255,8 +255,8 @@ func TestIntegrationEvaluateHealth(t *testing.T) {
condition := Condition("[STATUS] == 200") condition := Condition("[STATUS] == 200")
bodyCondition := Condition("[BODY].status == UP") bodyCondition := Condition("[BODY].status == UP")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition, &bodyCondition}, Conditions: []*Condition{&condition, &bodyCondition},
} }
service.ValidateAndSetDefaults() service.ValidateAndSetDefaults()
@ -275,8 +275,8 @@ func TestIntegrationEvaluateHealth(t *testing.T) {
func TestIntegrationEvaluateHealthWithFailure(t *testing.T) { func TestIntegrationEvaluateHealthWithFailure(t *testing.T) {
condition := Condition("[STATUS] == 500") condition := Condition("[STATUS] == 500")
service := Service{ service := Service{
Name: "twinnation-health", Name: "website-health",
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Conditions: []*Condition{&condition}, Conditions: []*Condition{&condition},
} }
service.ValidateAndSetDefaults() service.ValidateAndSetDefaults()

View File

@ -39,9 +39,9 @@ alerting:
You can now add alerts of type `pagerduty` in the services you've defined, like so: You can now add alerts of type `pagerduty` in the services you've defined, like so:
```yaml ```yaml
services: services:
- name: twinnation - name: website
interval: 30s interval: 30s
url: "https://twinnation.org/health" url: "https://twin.sh/health"
alerts: alerts:
- type: pagerduty - type: pagerduty
enabled: true enabled: true
@ -56,7 +56,7 @@ services:
``` ```
The sample above will do the following: The sample above will do the following:
- Send a request to the `https://twinnation.org/health` (`services[].url`) specified every **30s** (`services[].interval`) - Send a request to the `https://twin.sh/health` (`services[].url`) specified every **30s** (`services[].interval`)
- Evaluate the conditions to determine whether the service is "healthy" or not - Evaluate the conditions to determine whether the service is "healthy" or not
- **If all conditions are not met 3 (`services[].alerts[].failure-threshold`) times in a row**: Gatus will create a new incident - **If all conditions are not met 3 (`services[].alerts[].failure-threshold`) times in a row**: Gatus will create a new incident
- **If, after an incident has been triggered, all conditions are met 5 (`services[].alerts[].success-threshold`) times in a row _AND_ `services[].alerts[].send-on-resolved` is set to `true`**: Gatus will resolve the triggered incident - **If, after an incident has been triggered, all conditions are met 5 (`services[].alerts[].success-threshold`) times in a row _AND_ `services[].alerts[].send-on-resolved` is set to `true`**: Gatus will resolve the triggered incident

View File

@ -1,7 +1,7 @@
metrics: true metrics: true
services: services:
- name: TwiNNatioN - name: TwiNNatioN
url: https://twinnation.org/health url: https://twin.sh/health
interval: 30s interval: 30s
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"

View File

@ -4,7 +4,7 @@ data:
metrics: true metrics: true
services: services:
- name: TwiNNatioN - name: TwiNNatioN
url: https://twinnation.org/health url: https://twin.sh/health
interval: 1m interval: 1m
conditions: conditions:
- "[STATUS] == 200" - "[STATUS] == 200"

View File

@ -20,7 +20,7 @@ func TestHandleAlerting(t *testing.T) {
Debug: true, Debug: true,
Alerting: &alerting.Config{ Alerting: &alerting.Config{
Custom: &custom.AlertProvider{ Custom: &custom.AlertProvider{
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "GET", Method: "GET",
}, },
}, },
@ -99,7 +99,7 @@ func TestHandleAlertingWhenTriggeredAlertIsAlmostResolvedButServiceStartFailingA
Debug: true, Debug: true,
Alerting: &alerting.Config{ Alerting: &alerting.Config{
Custom: &custom.AlertProvider{ Custom: &custom.AlertProvider{
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "GET", Method: "GET",
}, },
}, },
@ -133,7 +133,7 @@ func TestHandleAlertingWhenTriggeredAlertIsResolvedButSendOnResolvedIsFalse(t *t
Debug: true, Debug: true,
Alerting: &alerting.Config{ Alerting: &alerting.Config{
Custom: &custom.AlertProvider{ Custom: &custom.AlertProvider{
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "GET", Method: "GET",
}, },
}, },
@ -202,7 +202,7 @@ func TestHandleAlertingWithProviderThatReturnsAnError(t *testing.T) {
Debug: true, Debug: true,
Alerting: &alerting.Config{ Alerting: &alerting.Config{
Custom: &custom.AlertProvider{ Custom: &custom.AlertProvider{
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "GET", Method: "GET",
}, },
}, },
@ -260,7 +260,7 @@ func TestHandleAlertingWithProviderThatOnlyReturnsErrorOnResolve(t *testing.T) {
Debug: true, Debug: true,
Alerting: &alerting.Config{ Alerting: &alerting.Config{
Custom: &custom.AlertProvider{ Custom: &custom.AlertProvider{
URL: "https://twinnation.org/health", URL: "https://twin.sh/health",
Method: "GET", Method: "GET",
}, },
}, },