Using database sensors with ODBC drivers in NetCrunch

NetCrunch offers database sensors with native connectivity for Oracle, SQL Server, MySQL/MariaDB, PostgreSQL as well as generic ODBC data sources. This article demonstrates how to install and configure ODBC drivers for DB2.

Installing ODBC Drivers for DB2 in Windows 2016

First, download ODBC drivers from IBM, (x64) remember to download the correct driver for your version of the database. For this article, we installed drivers in version 11.1.

IBM recommends the installation of the latest 'fix packs'.

Configuring ODBC DB2 drivers in Windows 2016

  1. After downloading, copy zip to NetCrunch Server machine, and unzip driver (eg, c:\DB2Driver)
  2. Run Windows CMD.exe with administrative privileges and navigate to the bin directory located in driver folder.
  3. Install DB2 Driver by executing db2oreg1.exe -i command driver_installation
  4. To confirm that the driver is installed run ODBC Data Sources (64-bit) and select the Drivers tab odbc_db2_drivers

Configure a System DSN (Data Source Name)

  1. Select the System DSN tab and click Add
  2. Select IBM DATA SERVER DRIVER [...] and click Finish
  3. Type the name of data source (it will be displayed in NetCrunch)
  4. Click on Add next to 'Database Alias' field
  5. Switch to Advanced Settings and click on Add

    1. Add Hostname with IP or DNS name of your Database
    2. Add Port of your database (default is 50000)
    3. Add Database by designating the database you wish to connect to
    4. Add Protocol - Default is TCP/IP
      Your configuration should look as follows: odbc_configured
  6. Save everything by clicking on OK

  7. To test if the configuration is valid, re-open DSN that was just configured and provide UserID and Password, then click on Connect
  8. Connection tested successfully will display confirming the valid configuration. test_connection

Connecting NetCrunch Database Sensor to an ODBC Data Source

Add or navigate to a NetCrunch node with DB2 database services

  1. Open the node settings on the target node and add the following monitoring sensor: SQL Query:Object netcrunch_sensor
  2. Click on Edit next to connection field
  3. Select ODBC in 'database type' field
  4. System DSN should point at configured DSN sensor_config
  5. Add username and password to your database and save them. (Use Save as profile to use the same configuration in other sensors)
  6. Type the name of the Database then click on test button at the top right corner - NetCrunch will test connection now test_profile

Don't worry about 'No data' - it means that NetCrunch has successfully connected to the database, but it received no data. It's okay because the query is empty.

The screen below shows the working query

result_of_query

This feature requires NetCrunch version 10.1+

databasedatabase monitoringdatabase queryodbc

NetCrunch Network Monitoring

Network Maps, Dashboards, and Alerts.
Monitor anything. Network, cloud, config.