Plugins You can find out about all the publicly available Grails plugins.

JavaMelody Grails Plugin

20 votes

3% of Grails users

compile "org.grails.plugins:grails-melody:1.59.0"

 Documentation  Source  Issues


Integrate JavaMelody Monitoring into grails application.


For Grails 3, just add a dependency. See the new page of the plugin.

For Grails 2: grails install-plugin grails-melody

Link to Release notes of JavaMelody (and of JavaMelody Grails Plugin)


This plugin integrates JavaMelody system monitoring tool into grails application. When a grails application is installed with grails-melody plugin, you will be able to monitor the application at http://localhost:8080/<YourContext>/monitoring.

The goal of JavaMelody is to monitor Java or Java EE applications servers in QA and production environments. It is not a tool to simulate requests from users, it is a tool to measure and calculate statistics on real operation of an application depending on the usage of the application by users.

For Grails 3, see the new page of the plugin

A few things you might want to know:

  • grails-melody plugin overwrites original grails 'dataSource' bean in spring context with a JavaMelody datasource proxy.
  • grails-melody plugin uses groovy meta programming to intercept grails services method calls.
The plugin copies a GrailsMelodyConfig.groovy file into your project's grails-app/conf directory. All JavaMelody parameters described at can be configured in this file with 'javamelody.' prefix. For example, use
javamelody.disabled = true
to disable the JavaMelody monitoring.

JavaMelody uses URIs to resolve HTTP requests. This means that

/book/show/1 and 

will resolve as different requests. While that's desirable in some cases, often you want the statistics to be gathered for the show action, irrespective of parameters. In that case, add the following configuration to GrailsMelodyConfig.groovy and the above URIs will show up as /book/show/$.

javamelody.'http-transform-pattern' = '\\d+'  //filter out numbers from URI

Similar issue may come for SQL monitoring - use a similar Regex to filter it.

javamelody.'sql-transform-pattern' = '\\d+'