Directly Connecting MySQL DB to Kibana for visualization

Hi
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: http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/

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.

Regards.

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

Hi,

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 :
input
{
jdbc
{
type => "sqljdbc"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
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"
}
}
filter{}
output
{
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.