This article demonstrates how to create SQL monitors to check database data.

You can create almost any SQL queries. For example, you can create a simple query just to check if database server is running or not, or create a query to check your company’s daily sales or daily new users.

  • SysUpTime can take numerical values or do content match to check if a phrase exists or not.
  • The SQL query should not take several minutes to finish.

Now we are going to use the following SQL query to check how many rows of PING monitors have stored.

select count(*) from pm_ping_result

Configure SysUpTime

  1. Add a web site monitor: add monitor add monitor

  2. Enter SQL query and database username password. For the internal database that SysUpTime, it’s PostgreSQL and both the username and password are postgres, and the port number is 9543. Select “Content match” from the left pane. add monitor

  3. In the threshold scree, we configure it to generate alarm when the result is greater than 1 million.

add monitor

  1. After creating the monitor, we will see something like the following graph, which shows collected data:

add monitor