diff --git a/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.properties b/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.properties
new file mode 100644
index 0000000..7883600
--- /dev/null
+++ b/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -0,0 +1,25 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+plugin.name = Apache Felix Web Console Event Plugin
+plugin.description = This is a plugin for the Apache Felix Web Console \
+ displaying all events occuring in the system.
+
+max.size.name = Maximum Events
+max.size.description = The maximum number of events displayed in the plugin.
diff --git a/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.xml b/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.xml
new file mode 100644
index 0000000..39b7f20
--- /dev/null
+++ b/webconsole-plugins/event/src/main/resources/OSGI-INF/metatype/metatype.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0" localization="OSGI-INF/metatype/metatype">
+    <OCD id="org.apache.felix.webconsole.plugins.event.internal.PluginServlet" name="%plugin.name" description="%plugin.description">
+        <AD id="max.size" type="Integer" default="250" name="%max.size.name" description="%max.size.description"/>
+    </OCD>
+    <Designate pid="org.apache.felix.webconsole.plugins.event.internal.PluginServlet">
+        <Object ocdref="org.apache.felix.webconsole.plugins.event.internal.PluginServlet"/>
+    </Designate>
+</metatype:MetaData>
diff --git a/webconsole-plugins/event/src/main/resources/res/ui/events.js b/webconsole-plugins/event/src/main/resources/res/ui/events.js
new file mode 100644
index 0000000..2d043af
--- /dev/null
+++ b/webconsole-plugins/event/src/main/resources/res/ui/events.js
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+function renderStatusLine() {
+	$("#plugin_content").append( "<div class='fullwidth'><div class='statusline'/></div>" );
+}
+
+function renderView( /* Array of String */ columns, /* String */ buttons ) {
+    renderStatusLine();
+    renderButtons(buttons);
+    var txt = "<div class='table'><table id='plugin_table' class='tablelayout'><thead><tr>";
+    for ( var name in columns ) {
+    	txt = txt + "<th class='col_" + columns[name] + "'>" + columns[name] + "</th>";
+    }
+    txt = txt + "</tr></thead><tbody></tbody></table></div>";
+    $("#plugin_content").append( txt );
+    renderButtons(buttons);
+    renderStatusLine();	
+}
+
+function renderButtons( buttons ) {
+	$("#plugin_content").append( "<form method='post' enctype='multipart/form-data'><div class='fullwidth'><div class='buttons'>" +
+	                             buttons + "</div></div></form>" );
+}
+
+function renderData( eventData )  {
+	$(".statusline").empty().append(eventData.status);
+	$("#plugin_table > tbody > tr").remove();	
+    for ( var idx in eventData.data ) {
+        entry( eventData.data[idx] );
+    }
+    $("#plugin_table").trigger("update");
+}
+
+function entry( /* Object */ dataEntry ) {
+    var trElement = tr( null, { id: "entry" + dataEntry.id } );
+    entryInternal( trElement,  dataEntry );
+	$("#plugin_table > tbody").append(trElement);	
+}
+
+
+function entryInternal( /* Element */ parent, /* Object */ dataEntry ) {
+    var id = dataEntry.id;
+    var topic = dataEntry.topic;
+    var properties = dataEntry.properties;
+
+    parent.appendChild( td( null, null, [ text( printDate(dataEntry.received) ) ] ) );
+    parent.appendChild( td( null, null, [ text( topic ) ] ) );
+
+    var propE;
+    if ( dataEntry.info ) {
+    	propE = text(dataEntry.info);
+    } else {
+	    var tableE = createElement("table");
+	    var bodyE = createElement("tbody");
+	    tableE.appendChild(bodyE);
+	
+	    for( var p in dataEntry.properties ) {
+	    	var c1 = td(null, null, [text(p)]);
+	    	$(c1).css("border", "0px none");
+            $(c1).css("padding", "0 4px 0 0");
+	    	var c2 = td(null, null, [text(dataEntry.properties[p])]);
+	    	$(c2).css("border", "0px none");
+            $(c2).css("padding", "0 0 0 4px");
+	    	bodyE.appendChild(tr(null, null, [ c1, c2 ]));
+	    }
+	    propE = tableE;
+    }
+    
+    parent.appendChild( td( null, null, [propE] ) );
+}
+
+/* displays a date in the user's local timezone */
+function printDate(time) {
+    var date = time ? new Date(time) : new Date();
+    return date.toLocaleString();
+}
+
+function loadData() {
+	$.get(pluginRoot + "/data.json", null, function(data) {
+	    renderData(data);
+	}, "json");	
+}
+
+function renderEvents() {
+	$(document).ready(function(){
+	    renderView( ["Received", "Topic", "Properties"],
+	    		 "<button class='clearButton' type='button' name='clear'>Clear List</button>" +
+	    		 "<button class='reloadButton' type='button' name='reload'>Reload</button>");
+	    loadData();
+	    
+	    $("#plugin_table").tablesorter();
+	    $(".reloadButton").click(loadData);
+	    $(".clearButton").click(function () {
+	    	$("#plugin_table > tbody > tr").remove();
+	    	$.post(pluginRoot, { "action":"clear" }, function(data) {
+	    	    renderData(data);
+	    	}, "json");
+	    });
+	});
+}
