Update default interval to 60s

This commit is contained in:
TwinProduction 2020-09-01 00:25:57 -04:00
parent dad09e780e
commit 64a160923b
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ metrics: true # Whether to expose metrics at /metrics
services:
- name: twinnation # Name of your service, can be anything
url: "https://twinnation.org/health"
interval: 30s # Duration to wait between every status check (default: 10s)
interval: 30s # Duration to wait between every status check (default: 60s)
conditions:
- "[STATUS] == 200" # Status must be 200
- "[BODY].status == UP" # The json path "$.status" must be equal to UP
@ -78,7 +78,7 @@ Note that you can also add environment variables in the your configuration file
| `services[].name` | Name of the service. Can be anything. | Required `""` |
| `services[].url` | URL to send the request to | Required `""` |
| `services[].conditions` | Conditions used to determine the health of the service | `[]` |
| `services[].interval` | Duration to wait between every status check | `10s` |
| `services[].interval` | Duration to wait between every status check | `60s` |
| `services[].method` | Request method | `GET` |
| `services[].graphql` | Whether to wrap the body in a query param (`{"query":"$body"}`) | `false` |
| `services[].body` | Request body | `""` |

View File

@ -34,7 +34,7 @@ type Service struct {
func (service *Service) Validate() {
// Set default values
if service.Interval == 0 {
service.Interval = 10 * time.Second
service.Interval = 1 * time.Minute
}
if len(service.Method) == 0 {
service.Method = http.MethodGet