Does this exporter support IBM DB2 and Oracle DB? #299
-
Is your feature request related to a problem? Please describe. Describe the solution you'd like After I survey overall, sql_exporter seems to fit my needs except that DB2 and oracle are not supported. :( Describe alternatives you've considered If the DB2 and Oracle could be supported, it's so appreciated, thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @shingou0120, I'm sorry for the late response - had many things around. Generally, any database that has a driver in golang, supporting Following your case I found next things:
These drivers are rather specific, and aren't available out of the box, but it's not difficult to add them (one of them at the moment):
P.S. You can also create the binary only with custom drivers - populate the list Let me know if you have any questions, I'm happy to assist. 👍 |
Beta Was this translation helpful? Give feedback.
-
Hey @burningalchemist, After installing the binary and adding Do you know what I did wrong? |
Beta Was this translation helpful? Give feedback.
-
Hey @JustNZ, I just tested it, and it works fine. It's also that you need to use Here's a short screencast, hope it helps: Kapture.2023-08-22.at.17.08.40.mp4As for adding I think adding a simple guide to add your own driver is the best option as it gives control and flexibility. |
Beta Was this translation helpful? Give feedback.
-
Hey @burningalchemist , yes seems like the issue was by not using the v2 version of the oracle driver. And keeping this project lightweight does make sense and if there is the possibility to add own drivers then it is more than perfect. Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @shingou0120, I'm sorry for the late response - had many things around.
Generally, any database that has a driver in golang, supporting
sql/database
interface, and supported bydburl
can be used bysql_exporter
.Following your case I found next things:
Oracle DB is supported. 👍 The suitable driver for Oracle DB is likely https://github.com/sijms/go-ora.
As for IBM DB2 - it's a bit tricky. There is a driver written in go, but it's not supported by
dburl
dependency, so a pull request is needed on the upstream.These drivers are rather specific, and aren't available out of the box, but it's not difficult to add them (one of them at the moment):