-
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
Mysql and Postgres modules should allow addition of custom queries #2987
Comments
Can you add some examples for the metrics / queries you would run? |
For example current mysql module collects data only from show status command. If one wants to use show global status, then there are additional parameters included. Similarly if performance stats are enabled, there are many more data available for monitoring and plotting. There one can enable selective data by specifying queries of interest in the metricbeat mysql module configuration, it can become a powerful tool for monitoring and analyzing db performance. In general, in my view, for any monitoring tool, it should be possible to define a set of commands to be used to collect data from remote node, map the output data fields to corresponding json document for ES storage. That way one need not build new beats but use modular approach to enhance / modify data collection from the remote source, and setup it's field mapping for storing the document. Thus a generic beat module can be reused and reconfigured for multiple uses for different types of monitoring data collection. |
I would split up this enhancement request in three parts:
For the free form of queries, httpbeat comes to my mind. Also something that applies here is probably httpbeat which allows to query any http endpoint. It does not necessarely apply to all module types. An other one is mysqlbeat. Is that the direction you were thinking? Number 3 is the most powerful but also most complex one as it goes into external script execution. We decided to not touch this topic for at least the first version of metricbeat :-) |
Agree that subset of stats is not sufficient and full set of metrics be exported for any application in general. Since in case of Mysql (or Mariadb) sources of monitoring data comes from different tables (like performance tables, sys tables etc), data needed for having a meaningful monitoring or analyzing issues, would have to be in one place. That is where I think these beats can be very useful . This is where free form of queries would come handy to build custom monitoring on top of standard beats. This should not required "Recompile of code" but added / subtracted thru config files. 3rd option is, in my opinion, a way of using simple generic plugin, for any data source . This , I agree , is complex but makes the tool adoptable to any application. What one needs for building such a solution is : As these are the general steps ( most likely common steps) for any data to be stored for future retrieval and analysis, therefore I think, a generic module would be able to cater to multiple application needs at the same time in addition to ready to use modules. |
@madhavajay I think we should have here a conversation with @adibendahan if this could potentially fit somehow into metricbeat. He knows already all the complexity and challenges around it. |
Yeah sounds good, mysqlbeat is working great for me currently. |
@ruflin, @madhavajay there's nothing too complicated in the mysqlbeat code, I'll be happy to help with anything you need ;) |
@adibendahan Perhaps we can a quick video chat about it? Can you send me an email (see LinkedIn). |
I had a great chat with @adibendahan and learned more about mysqlbeat. Here a few things I wanted to share:
Some thoughts for the implementation:
|
This issue is closed? |
@simpleuser99 This issue is still open as it's not implemented yet. Contributions are welcome ;-) |
Im interested in being able to run my own queries using metric beat for mySQL. Does it have this functionality yet? |
A new generic SQL module has been added in Metricbeat, that in principle can be used to collect events from custom queries using any of the included drivers included in the binary. Adding support for more drivers will be in principle a matter of including more implementations of the |
"The Times They Are a-Changin" |
Features Request:
Database monitoring modules of Mysql/Postgres should allow adding additional sql commands / queries to collect additional db performance data to customize dashboards in addition to outputs from standard commands.
Would like to see Cassandra module included .
Thanks
Ajay
The text was updated successfully, but these errors were encountered: