DB2 dashboard queries through plugins

There is on Enterprise version a way to perform queries on a DB2 database using plugins?

I need to perform queries to show the data in tables.

Officially, there is no DB2 plugin for Grafana. However, if your DB2 version supports SQL compatibility with PostgreSQL or MySQL (e.g., DB2 has a compatibility mode), you can use the PostgreSQL or MySQL plugin in Grafana to query the DB2 database. This approach may work, but it’s less reliable than using ODBC because it depends on how well the SQL dialects between DB2 and PostgreSQL/MySQL align.

Steps to Use the PostgreSQL/MySQL Plugin with DB2 Compatibility:

  1. Select PostgreSQL or MySQL as the Data Source in Grafana:
  • Go to Configuration > Data Sources in Grafana.
  • Choose either the PostgreSQL or MySQL plugin based on your DB2 compatibility settings.
  1. Provide the Connection Details:
  • Host: Enter the hostname or IP address of your DB2 server.
  • Port: Enter the port number (typically 50000 for DB2).
  • Database Name: Enter the name of your DB2 database.
  • Username and Password: Provide the appropriate credentials for accessing the DB2 database.
  1. Write SQL Queries in Grafana:
  • In the Query Editor, write SQL queries that are compatible with DB2’s SQL dialect (since DB2 may emulate PostgreSQL or MySQL syntax, some differences might exist).