Comments (5)
Do you build from source,or my release binary package? It is like a ODBC dirver problem.
from db2_exporter.
Hello, thanks for answering,
Attached is the complete sequence of the executed commands. It is built from sources:
[root@serv-db2 db2_exporter-master]# ll
total 328
-rw-r--r-- 1 root root 17095 Nov 5 2019 db2-alert.png
-rw-r--r-- 1 root root 537 Nov 5 2019 db2exporter-rules.yml
-rw-r--r-- 1 root root 32488 Nov 5 2019 db2exporter_zabbix_templates.xml
-rw-r--r-- 1 root root 7933 Nov 5 2019 db2script.txt
-rw-r--r-- 1 root root 1743 Nov 5 2019 default-metrics.toml
drwxrwxrwx 9 root root 117 Nov 5 2019 github.com
drwxrwxrwx 3 root root 15 Nov 5 2019 golang.org
-rw-r--r-- 1 root root 221579 Nov 5 2019 ibmdb2.png
-rw-r--r-- 1 root root 1099 Nov 5 2019 LICENSE
-rw-r--r-- 1 root root 11409 Dec 26 18:09 main.go
-rw-r--r-- 1 root root 857 Nov 5 2019 Makefile
-rw-r--r-- 1 root root 350 Nov 5 2019 metric-dual-example.toml
-rw-r--r-- 1 root root 521 Nov 5 2019 multi-metric-dual-example-labels.toml
-rw-r--r-- 1 root root 5748 Nov 5 2019 README.md
drwxr-xr-x 2 root root 6 Dec 25 12:32 vendor
-rw-r--r-- 1 root root 2098 Nov 5 2019 vendor.json
[root@serv-db2 db2_exporter-master]# export IBM_DB_DIR=/opt/ibm/db2/V11.5
[root@serv-db2 db2_exporter-master]# export CGO_LDFLAGS=-L$IBM_DB_DIR/lib64
[root@serv-db2 db2_exporter-master]# export CGO_CFLAGS=-I$IBM_DB_DIR/include
[root@serv-db2 db2_exporter-master]# go build main.go
[root@serv-db2 db2_exporter-master]# ll
total 9652
-rw-r--r-- 1 root root 17095 Nov 5 2019 db2-alert.png
-rw-r--r-- 1 root root 537 Nov 5 2019 db2exporter-rules.yml
-rw-r--r-- 1 root root 32488 Nov 5 2019 db2exporter_zabbix_templates.xml
-rw-r--r-- 1 root root 7933 Nov 5 2019 db2script.txt
-rw-r--r-- 1 root root 1743 Nov 5 2019 default-metrics.toml
drwxrwxrwx 9 root root 117 Nov 5 2019 github.com
drwxrwxrwx 3 root root 15 Nov 5 2019 golang.org
-rw-r--r-- 1 root root 221579 Nov 5 2019 ibmdb2.png
-rw-r--r-- 1 root root 1099 Nov 5 2019 LICENSE
-rwxr-xr-x 1 root root 9546176 Dec 28 09:04 main
-rw-r--r-- 1 root root 11409 Dec 26 18:09 main.go
-rw-r--r-- 1 root root 857 Nov 5 2019 Makefile
-rw-r--r-- 1 root root 350 Nov 5 2019 metric-dual-example.toml
-rw-r--r-- 1 root root 521 Nov 5 2019 multi-metric-dual-example-labels.toml
-rw-r--r-- 1 root root 5748 Nov 5 2019 README.md
drwxr-xr-x 2 root root 6 Dec 25 12:32 vendor
-rw-r--r-- 1 root root 2098 Nov 5 2019 vendor.json
[root@serv-db2 db2_exporter-master]#
[root@serv-db2 db2_exporter-master]# export DB2_HOME=/opt/ibm/db2/V11.5
[root@serv-db2 db2_exporter-master]# export LD_LIBRARY_PATH=$DB2_HOME/lib64:$LD_LIBRARY_PATH
[root@serv-db2 db2_exporter-master]# ./main -log.level debug -dsn "DATABASE=Usuarios;HOSTNAME=localhost;PORT=50000;PROTOCOL=TCPIP;UID=db2inst1;PWD=Test012123;"
panic: SQLGetDiagRec failed: ret=-2
goroutine 1 [running]:
github.com/ibmdb/go_ibm_db.NewError(0x7efc3c, 0xe, 0x75be00, 0xce1100, 0xc000048eb8, 0x4dc5e6)
/usr/local/go/src/github.com/ibmdb/go_ibm_db/error.go:58 +0x50a
github.com/ibmdb/go_ibm_db.initDriver(0x0, 0x0)
/usr/local/go/src/github.com/ibmdb/go_ibm_db/driver.go:29 +0x22e
github.com/ibmdb/go_ibm_db.init.0()
/usr/local/go/src/github.com/ibmdb/go_ibm_db/driver.go:53 +0x22
[root@serv-db2 db2_exporter-master]#
Please your comments.
from db2_exporter.
1.My DB2 server version V10.5.So DB2 v11,Mybe..
2.IBM_DB_DIR DB2_HOME must be DB2 Instance path. As /home/db2inst1/sqllib (db2icrt)
3.Or repair DB2 instance privillage
/opt/ibm/db2/V10.5/instance/db2iupdt db2inst1
from db2_exporter.
Perfect, it works, thanks
Another query, in the connection parameter it is passed the name of the database, but if I have several databases, how do you have to do it to monitor several databases?
And if it is possible to carry out this monitoring from a remote client computer, installing only the DB2 client with its drivers on the client computer, will it be possible?
thanks
from db2_exporter.
It is design to run with DB2 server,Add auto registry to consul + promethues.
Mybe you write shell script.
from db2_exporter.
Related Issues (12)
- Darwin Version HOT 1
- Docker Implementation HOT 2
- DB2 installed on Windows HOT 1
- AIX Support for DB2 Exporter HOT 1
- Monitoring DB2 on Windows HOT 7
- Monitoring DB2 with 2 or more Databases HOT 3
- Compatible with ppc64le linux HOT 5
- Fatal error on ppc64le HOT 1
- Password encrypted used in db2_exporter HOT 1
- Error building project HOT 1
- 这是什么情况呢
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db2_exporter.