diff --git a/README.md b/README.md index 258ad91b..19bddf76 100644 --- a/README.md +++ b/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 | diff --git a/controller/controller.go b/controller/controller.go index dcfdff4a..caaa6b77 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -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) diff --git a/storage/store/sqlite/sqlite.go b/storage/store/sqlite/sqlite.go index 573aa327..c4118d77 100644 --- a/storage/store/sqlite/sqlite.go +++ b/storage/store/sqlite/sqlite.go @@ -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() }