free / sql_exporter

Database agnostic SQL exporter for Prometheus
MIT License
536 stars 171 forks source link

IBM DB2 support #39

Open nubenum opened 5 years ago

nubenum commented 5 years ago

I have adapted this project to support IBM DB2 and added some example metrics: https://github.com/nubenum/sql_exporter

Maybe it comes in handy for someone else. I would be glad to make a pull request, however, since there are so many added dependencies, it's probably not worth it to add it for everyone. I'm not sure if one could adapt the build process to conditionally only include required dependencies. Maybe you want to have a look at it, otherwise, this issue is just informational and can be closed.

brunowego commented 4 years ago

+1 for pull request!

dartagnanli commented 1 year ago

when i make build, i got this

>> building binaries
 >   sql_exporter
# github.com/ibmdb/go_ibm_db/api
../../go/pkg/mod/github.com/ibmdb/go_ibm_db@v0.4.2/api/api_unix.go:13:11: fatal error: sqlcli1.h: No such file or directory
   13 | // #include <sqlcli1.h>
      |           ^~~~~~~~~~~
compilation terminated.
!! command failed: build -o /home/vagrant/lbproject/sql_exporter/sql_exporter -ldflags -X github.com/prometheus/common/version.Version=0.5 -X github.com/prometheus/common/version.Revision=6f96b0d6b40340929e4d84c902378e7ead113ff1 -X github.com/prometheus/common/version.Branch=master -X github.com/prometheus/common/version.BuildUser=vagrant@debian11-1-11-dev -X github.com/prometheus/common/version.BuildDate=20230201-09:52:22  -a -tags netgo github.com/free/sql_exporter/cmd/sql_exporter: exit status 2
make: *** [Makefile:49:build] 错误 1

what can i do?Thanks.

nubenum commented 1 year ago

Not sure, but as can be seen from the Makefile I adapted, I think you have to run make all or at least run make depend before make build. Disclaimer: I haven't looked at it for a very long time and both the upstream and my fork are obviously not maintained (but other forks are apparently).

dartagnanli commented 1 year ago

ok,i have resolved it,thank you every much.please see this link if necessary