mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-21 23:43:27 +01:00
Minor tweaks
This commit is contained in:
parent
2037d9aca6
commit
acb6757dc8
15
README.md
15
README.md
@ -209,7 +209,6 @@ Here are some examples of conditions you can use:
|
||||
|
||||
|
||||
#### Functions
|
||||
|
||||
| Function | Description | Example |
|
||||
|:-----------|:---------------------------------------------------------------------------------------------------------------- |:-------------------------- |
|
||||
| `len` | Returns the length of the object/slice. Works only with the `[BODY]` placeholder. | `len([BODY].username) > 8`
|
||||
@ -229,18 +228,20 @@ 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.
|
||||
Furthermore, the data is periodically persisted, but everything remains in memory.
|
||||
- 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
|
||||
(see [disable-monitoring-lock](#disable-monitoring-lock)), you may want to use
|
||||
- If `storage.type` is `sqlite`, `storage.file` must not be blank.
|
||||
|
||||
```yaml
|
||||
storage:
|
||||
type: sqlite
|
||||
file: data.db
|
||||
```
|
||||
|
||||
|
||||
### Alerting
|
||||
Gatus supports multiple alerting providers, such as Slack and PagerDuty, and supports different alerts for each
|
||||
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.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|
@ -39,12 +39,6 @@ var (
|
||||
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
|
||||
func Handle(securityConfig *security.Config, webConfig *config.WebConfig, enableMetrics bool) {
|
||||
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 {
|
||||
_ = tx.Rollback()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user