<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Day At The Races &#187; plugin</title>
	<atom:link href="http://blog.jetztgrad.net/category/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jetztgrad.net</link>
	<description>Programming was my first love, and it will be my last.</description>
	<lastBuildDate>Mon, 26 Jul 2010 22:27:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Released Grails Spy plugin 0.2</title>
		<link>http://blog.jetztgrad.net/2010/07/released-grails-spy-plugin-0-2/</link>
		<comments>http://blog.jetztgrad.net/2010/07/released-grails-spy-plugin-0-2/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 21:50:40 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[spy]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=225</guid>
		<description><![CDATA[I just released version 0.2 of my Grails Spy plugin.
About
The Grails Spy plugin provides some views to inspect Grails internals such as the Spring application context(s), artefacts, etc.
As most of the beans of the Grails WebApplicationContext are constructed at runtime with the help of a BeanBuilder, there is no Spring xml file with bean definitions.
In [...]]]></description>
			<content:encoded><![CDATA[<p>I just released version 0.2 of my <a href="http://grails.org">Grails</a> <a href="http://grails.org/plugin/spy">Spy plugin</a>.</p>
<p><b>About</b></p>
<p>The Grails Spy plugin provides some views to inspect Grails internals such as the Spring application context(s), artefacts, etc.</p>
<p>As most of the beans of the Grails WebApplicationContext are constructed at runtime with the help of a BeanBuilder, there is no Spring xml file with bean definitions.</p>
<p>In order to browse the dynamic bean definitions, Grails Spy can be used to watch into an application’s guts.</p>
<p><b>Installation</b></p>
<pre>grails install-plugin spy</pre>
<p><b>Usage</b></p>
<p>Simply install the plugin, enable the Spy controller for the <code>dev</code> environment and run <code>grails run-app</code>. Then browse to <a href="http://localhost:8080/yourapp/spy">http://localhost:8080/yourapp/spy</a> and enjoy.</p>
<p><b>Changes</b></p>
<ul>
<li>For security reasons the Spy controller must now be enabled in Config.groovy:
<pre>
grails.plugins.spy.enabled = true
</pre>
<p>	The plugin can be enabled or disabled individually for each environment. Example:</p>
<pre>
environments {
    production {
        grails.serverURL = "http://www.changeme.com"
    }
    development {
        grails.serverURL = "http://localhost:8080/${appName}"
	grails.plugins.spy.enabled = true
    }
    test {
        grails.serverURL = "http://localhost:8080/${appName}"
    }
}
</pre>
</li>
<li>&apos;inspect&apos; is now the default action for the spy controller, so it can be called as <a href="http://localhost:8080/yourapp/spy">http://localhost:8080/yourapp/spy</a> instead of <a href="http://localhost:8080/yourapp/spy/inspect">http://localhost:8080/yourapp/spy/inspect</a></li>
</ul>
<p><b>License</b></p>
<p>The Spy plugin is released under the <a href="http://apache.org/licenses/LICENSE-2.0.txt">Apache License 2.0</a>.</p>
<p><b>Source code and Issues</b></p>
<p>The source code is hosted at <a href="http://github.com/jetztgradnet/grails-spy-plugin">GitHub</a>, issues can be reported <a href="http://github.com/jetztgradnet/grails-spy-plugin/issues">here</a>.</p>
<p><b>Screenshots</b></p>
<p>Eye-candy you say? See below:</p>
<p><b>GrailsSpy: GrailsApplication</b></p>
<p><a href="/wp-content/uploads/2010/01/GrailsSpy-GrailsApplication.png"><img src="/wp-content/uploads/2010/01/GrailsSpy-GrailsApplication-65x300.png" alt="" title="GrailsSpy: GrailsApplication" width="65" height="300" class="aligncenter size-medium wp-image-197" /></a></p>
<p><b>GrailsSpy: ApplicationContext view</b></p>
<p><a href="/wp-content/uploads/2010/01/GrailsSpy-MainApplicationContext.png"><img src="/wp-content/uploads/2010/01/GrailsSpy-MainApplicationContext-141x300.png" alt="" title="GrailsSpy: ApplicationContext view" width="141" height="300" class="aligncenter size-medium wp-image-199" /></a></p>
<p><b>GrailsSpy: bean view</b></p>
<p><a href="/wp-content/uploads/2010/01/GrailsSpy-jspViewResolver.png"><img src="/wp-content/uploads/2010/01/GrailsSpy-jspViewResolver-300x242.png" alt="" title="GrailsSpy: bean view" width="300" height="242" class="aligncenter size-medium wp-image-198" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2010/07/released-grails-spy-plugin-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Released Grails spy plugin</title>
		<link>http://blog.jetztgrad.net/2010/01/released-grails-spy-plugin/</link>
		<comments>http://blog.jetztgrad.net/2010/01/released-grails-spy-plugin/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:30:47 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[spy]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=195</guid>
		<description><![CDATA[While digging through the inner workings of Grails in order to improve my OSGi plugin, it is sometimes necessary to inspect the GrailsApplication object and its companion Spring ApplicationContext(s).
As most of the beans of the Grails WebApplicationContext are constructed at runtime with the help of a BeanBuilder, there is no Spring xml file with bean [...]]]></description>
			<content:encoded><![CDATA[<p>While digging through the inner workings of Grails in order to improve my <a href="http://grails.org/plugin/osgi">OSGi plugin</a>, it is sometimes necessary to inspect the <a href="http://www.grails.org/doc/1.2.0/api/index.html?org/codehaus/groovy/grails/commons/GrailsApplication.html">GrailsApplication</a> object and its companion Spring <a href="http://www.grails.org/doc/1.2.0/api/index.html?org/codehaus/groovy/grails/commons/spring/GrailsApplicationContext.html">ApplicationContext</a>(s).</p>
<p>As most of the beans of the Grails WebApplicationContext are constructed at runtime with the help of a <code>BeanBuilder</code>, there is no Spring xml file with bean definitions.</p>
<p>Only the main application context can be inspected, e.g. by <a href="/2010/01/script-to-inspect-jar-and-war-files-grails-applications-and-plugins/">extracting it</a> from the generated war file:</p>
<p><code><a href="/2010/01/script-to-inspect-jar-and-war-files-grails-applications-and-plugins/">jinspect</a> -a target/myapp-0.1.war</code></p>
<p>In order to browse the dynamic bean definitions I created a little plugin called <b><a href="http://grails.org/plugin/spy">Grails Spy</a></b>, which can be used to watch into an application&#8217;s guts.</p>
<p><b>License</b></p>
<p>The Spy plugin is released under the <a href="http://apache.org/licenses/LICENSE-2.0.txt">Apache License 2.0</a>.</p>
<p><b>Source code and Issues</b></p>
<p>The source code is hosted at <a href="http://github.com/jetztgradnet/grails-spy-plugin">GitHub</a>, issues can be reported <a href="http://github.com/jetztgradnet/grails-spy-plugin/issues">here</a>.</p>
<p><b>Installation</b></p>
<p>As always, simply execute <code>grails install-plugin spy</code>.</p>
<p><em>Note:</em> until the Grails <a href="http://grails.org/plugin/spy">plugin page</a> is sync&#8217;ed, the plugin can also be installed using<br />
<code>grails install-pluginhttp://cloud.github.com/downloads/jetztgradnet/grails-spy-plugin/grails-spy-0.1.zip</code></p>
<p><b>Usage</b></p>
<p>Simply browse to <a href="http://localhost:8080/myapp/spy/">http://localhost:8080/myapp/spy/</a> and have a closer look.</p>
<p><em>Note:</em> this path is NOT PROTECTED, so don&#8217;t do this in a production environment! Or at least use one of the <a href="http://grails.org/plugin/search?q=security">security plugins</a> to protect this page.</p>
<p><b>Screenshots</b></p>
<p>Eye-candy you say? See below:</p>
<p><b>GrailsSpy: GrailsApplication</b></p>
<p><a href="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-GrailsApplication.png"><img src="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-GrailsApplication-65x300.png" alt="" title="GrailsSpy: GrailsApplication" width="65" height="300" class="aligncenter size-medium wp-image-197" /></a></p>
<p><b>GrailsSpy: ApplicationContext view</b></p>
<p><a href="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-MainApplicationContext.png"><img src="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-MainApplicationContext-141x300.png" alt="" title="GrailsSpy: ApplicationContext view" width="141" height="300" class="aligncenter size-medium wp-image-199" /></a></p>
<p><b>GrailsSpy: bean view</b></p>
<p><a href="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-jspViewResolver.png"><img src="http://blog.jetztgrad.net/wp-content/uploads/2010/01/GrailsSpy-jspViewResolver-300x242.png" alt="" title="GrailsSpy: bean view" width="300" height="242" class="aligncenter size-medium wp-image-198" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2010/01/released-grails-spy-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Grails on OSGi (3): Released Grails OSGi plugin 0.1</title>
		<link>http://blog.jetztgrad.net/2010/01/released-grails-osgi-plugin-0-1/</link>
		<comments>http://blog.jetztgrad.net/2010/01/released-grails-osgi-plugin-0-1/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 02:35:54 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[osgi]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=133</guid>
		<description><![CDATA[The Grails OSGi plugin provides scripts to package a Grails application as an OSGi bundle. Additionally the bundle(s) may be run in an OSGi container assembled ad hoc by the excellent Pax Runner or deployed to a SpringSource DM Server.
License
The OSGi plugin is released under the Apache License 2.0.
Installation
Simply call grails install-plugin osgi to install [...]]]></description>
			<content:encoded><![CDATA[<p>The Grails OSGi plugin provides scripts to package a Grails application as an OSGi bundle. Additionally the bundle(s) may be run in an OSGi container assembled ad hoc by the excellent <a href="http://paxrunner.ops4j.org">Pax Runner</a> or deployed to a <a href="http://www.springsource.org/dmserver">SpringSource DM Server</a>.</p>
<p><b>License</b></p>
<p>The OSGi plugin is released under the <a href="http://apache.org/licenses/LICENSE-2.0.txt">Apache License 2.0</a>.</p>
<p><b>Installation</b></p>
<p>Simply call <code>grails install-plugin osgi</code> to install the OSGi plugin. </p>
<p><b>Usage:</b></p>
<p><b>Creating an OSGi bundle from the Grails application</b></p>
<p><code>grails bundle<br />
grails prod bundle</code></p>
<p><b>Running the bundle</b></p>
<p><code>grails run-bundle<br />
grails prod run-bundle</code></p>
<p>The application can be accessed at <a href="http://localhost:8080/myapp/">http://localhost:8080/myapp/</a>.</p>
<p>Note: at first start the OSGi runtime is assembled, which may take some time, while Maven is downloading the internet&#8230;</p>
<p><b>Creating a zipped OSGi runtime</b></p>
<p><code>grails assemble-osgi-runtime<br />
grails prod assemble-osgi-runtime</code></p>
<p><b>Deploy bundle to DM Server</b></p>
<p><code>grails dmserver deploy</code> (Not yet implemented)</p>
<p><b>Getting around the OSGi runtime</b></p>
<p>The OSGi runtime is based on the <a href="http://www.eclipse.org/equinox">Equinox</a> OSGi framework, <a href="http://paxweb.ops4j.org">Pax Web</a> and some additional bundles.</p>
<p><b>Web Console</b></p>
<p>The <a href="http://felix.apache.org/site/apache-felix-web-console.html">Felix Web Management Console</a> provides excellent insight into the inner workings (see Screenshots). It can be accessed at <a href="http://localhost:8080/system/console/">http://localhost:8080/system/console/</a> with user &#8220;admin&#8221; and password &#8220;admin&#8221;.</p>
<p><a href="http://blog.jetztgrad.net/wp-content/uploads/2010/01/ManagementConsole.png"><img src="http://blog.jetztgrad.net/wp-content/uploads/2010/01/ManagementConsole-197x300.png" alt="" title="Web Management Console" width="197" height="300" class="aligncenter size-medium wp-image-158" /></a></p>
<p><a href="http://blog.jetztgrad.net/wp-content/uploads/2010/01/ManagementConsole-GrailsAppBundle.png"><img src="http://blog.jetztgrad.net/wp-content/uploads/2010/01/ManagementConsole-GrailsAppBundle-77x300.png" alt="" title="Management Console: Details of the Grails application bundle" width="77" height="300" class="aligncenter size-medium wp-image-160" /></a></p>
<p><b>Shell Console</b></p>
<p>The command <code>grails run-bundle</code> drops the user in the Equinox Shell. Typing <code>help</code> shows the available commands.</p>
<p><b>How it works</b></p>
<p>In order to be a valid OSGi bundle, the application is war&#8217;ed and provided with the necessary bundle manifest headers (see <code>scripts/_Event.groovy</code> for details).<br />
The bundle can be created using <code>grails bundle</code>.  </p>
<p>The OSGi runtime is assembled in the <code>target/osgi</code> directory.</p>
<p><b>Source code and Issues</b></p>
<p>The source code is hosted at <a href="http://github.com/jetztgradnet/grails-osgi-plugin">GitHub</a>, issues can be reported <a href="http://github.com/jetztgradnet/grails-osgi-plugin/issues">here</a>.</p>
<p><b>Roadmap</b></p>
<ul>
<li>make bundle generation configurable (e.g. include/exclude dependencies, &#8230;)</li>
<li>make OSGi runtime created by <code>grails run-bundle</code> and <code>grails assemble-osgi-runtime</code> configurable</li>
<li>support auto-reloading of changed artifacts</li>
<li>use Spring DM instead of Pax Web as Web extender</li>
<li>remove dependencies from bundle and package them as their own plugins (re-using existing bundles from the <a href="http://www.springsource.com/repository">SpringSource Enterprise Repository</a></li>
<li>export main Grails beans and application context as OSGi service</li>
<li>export services as OSGi service (via <code>static expose = 'osgi'</code>)</li>
<li>provide access to OSGi <code>BundleContext</code> to artifacts (controllers, services, &#8230;)</li>
<li>implement deployment to DM Server</li>
<li>consider other deployment options: Apache Karaf, &#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2010/01/released-grails-osgi-plugin-0-1/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Started new offline Grails Plugin Repository</title>
		<link>http://blog.jetztgrad.net/2009/09/started-new-offline-grails-plugin-repository/</link>
		<comments>http://blog.jetztgrad.net/2009/09/started-new-offline-grails-plugin-repository/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 02:04:49 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=13</guid>
		<description><![CDATA[Plugrepo is an offline Grails (and maybe Griffon) plugin repository. It can be used as an offline proxy for the grails.org repository as well as a repository for internal plugins, which are not ment to be published.
The application is work in progress, see project page at http://github.com/jetztgradnet/plugrepo/

]]></description>
			<content:encoded><![CDATA[<p>Plugrepo is an offline Grails (and maybe Griffon) plugin repository. It can be used as an offline proxy for the grails.org repository as well as a repository for internal plugins, which are not ment to be published.</p>
<p>The application is work in progress, see project page at <a title="GitHub" href="http://github.com/jetztgradnet/plugrepo/">http://github.com/jetztgradnet/plugrepo/</a></p>
<p><a title="GitHub" href="http://github.com/jetztgradnet/plugrepo/"></a><img class="alignnone size-medium wp-image-11" title="PlugRepo main screen" src="http://blog.jetztgrad.net/wp-content/uploads/2009/07/screenshot-main-300x256.png" alt="PlugRepo main screen" width="300" height="256" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2009/09/started-new-offline-grails-plugin-repository/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>(Temporarily) pulling the plug on Grails Monitor Plugin</title>
		<link>http://blog.jetztgrad.net/2008/02/temporarily-pulling-the-plug-on-grails-monitor-plugin/</link>
		<comments>http://blog.jetztgrad.net/2008/02/temporarily-pulling-the-plug-on-grails-monitor-plugin/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 13:04:00 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=7</guid>
		<description><![CDATA[I&#8217;m terribly sorry, but I have to (at least temporarily) pull the plug on Monitor Plugin due to possible conflicts with my employer.
In my professional live I&#8217;m working on high availability and monitoring software. When I showed the plugin to my employer,he asked me to suspend any activities regarding the plugin, until they decide whether [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m terribly sorry, but I have to (at least temporarily) pull the plug on Monitor Plugin due to possible conflicts with my employer.</p>
<p>In my professional live I&#8217;m working on high availability and monitoring software. When I showed the plugin to my employer,<br />he asked me to suspend any activities regarding the plugin, until they decide whether this conflicts with our products.</p>
<p>I hope I will be able to continue with the monitor plugin, but until this issue is resolved, I have removed both sources and<br />downloads. </p>
<p>Regards,</p>
<p>Wolfgang</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2008/02/temporarily-pulling-the-plug-on-grails-monitor-plugin/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Grails Monitor plugin 0.1 released</title>
		<link>http://blog.jetztgrad.net/2008/02/grails-monitor-plugin-0-1-released/</link>
		<comments>http://blog.jetztgrad.net/2008/02/grails-monitor-plugin-0-1-released/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 01:25:00 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=6</guid>
		<description><![CDATA[Just in time for the upcoming 2008 Groovy/Grails Experience, I released my Grails Monitor plugin in version 0.1 (Apache License).
It&#8217;s basically a preview version, but for anybody who was dying to get his or her hands on it, the Grails wiki has all the details on how to install and use the Monitor plugin. For [...]]]></description>
			<content:encoded><![CDATA[<p>Just in time for the upcoming 2008 <a href="http://groovygrails.com/gg/2gexperience">Groovy/Grails Experience</a>, I released my Grails Monitor plugin in version 0.1 (Apache License).</p>
<p>It&#8217;s basically a preview version, but for anybody who was dying to get his or her hands on it, the <a href="http://docs.codehaus.org/display/GRAILS/Monitor+plugin">Grails wiki</a> has all the details on how to install and use the Monitor plugin. For an introduction, see my <a href="/2008/02/introducing-grails-monitor-plugin.html">previous post</a>.</p>
<p>Installation is still a little clumsy as you have to jump through a few hoops because some patches to Grails and the Quartz plugin are needed in order to get the monitor plugin installed and running.</p>
<p>Lots of features are still missing, but for a first version it&#8217;s not too bad. I&#8217;m open to suggestions, criticism and usability reports. Of course, patches are most welcome <img src='http://blog.jetztgrad.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Happy monitoring,</p>
<p>Wolfgang</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2008/02/grails-monitor-plugin-0-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Grails Monitor Plugin</title>
		<link>http://blog.jetztgrad.net/2008/02/introducing-the-grails-monitor-plugin/</link>
		<comments>http://blog.jetztgrad.net/2008/02/introducing-the-grails-monitor-plugin/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 01:15:00 +0000</pubDate>
		<dc:creator>jetztgradnet</dc:creator>
				<category><![CDATA[grails]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.jetztgrad.net/?p=5</guid>
		<description><![CDATA[Grails is a fantastic web framework based on Groovy, which brings the convention-over-configuration paradigm pioneered by Ruby on Rails to the Java world. There is currently a lot of buzz around Grails and so far I had a lot of fun working with the framework.
One aspect of Grails is easy extensibility using plugins. There are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://grails.org/">Grails</a> is a fantastic web framework based on <a href="http://groovy.codehaus.org/">Groovy</a>, which brings the convention-over-configuration paradigm pioneered by <a href="http://www.rubyonrails.org/">Ruby on Rails</a> to the Java world. There is currently a lot of <a href="http://groovyblogs.org/">buzz</a> around Grails and so far I had a lot of fun working with the framework.</p>
<p>One aspect of Grails is easy extensibility using plugins. There are already some <a href="http://grails.org/Plugins">plugins</a>, which cover a lot of functionality. I have been working on a plugin of my own, a generic monitoring plugin, which will be released shortly under a Apache License.</p>
<p>The monitoring plugin provides pre-defined monitors for many aspects of a web application. Additionally it is really easy to define your own monitors to track usage of application-specific metrics.</p>
<p>The plugin is based around <a href="https://rrd4j.dev.java.net/">rr4j</a>, which is a Java port of the well-known <a href="http://rrdtool.org/">RRDTool</a> and uses its data storage and graphing engine. It requires the <a href="http://grails.org/Quartz+plugin">Quartz Plugin</a> (with my patches for <a href="http://jira.codehaus.org/browse/GRAILSPLUGINS-190">GRAILSPLUGINS-190</a> and <a href="http://jira.codehaus.org/browse/GRAILSPLUGINS-213">GRAILSPLUGINS-213</a>) and Java 1.5 or greater.</p>
<p><span style="font-weight: bold;">So, what does it look like?</span> Some Screenshots (click for bigger image):</p>
<div style="text-align: center;">The monitor view showing the System group:</div>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blogfiles.jimone.org/grails-monitor/system.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://blogfiles.jimone.org/grails-monitor/system.png" alt="" border="0" /></a>
<div style="text-align: center;">The Web group with the Requests graphs:</div>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blogfiles.jimone.org/grails-monitor/web-requests.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://blogfiles.jimone.org/grails-monitor/web-requests.png" alt="" border="0" /></a>
<div style="text-align: center;">The Web group with the UserAgent graphs:</div>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blogfiles.jimone.org/grails-monitor/web-useragent.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px;" src="http://blogfiles.jimone.org/grails-monitor/web-useragent.png" alt="" border="0" /></a></p>
<p><span style="font-weight: bold;">So, how do I define a monitor of my own?</span> Following the Grails philosophy of convention over configuration, the monitor plugin defines its own artefact type: Monitor.</p>
<p>Creating an application-specific monitor involves defining a class ending in &#8216;Monitor&#8217; in the ./grails-app/monitor/ directory and adding some simple elements:</p>
<pre name="code" class="groovy">class SessionMonitor implements HttpSessionListener {  def activeSessions = 0L

  static monitorName = 'Sessions'  static monitorGroup = 'Web'  static monitorDescription = """The ${monitorName} monitor contains information regarding active sessions."""

  static monitorDefs = {     'activeSessions'( type:'gauge', aggregation:'avg', min:0) {        description = "Number of active sessions"     }  }

  static monitorGraphDefs = {     'activeSessions'() {        title = '''Active sessions'''        description = title

        // graph sources        source(id:'activeSessions', metric:'activeSessions', aggregation:'average')

        // what to draw        area(id:'activeSessions', legend:true)     }  }

  void sessionCreated(HttpSessionEvent se) {     activeSessions++  }

  void sessionDestroyed(HttpSessionEvent se) {     if (activeSessions > 0) {        activeSessions--     }  }}</pre>
<p>The monitor class specifies a name (monitorName), a group it belongs to (monitorGroup, e.g. &#8216;Web&#8217;, &#8216;System&#8217;, or &#8216;Application&#8217;) and optionally a description (monitorDescription). Two DSLs, one for metrics (monitorDefs), one for graphs (monitorGraphDefs), allow to specify the monitored values and what the graphs should look like. Values are collected periodically (currently every minute) using a Quartz-controlled job.</p>
<p>Details will follow once the plugin is released. It still needs some work for the UI and behind the scenes, but a first version will be available soon.</p>
<p><b>Roadmap</b></p>
<p>I have plenty of ideas for additional features and monitors.</p>
<p>Features:</p>
<p>JMX export<br />XML/JSON/CSV export<br />Support for non-numeric data (e.g. Java version, OS name, hostname, &#8230;)<br />Possibly storage backends other than RRD4J (e.g. a database)<br />Notification via EMail when certain thresholds are exceeded<br />Integration of other graphing solutions, like <a href="http://groovy.dzone.com/news/charting-jfreechart-groovy">JFreeChart</a></p>
<p>Monitors:</p>
<p>Count per Domain object<br />Requests by controller/action<br />Database/GORM query stats (using Hibernate statistics)<br />Special monitors for some databases (MySQL &#8220;SHOW STATS&#8221;, &#8230;)<br />Security monitor for JSecurity/ACEGI/CAS plugins<br />Monitor for Quartz jobs (job runs, min/max/avg duration)</p>
<p>Basically, the idea is, that every plugin would provide its own set of monitors for the contributed functionality.</p>
<p>I you have any other idea, advice, or feature requests please feel free to post a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jetztgrad.net/2008/02/introducing-the-grails-monitor-plugin/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
