Three Metricbeat MySQL module does not allows customizing the query, but if you wish to periodically index the results of a custom query then there are a couple of workarounds:
Modify your query so it uses into outfile syntax. This way MySQL will write results to a file. Then schedule the execution of this query and let Filebeat read from this file.
Run Logstash in another server and use the JDBC input plugin to connect and read from this MySQL
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.