Database monitoring feature allows to run a query during every check and react in the appropriate way on the result. Also, it is possible to check just possibility to connect to DB - by ignoring the query field. To set the monitoring, fill the connection data: DB server address, port, database name, login and password of a user for connection. We strongly recommend to create the new user with limited rights. However, do not forget to provide him enough rights for performing the supposed actions. Also, it is necessary to add HostTracker servers addresses, to the whitelists on firewall or other blocking software, to allow the access. The addresses are permanent, and are listed on the same form.
There could be arbitrary query - SELECT, UPDATE, DELETE, INSERT, execution of stored procedures (like scheduler), results comparison, logical operations. The only restriction is execution time - it should not take longer than 30 seconds. Otherwise, the timeout error will be reported.
It is recommended to create the queries which display the necessary value in the first row of the first column. This result can be analysed. For UPDATE, INSERT, DELETE queries the number of affected rows is analysed. There are different ways to analyse the resulted value by comparison with specific preset - equal/not equal/higher/lower/in range. In case the condition is not satisfied, no connection to DB, query timeout - the error is reported.
- See also
- Website monitoring