stagemonitor / stagemonitor-mailinglist

GitHub issues abused as a mailing list
3 stars 0 forks source link

How to enable JDBC monitoring #29

Open slavinas opened 8 years ago

slavinas commented 8 years ago

Hey guys,

I'm trying to set up stagemonitor for our Atlassian Jira instance (running in Tomcat) but I fail to get the JDBC metrics. If I open the in-browser widget I see the SQL statements, but however in Kabana most of the metrics are missing: image

I managed to find only 3 JDBC config options of which only the DataSource instance name seems relevant in my case. Here's my config:

CATALINA_OPTS="$CATALINA_OPTS -javaagent:../lib/byte-buddy-agent-1.3.19.jar -Dstagemonitor.instanceName=dev2 -Dstagemonitor.applicationName=jira -Dstagemonitor.elasticsearch.url=http://localhost:9200 -Dstagemonitor.grafana.url=http://localhost:3000 -Dstagemonitor.web.widget.enabled=false -Dstagemonitor.hostName=jiralab -Dstagemonitor.web.paths.excluded=/secure/Dashboard.jspa-Dstagemonitor.instrument.jdbc.dataSource.implementations=\"org.apache.tomcat.jdbc.pool.DataSource,org.apache.tomcat.dbcp.dbcp.PoolingDataSource,org.apache.tomcat.jdbc.pool.DataSourceProxy,org.apache.commons.dbcp2.PoolingDataSource,org.apache.commons.dbcp.PoolingDataSource,com.mchange.v2.c3p0.AbstractPoolBackedDataSource,com.mchange.v2.c3p0.PoolBackedDataSource,com.mchange.v2.c3p0.ComboPooledDataSource,com.jolbox.bonecp.BoneCPDataSource,snaq.db.DBPoolDataSource,com.zaxxer.hikari.HikariDataSource,org.jboss.jca.adapters.jdbc.WrapperDataSource,org.springframework.jdbc.datasource.AbstractDriverBasedDataSource,javax.sql.DataSource,com.mysql.jdbc.jdbc2.optional.MysqlDataSource,com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource,org.apache.derby.jdbc.ClientDataSource,org.apache.derby.jdbc.BasicClientDataSource40\""

Any idea if I need to set something else? Do you somehow need to specify the DB urls, etc?

Thank, Slavina

felixbarny commented 8 years ago

Which stagemonitor version are you using? Have you tried the Grafana JDBC dashboard? Maybe there is a mistake in the query of the Kibana dashboard.

slavinas commented 8 years ago

Hey Felix,

ah...just tried the Grafana dashboards and it looks better. Seems to really be an issue with the Kibana dashboards. I'll take a closer look on what's wrong there.

Thanks for the support!

felixbarny commented 8 years ago

You're welcome. Could you tell me which version you are using?

slavinas commented 8 years ago

The latest one - 0.25.0

felixbarny commented 8 years ago

I just checked that the Kibana JDBC dashboard works in the upcoming version

slavinas commented 8 years ago

Super, sounds good :)

I also managed to get them working by removing the signature clause:

if I change: name: jdbc_statement AND !signature: All to name: jdbc_statement

they show data, but I'm a total newbie to those queries, so I'm not sure what this signature stands for.