Minor tweaks

This commit is contained in:
TwinProduction 2021-07-18 16:39:57 -04:00 committed by Chris
parent 2037d9aca6
commit acb6757dc8
3 changed files with 9 additions and 14 deletions

View File

@ -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`
@ -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.
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
```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 |

View File

@ -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)

View File

@ -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()
}