mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
Minor tweaks
This commit is contained in:
parent
2037d9aca6
commit
acb6757dc8
11
README.md
11
README.md
@ -209,7 +209,6 @@ Here are some examples of conditions you can use:
|
|||||||
|
|
||||||
|
|
||||||
#### Functions
|
#### Functions
|
||||||
|
|
||||||
| Function | Description | Example |
|
| Function | Description | Example |
|
||||||
|:-----------|:---------------------------------------------------------------------------------------------------------------- |:-------------------------- |
|
|:-----------|:---------------------------------------------------------------------------------------------------------------- |:-------------------------- |
|
||||||
| `len` | Returns the length of the object/slice. Works only with the `[BODY]` placeholder. | `len([BODY].username) > 8`
|
| `len` | Returns the length of the object/slice. Works only with the `[BODY]` placeholder. | `len([BODY].username) > 8`
|
||||||
@ -230,17 +229,19 @@ Here are some examples of conditions you can use:
|
|||||||
- If `storage.type` is `inmemory` (default) and `storage.file` is set to a non-blank value.
|
- If `storage.type` is `inmemory` (default) and `storage.file` is set to a non-blank value.
|
||||||
Furthermore, the data is periodically persisted, but everything remains in memory.
|
Furthermore, the data is periodically persisted, but everything remains in memory.
|
||||||
- If `storage.type` is `sqlite`, `storage.file` must not be blank.
|
- If `storage.type` is `sqlite`, `storage.file` must not be blank.
|
||||||
Furthermore, the data is persisted and accessed through SQLite.
|
|
||||||
|
|
||||||
For normal use, both storage types will work without a hitch, however, if you're using Gatus for stress testing purposes
|
```yaml
|
||||||
(see [disable-monitoring-lock](#disable-monitoring-lock)), you may want to use
|
storage:
|
||||||
|
type: sqlite
|
||||||
|
file: data.db
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Alerting
|
### Alerting
|
||||||
Gatus supports multiple alerting providers, such as Slack and PagerDuty, and supports different alerts for each
|
Gatus supports multiple alerting providers, such as Slack and PagerDuty, and supports different alerts for each
|
||||||
individual services with configurable descriptions and thresholds.
|
individual services with configurable descriptions and thresholds.
|
||||||
|
|
||||||
Note that if an alerting provider is not configured properly, all alerts configured with the provider's type will be
|
Note that if an alerting provider is not properly configured, all alerts configured with the provider's type will be
|
||||||
ignored.
|
ignored.
|
||||||
|
|
||||||
| Parameter | Description | Default |
|
| Parameter | Description | Default |
|
||||||
|
@ -39,12 +39,6 @@ var (
|
|||||||
server *http.Server
|
server *http.Server
|
||||||
)
|
)
|
||||||
|
|
||||||
//func init() { XXX: Don't think there's any value in using the janitor since the cache max size is this small
|
|
||||||
// if err := cache.StartJanitor(); err != nil {
|
|
||||||
// log.Fatal("[controller][init] Failed to start cache janitor:", err.Error())
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// Handle creates the router and starts the server
|
// Handle creates the router and starts the server
|
||||||
func Handle(securityConfig *security.Config, webConfig *config.WebConfig, enableMetrics bool) {
|
func Handle(securityConfig *security.Config, webConfig *config.WebConfig, enableMetrics bool) {
|
||||||
var router http.Handler = CreateRouter(securityConfig, enableMetrics)
|
var router http.Handler = CreateRouter(securityConfig, enableMetrics)
|
||||||
|
@ -299,7 +299,7 @@ func (s *Store) Insert(service *core.Service, result *core.Result) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//log.Printf("[sqlite][Insert] Successfully inserted result in duration=%dns", time.Since(start).Nanoseconds())
|
//log.Printf("[sqlite][Insert] Successfully inserted result in duration=%dms", time.Since(start).Milliseconds())
|
||||||
if err = tx.Commit(); err != nil {
|
if err = tx.Commit(); err != nil {
|
||||||
_ = tx.Rollback()
|
_ = tx.Rollback()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user