Directly Connecting MySQL DB to Kibana for visualization

My current problem statement involves connecting to MySQL DB to fetch the data and produce Datavisualization in Kibana.

Is there a way to directly connect with MySQL DB from Kibana.

If not, then what are the other alternatives.

No. You need first to index the data in elasticsearch.

You can use Logstash for this but if you want real time data, have a look at:

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

Have also a look at this "live coding" recording.

Hi David ,
Thanks a lot for the quick response.
I need to know how do be create a Logstash pipleine in the Elastic Cloud version.

Any help in this regard will be much appreciated.


You can't. Logstash needs to run on its own machine.


You can try by using logstash configuration file to add input as jdbc and you can see that index in kibana and visualize it.

Example :
type => "sqljdbc"
jdbc_driver_class => ""
jdbc_connection_string => "jdbc:sqlserver://{{mssqlDnsURL}}:6201;database={{dbName}}"
jdbc_driver_library => "/usr/bin/{{mssqlJdbcJar}}"
jdbc_user => "{{mssqlUser}}"
jdbc_password => "${MSQL_PWD}"
schedule => "* * * * *"
jdbc_validate_connection => true
tags => [ 'sqljdbc' ]
statement => "Select * from DBAsAudit.dbo.dbaStoredAuditedEvents"
if [type] == "sqljdbc"
elasticsearch {
hosts => [ "https://{{elasticsearchUrl}}:9200" ]
index => "paas-{{mssqlResourceGroupName}}-%{+YYYY.MM.dd}"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.