Adding and editing a SQL Query Monitor

This monitor lets you check that certain conditions exists in a Microsoft SQL or MySQL database, based on a database query. You can define the criteria you want to exist in the database, and as long as the specified conditions are present, the SQL Query Monitor is in an up state. If the database data changes outside the boundaries of the query criteria, the monitor triggers to a down state.

After the monitor is configured, you must assign the monitor to a device through the Device Properties > Active Monitors dialog.

Note: This feature is only available in WhatsUp Gold Premium Edition. To update your license, visit the MyIpswitch portal.

Important: To use the SQL Query Monitor to monitor a MySQL database, you must first download and install the MySQL .NET connector. Because of compatibility issues with later versions, only MySQL version 5.2.5 .NET connector is supported. This connector is located on the WhatsUp Gold website. This link downloads the mysql-connector-net-5.2.5.zip file. Once downloaded, extract the MySQL.Data.msi and run the MySQL Connector Setup utility by double-clicking on the MySQL.Data.msi icon. On the Choose Setup Type screen, select Typical and click Install. The MySQL .NET connector is installed at the following location: C:\Program Files\MySQL\MySQL Connector Net 5.2.5\. After the .NET connector has been installed, restart WhatsUp Gold.

Note: The SQL Query monitor does not support Windows authentication. Make sure that ADO credentials are set up in the Credentials Library for the database for which you want to query. The Credentials system stores ADO database credentials information in your WhatsUp Gold database to be used when a database connection is required. For more information, see Using Credentials.

Note: When connecting to a remote SQL instance, WhatsUp Gold only supports the TCP/IP network library.

To add or edit a SQL Query monitor:

  1. Click the Admin tab, then click Monitor Library. The Monitor Library dialog appears.
  2. Click the Active tab. The Active Monitor list appears.
  3. Click New and select SQL Query Monitor from the list to create a new SQL Query monitor. Click OK.
    - or -
    Select the SQL Query monitor you want to change from the list of current monitors, and then click Edit.
  4. Complete the information for the following fields.
    • Name. Type a name for the active monitor. This name displays in the Active Monitor Library.
    • Description. Type a short description for the monitor. This description displays next to the monitor in the Active Monitor Library.
  5. Complete the information for the Server Properties section.
    • Server Type. Select the database server type.

    Note: MySQL database is supported and listed as a Server Type option if the MySQL 5.2 or later .NET connector is installed. You can download the connector on the MySQL Connectors Download site.

    • Server Address. Type the server address in the ServerName\Instance format.

    Note: The ServerName\Instance format is only required for SQL Server. MySQL only requires the ServerName.

    • Port (optional). Type the database server port number if other than the standard database port number.
    • SQL Query to Run. Type a query you want to run against a database to monitor and check for certain database conditions. Only SELECT queries are allowed.

      Important: Ensure that you include the full database name in your query. For query help, click Build. The SQL Query Builder assists in developing proper query syntax.

    • Build. Click to open the SQL Query Builder dialog for assistance building queries.
    • Verify. Click to check that the query is valid. If there is a syntax error with the SQL query, a message appears with tips about the syntax issue.
  6. Complete the information for the Monitor is up if section.

    Important: All database rows must match the criteria settings in the Monitor is up if section for the monitor to be considered up. If multiple threshold criteria is used in the Content of each retrieved row matches the following criteria, all thresholds must match the criteria in each row.

    • Number of rows returned is. Select this option to determine the success or failure of the monitor scan based on rows returned by the SQL query.
      For the following options, select the appropriate variables to determine the success or failure of the monitor scan:
      • less than
      • less than or equal to
      • greater than
      • greater than or equal to
      • equal to
      • not equal to

    Enter a numeric value for number of rows in the box to the right of the conditions list.

    • Content of each retrieved row matches the following criteria. Select to set criteria that each database row must match to determine the success or failure of the monitor scan.
    • Add. Click to open the New Row Content Threshold dialog. This dialog lets you set the database column values and conditions that must be matched for each table row.
    • Edit. Click to modify existing row criteria.
    • Delete. Click to remove existing row criteria.

    As you specify the desired monitor criteria settings, this description updates to illustrate the monitor you have configured.

  7. Click OK to save changes.

After configuring an active monitor in the Active Monitor Library, add the monitor to devices.

See Also

Using Premium Active Monitors

Adding and editing an APC UPS Monitor

Monitoring mail servers

Monitoring a Microsoft Exchange Server

Getting Started with Exchange Monitors

Adding and Editing an Exchange Monitor

Example: Exchange Server monitor

Monitoring Microsoft Exchange 2003 Servers

Adding and editing a File Properties Monitor

Adding and editing a Folder Monitor

Adding and editing an FTP Monitor

Adding and editing an HTTP Content Monitor

Adding and editing a Network Statistics Monitor

Adding and editing a Power Supply Monitor

Adding and editing a Printer Monitor

Adding and editing a Process Monitor

Adding and editing a SQL Server Monitor

Adding and Editing a WMI Monitor

Adding and editing a VoIP Monitor

Adding and editing an Active Script Active Monitor

Assigning active monitors

Removing and deleting active monitors

About critical active monitors

Group and Device active monitor reports