Update default interval to 60s
This commit is contained in:
parent
dad09e780e
commit
64a160923b
@ -50,7 +50,7 @@ metrics: true # Whether to expose metrics at /metrics
|
|||||||
services:
|
services:
|
||||||
- name: twinnation # Name of your service, can be anything
|
- name: twinnation # Name of your service, can be anything
|
||||||
url: "https://twinnation.org/health"
|
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:
|
conditions:
|
||||||
- "[STATUS] == 200" # Status must be 200
|
- "[STATUS] == 200" # Status must be 200
|
||||||
- "[BODY].status == UP" # The json path "$.status" must be equal to UP
|
- "[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[].name` | Name of the service. Can be anything. | Required `""` |
|
||||||
| `services[].url` | URL to send the request to | Required `""` |
|
| `services[].url` | URL to send the request to | Required `""` |
|
||||||
| `services[].conditions` | Conditions used to determine the health of the service | `[]` |
|
| `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[].method` | Request method | `GET` |
|
||||||
| `services[].graphql` | Whether to wrap the body in a query param (`{"query":"$body"}`) | `false` |
|
| `services[].graphql` | Whether to wrap the body in a query param (`{"query":"$body"}`) | `false` |
|
||||||
| `services[].body` | Request body | `""` |
|
| `services[].body` | Request body | `""` |
|
||||||
|
@ -34,7 +34,7 @@ type Service struct {
|
|||||||
func (service *Service) Validate() {
|
func (service *Service) Validate() {
|
||||||
// Set default values
|
// Set default values
|
||||||
if service.Interval == 0 {
|
if service.Interval == 0 {
|
||||||
service.Interval = 10 * time.Second
|
service.Interval = 1 * time.Minute
|
||||||
}
|
}
|
||||||
if len(service.Method) == 0 {
|
if len(service.Method) == 0 {
|
||||||
service.Method = http.MethodGet
|
service.Method = http.MethodGet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user