-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metricbeat] Add SQL module (#13106) #13257
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
1 similar comment
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Hi @amandahla, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in your Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile? |
Thanks @amandahla for starting this! We have long wanted to have something like a generic SQL module, and now with light modules it can be even more useful. I see this is in progress, but my main concern with current approach is the use of ODBC. According to the package README it needs CGO, what can be an impediment. I guess you have chosen it because there is no go-native way to connect with a DB2 database? Also, I think that we could make this one a more generic module if we also allow to configure the driver.
And then we could open the connection with:
The benefit of this is that we could have an even more generic We will also have to discuss how to store the collected metrics. In generic modules we are tending towards storing all the metrics under the same object, for example all Prometheus metrics are stored under One last thing, we are adding most of new modules under the x-pack directory, would you mind to move the module to |
|
|
We already import several drivers in Metricbeat for other modules, I think it should be possible to use them here. And later we can decide the best way of including more drivers. |
@jsoriano should be something like this?
|
@amandahla yes, something like this, some extra suggestions:
Summarizing, something like this:
|
Almost there :-)
|
Great! Could you remove the
|
Can you ping me when the documentation for this module is ready for review? Right now, the content is boiler plate text. We need meaningful descriptions. Thanks! |
@dedemorton I'm not sure if I did it right, I just wrote the files:
Is that ok? |
@dedemorton @jsoriano is there anything that I could improve/change here? |
Hey @amandahla, sorry for not getting back to this earlier, there seems to be some errors in CI related to the new added doc files, you will need to run |
The SQL module can collect metrics and other data with custom queries, using the database drivers included in Metricbeat. (cherry picked from commit a3136a4)
The SQL module can collect metrics and other data with custom queries, using the database drivers included in Metricbeat. (cherry picked from commit a3136a4)
While manually testing this module I have found that the behaviour of |
I have started this change too #15847. It'd be nice if it reaches 7.6.0, but not so important. |
The metricbeat sql module is a lifesaver, we are very happy with this inclusion. \o/ But we think there are a few features that could make this even better. Support a unique identifier for
|
This is a draft for a odbc module that you can set datasource and a query to generate metrics.
This way, you can get metrics from DB2 (#13106) and others databases.
PR is in progress and subject to changes.
How to test