db2_exporter
db2_exporter copied to clipboard
Monitoring DB2 with 2 or more Databases
Hi man, my name is Axel Huachacona. First of all, thank you very much for your work.
Now, if you will allow me, I need some help.
Right now I need to check the status of my DB2 server but inside I have at least 6 different schemas that I use. With just one schema it works perfect but, apparently, the exporter only allows monitoring a single schema (like the SAMPLE schema in your example) but I need to know if it is possible to monitor more than one at the same time without having to raise more than one instance of the exporter.
Is there any possible way to do this?
Thank you again for your work!
I'll leave my environment specifications:
- SO: Windows 10
- DB2: 10.5.3 for Windows x64
- GOlang: 1.10.8
- db2_exporter: master branch
I need some time to analyze it. No longer working on it。
Hi my friend, I was able to make funcional it by using this method for Windows.
-
Adding ENV variables to W2. Something like this:
Name: CGO_CFLAGS Value: -IC:\PROGRA~1\IBM\SQLLIB\INCLUDE Name: CGO_LDFLAGS Value: -LC:\PROGRA~1\IBM\SQLLIB\LIB Name: IBM_DB_DIR Value: C:\PROGRA~1\IBM\SQLLIB Name: LD_LIBRARY_PATH Value: C:\PROGRA~1\IBM\SQLLIB\LIB
-
DB2 Update.
db2 update monitor switches using bufferpool on db2 update dbm cfg using DFT_MON_BUFPOOL on
-
Download master branch on a zip, extract and inside the folder, run the following to build from source.
go get github.com/glinuz/db2_exporter go build github.com/glinuz/db2_exporter This create an .exe file called 'db2_exporter.exe'.
-
RUN from command line.
db2_exporter.exe -log.level debug -dsn "DATABASE=DBNAME;HOSTNAME=localhost;PORT=50000;PROTOCOL=TCPIP;UID=DB2ADMIN;PWD=PASSW0RD!;"
Following this steps, I was able to collect data from my DB2 Server on a Windows machine. Hope this help to somebody else.
Bye and thank you man!
First, db2_exporter monitor database by query sysibmadm schema,it can get all stats,include all schema in this database.(DB2 struct Instance-->database-->schema). You only need to customize SQL in metrics.toml file.
If you want to monitor more than one database in on DB2 instance,sorry. db2_exporter base on the ODBC,it is not support more than one database.But you can run multi db2_exporter process with different -dsn -port,in one server.
Thank you ,the method for Windows.