add monitoring
This commit is contained in:
16
config/health/resources/Database.yml
Normal file
16
config/health/resources/Database.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Database
|
||||
abbreviation: db
|
||||
checker: PragmaRX\Health\Checkers\Database
|
||||
notify: true
|
||||
column_size: 3
|
||||
targets:
|
||||
- users:
|
||||
type: "find_first_model"
|
||||
models:
|
||||
- "{{ config('auth.providers.users.model') }}"
|
||||
- "query speed":
|
||||
type: "raw_query"
|
||||
connection: "default"
|
||||
query: "select * from users u join password_resets pr on pr.email = u.email order by u.created_at desc"
|
||||
maximum_time: 0.05
|
||||
error_message: "Query took %sms when it should have last at most %sms"
|
||||
Reference in New Issue
Block a user