Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Atlassian JIRA, Confluence and Bamboo Plugin
Attention: The plugin managers may say that the latest javamelody versions are incompatible, but in fact they are certainly compatible as displayed on the plugin history page.
If you want to monitor a JIRA, Confluence or a Bamboo server, you can install JavaMelody easily with a JIRA/Confluence/Bamboo plugin. For this, download the jira-confluence-javamelody.jar file of the plugin and copy the file:
- in the "
JIRA x.x.x/atlassian-jira/WEB-INF/lib" directory for JIRA,
- in "
Bamboo/atlassian-bamboo/WEB-INF/lib" for Bamboo (or in "
Bamboo/webapp/WEB-INF/lib" for older Bamboo)
- or upload the file with the "Plugin manager" in the "Administration" menu for Confluence.
Restart the server.
Then you can open the report from the address
http://<host>:<port>/monitoring (the "Monitoring" link is also available in the "Administration" menu or "Manage add-ons" page).
That's it in general.
Note: The jdbc connections and the SQL requests are monitored in JIRA, Confluence and Bamboo if a jdbc datasource from jndi is used, instead of the default direct jdbc connection.
To configure Bamboo with a datasource, see this.
Alternatively for Bamboo, it is possible to replace the default hsqldb driver by the following in
<property name="hibernate.connection.driver">org.hsqldb.jdbcDriver</property> <property name="hibernate.connection.driver_class">net.bull.javamelody.JdbcDriver</property>
To configure JIRA with a datasource, replace in the
jira-home/dbconfig.xml file "
<jdbc-datasource>...</jdbc-datasource>" with "
<jndi-datasource><jndi-name>java:comp/env/jdbc/JiraDS</jndi-name></jndi-datasource>" (take a backup before), and add a Resource element for a datasource inside the Context element of the Tomcat's "JIRA/conf/server.xml" file:
... <Context ... > ... <!-- If you're using JIRA 6.4 or below; change maxTotal to maxActive --> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="[enter db username]" password="[enter db password]" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/jiradb?useUnicode=true&characterEncoding=UTF8" maxTotal="20" maxIdle="10" validationQuery="select 1" /> </Context> ...
Or see this example of datasource from Atlassian. The values in your Resource element should be inspired by the values that were just removed from your dbconfig.xml file. And so the jndi datasource will be automatically monitored after restart.
The data files will be stored by default in /temp/javamelody/. If you want to use another storage directory, add a "javamelody.storage-directory" system property (in /bin/setenv.sh or in /conf/catalina.properties). For example:
You can configure other parameters, see Optional parameters.
In JIRA, Confluence and Bamboo, you can also send weekly, daily or monthly reports in pdf format by mail to one or several people. This is explained in the chapter Weekly, daily or monthly reports by mail.
For example, for JIRA:
Copy the "javax.mail-1.5.6.jar", "javax.mail-api-1.5.6.jar" and "activation-1.1.1.jar" files from the "JIRA/atlassian-jira/WEB-INF/lib/" directory to the "JIRA/lib/" directory. And add the following Resource and Parameter lines inside the Context element of the "JIRA/conf/server.xml" file:
... <Context ... > ... <Resource name="mail/JavaMelodySession" auth="Container" type="javax.mail.Session" mail.smtp.host="mailhost.foo.bar" mail.smtp.user="someLoginIfNeeded" mail.from="firstname.lastname@example.org" /> <Parameter name='javamelody.admin-emails' email@example.com,firstname.lastname@example.org' override='false'/> <Parameter name='javamelody.mail-session' value='java:comp/env/mail/JavaMelodySession' override='false'/> <Parameter name='javamelody.mail-periods' value='day,week,month' override='false'/> </Context> ...
Read Weekly, daily or monthly reports by mail for more parameters if needed.
Note: the plugin is reported to work in Bitbucket. But it does not work as is in Fisheye when using "Manage add-ons", because of pluginsVersion="1" instead of "2" in the atlassian-plugin.xml file in the plugin.