You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2015/07/26 10:02:10 UTC

[1/2] karaf-decanter git commit: Cleanup import package

Repository: karaf-decanter
Updated Branches:
  refs/heads/master d68348c23 -> 0f9a9905f


Cleanup import package


Project: http://git-wip-us.apache.org/repos/asf/karaf-decanter/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-decanter/commit/085f0070
Tree: http://git-wip-us.apache.org/repos/asf/karaf-decanter/tree/085f0070
Diff: http://git-wip-us.apache.org/repos/asf/karaf-decanter/diff/085f0070

Branch: refs/heads/master
Commit: 085f00705518dd18aa178031476aa3c624615ab8
Parents: d68348c
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Sun Jul 26 09:59:20 2015 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Sun Jul 26 09:59:20 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/karaf/decanter/collector/log/LogAppender.java  | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/085f0070/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
----------------------------------------------------------------------
diff --git a/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java b/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
index 29f882a..ddcb8f6 100644
--- a/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
+++ b/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
@@ -17,8 +17,6 @@
 package org.apache.karaf.decanter.collector.log;
 
 import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;
 


[2/2] karaf-decanter git commit: [KARAF-3865] Complete decanter documentation

Posted by jb...@apache.org.
[KARAF-3865] Complete decanter documentation


Project: http://git-wip-us.apache.org/repos/asf/karaf-decanter/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-decanter/commit/0f9a9905
Tree: http://git-wip-us.apache.org/repos/asf/karaf-decanter/tree/0f9a9905
Diff: http://git-wip-us.apache.org/repos/asf/karaf-decanter/diff/0f9a9905

Branch: refs/heads/master
Commit: 0f9a9905f3e3044ff997f76fbbd42803b83e16dd
Parents: 085f007
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Sun Jul 26 09:59:32 2015 +0200
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Sun Jul 26 09:59:32 2015 +0200

----------------------------------------------------------------------
 .../main/asciidoc/dev-guide/architecture.adoc   |  13 +
 .../main/asciidoc/dev-guide/custom-alerter.adoc | 137 ++++++++
 .../asciidoc/dev-guide/custom-appender.adoc     | 138 ++++++++
 .../asciidoc/dev-guide/custom-collector.adoc    | 319 +++++++++++++++++++
 .../src/main/asciidoc/dev-guide/dev-index.adoc  |   8 +-
 manual/src/main/asciidoc/index.adoc             |   8 +-
 6 files changed, 621 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/dev-guide/architecture.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/dev-guide/architecture.adoc b/manual/src/main/asciidoc/dev-guide/architecture.adoc
index 12779e3..d5780a1 100644
--- a/manual/src/main/asciidoc/dev-guide/architecture.adoc
+++ b/manual/src/main/asciidoc/dev-guide/architecture.adoc
@@ -14,3 +14,16 @@
 
 == Architecture
 
+Apache Karaf Decanter uses OSGi EventAdmin to dispatch the harvested data between the collectors and the appenders,
+and also to throw the alerts to the alerters:
+
+* `decanter/collect/*` EventAdmin topics are used by the collectors to send the harvested data. The appenders consume
+from these topics and insert the data in a backend.
+* `decanter/alert/*` EventAdmin topics are used by the SLA checker to send the alerts. The SLA alerters consume from
+these topics.
+
+Decanter uses EventAdmin topics as monitoring events dispatcher.
+
+Collectors, appenders, and alerters are simple OSGi services exposed by different bundles.
+
+It means that you can easily extend Decanter adding your own collectors, appenders, or alerters.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/dev-guide/custom-alerter.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/dev-guide/custom-alerter.adoc b/manual/src/main/asciidoc/dev-guide/custom-alerter.adoc
new file mode 100644
index 0000000..c72bded
--- /dev/null
+++ b/manual/src/main/asciidoc/dev-guide/custom-alerter.adoc
@@ -0,0 +1,137 @@
+//
+// Licensed 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.
+//
+
+== Custom SLA Alerter
+
+A Decanter SLA Alerter is basically a special kind of appender.
+
+It's an OSGi EventAdmin EventHandler: it's listening of `decanter/alert/*` EventAdmin topics, and
+receives the alerting data coming from the SLA checker.
+
+To enable a new Decanter Alerter, you just have to register an EventHandler OSGi service, like we do for an appender.
+
+For instance, if you want to create a very simple SystemOutAlerter that displays the alert (coming from the
+SLA checker) to System.out, you can create the following SystemOutAlerter class implementing EventHandler interface:
+
+----
+package org.apache.karaf.decanter.sample.alerter.systemout;
+
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+
+import java.util.HashMap;
+
+public class SystemOutAlerter implements EventHandler {
+
+    @Override
+    public void handleEvent(Event event) {
+        for (String name : event.getPropertyNames()) {
+            System.err.println(name + ":" + event.getProperty(name));
+        }
+    }
+
+}
+----
+
+Now, we create a BundleActivator that register our SystemOutAppender as an EventHandler OSGi service:
+
+----
+package org.apache.karaf.decanter.sample.alerter.systemout;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import java.util.HashMap;
+import java.util.Dictionary;
+
+public class Activator implements BundleActivator {
+
+  private ServiceRegistration registration;
+
+  public void start(BundleContext bundleContext) {
+    SystemOutAlerter alerter = new SystemOutAlerter();
+    Dictionary<String, String> properties = new Hashtable<>();
+    properties.put(EventConstants.EVENT_TOPIC, "decanter/alert/*");
+    registration =  bundleContext.registerService(EventHandler.class, alerter, properties);
+  }
+
+  public void stop(BundleContext bundleContext) {
+    if (registration != null) registration.unregister();
+  }
+
+}
+----
+
+You can see that our SystemOutAlerter will listen on any `decanter/alert/*` topics.
+
+We can now package our alerter bundle using the following Maven `pom.xml`:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">)
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.karaf.decanter.sample.alerter</groupId>
+    <artifactId>org.apache.karaf.decanter.sample.alerter.systemout</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Decanter :: Sample :: Alerter :: SystemOut</name>
+
+    <dependencies>
+
+        <!-- OSGi -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.4.0</version>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Version>${project.version}</Bundle-Version>
+                        <Bundle-Activator>org.apache.karaf.decanter.sample.alerter.systemout.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+----
+
+Once built, you can enable this alerter by deploying the bundle in Karaf (using the deploy folder or the `bundle:install` command).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/dev-guide/custom-appender.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/dev-guide/custom-appender.adoc b/manual/src/main/asciidoc/dev-guide/custom-appender.adoc
new file mode 100644
index 0000000..4b50a0d
--- /dev/null
+++ b/manual/src/main/asciidoc/dev-guide/custom-appender.adoc
@@ -0,0 +1,138 @@
+//
+// Licensed 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.
+//
+
+== Custom Appender
+
+A Decanter Appender is an OSGi EventAdmin EventHandler: it's listening of `decanter/collect/*` EventAdmin topics, and
+receives the monitoring data coming from the collectors.
+
+It's responsible to store the data into a target backend.
+
+To enable a new Decanter Appender, you just have to register an EventHandler OSGi service.
+
+For instance, if you want to create a very simple SystemOutAppender that displays the monitoring data (coming from the
+collectors) to System.out, you can create the following SystemOutAppender class implementing EventHandler interface:
+
+----
+package org.apache.karaf.decanter.sample.appender.systemout;
+
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+
+import java.util.HashMap;
+
+public class SystemOutAppender implements EventHandler {
+
+    @Override
+    public void handleEvent(Event event) {
+        for (String name : event.getPropertyNames()) {
+            System.out.println(name + ":" + event.getProperty(name));
+        }
+    }
+
+}
+
+----
+
+Now, we create a BundleActivator that register our SystemOutAppender as an EventHandler OSGi service:
+
+----
+package org.apache.karaf.decanter.sample.appender.systemout;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import java.util.HashMap;
+import java.util.Dictionary;
+
+public class Activator implements BundleActivator {
+
+  private ServiceRegistration registration;
+
+  public void start(BundleContext bundleContext) {
+    SystemOutAppender appender = new SystemOutAppender();
+    Dictionary<String, String> properties = new Hashtable<>();
+    properties.put(EventConstants.EVENT_TOPIC, "decanter/collect/*");
+    registration =  bundleContext.registerService(EventHandler.class, appender, properties);
+  }
+
+  public void stop(BundleContext bundleContext) {
+    if (registration != null) registration.unregister();
+  }
+
+}
+----
+
+You can see that our SystemOutAppender will listen on any `decanter/collect/*` topics.
+
+We can now package our appender bundle using the following Maven `pom.xml`:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">)
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.karaf.decanter.sample.appender</groupId>
+    <artifactId>org.apache.karaf.decanter.sample.appender.systemout</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Decanter :: Sample :: Appender :: SystemOut</name>
+
+    <dependencies>
+
+        <!-- OSGi -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.4.0</version>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Version>${project.version}</Bundle-Version>
+                        <Bundle-Activator>org.apache.karaf.decanter.sample.appender.systemout.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+----
+
+Once built, you can enable this appender by deploying the bundle in Karaf (using the deploy folder or the `bundle:install` command).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/dev-guide/custom-collector.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/dev-guide/custom-collector.adoc b/manual/src/main/asciidoc/dev-guide/custom-collector.adoc
new file mode 100644
index 0000000..7bc3697
--- /dev/null
+++ b/manual/src/main/asciidoc/dev-guide/custom-collector.adoc
@@ -0,0 +1,319 @@
+//
+// Licensed 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.
+//
+
+== Custom Collector
+
+A Decanter collector sends an OSGi EventAdmin event to a `decanter/collect/*` topic.
+
+You can create two kinds of collector:
+
+* event driven collector automatically reacts to some internal events. It creates an event sent to a topic.
+* polled collector is a Runnable OSGi service periodically executed by the Decanter Scheduler.
+
+=== Event Driven Collector
+
+For instance, the log collector is event driven: it automatically reacts to internal log events.
+
+To illustrate an Event Driven Collector, we can create a BundleCollector. This collector will react when a bundle state
+changes (installed, started, stopped, uninstalled).
+
+The purpose is to send a monitoring event in a collect topic. This monitoring event can be consumed by the appenders.
+
+We create the following `BundleCollector` class implemetings `SynchronousBundleListener` interface:
+
+----
+package org.apache.karaf.decanter.sample.collector;
+
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.Event;
+import java.util.HashMap;
+
+public class BundleCollector implements SynchronousBundleListener {
+
+    private EventAdmin eventAdmin;
+
+    public BundleCollector(Event eventAdmin) {
+      this.eventAdmin = eventAdmin;
+    }
+
+    @Override
+    public void bundleChanged(BundleEvent bundleEvent) {
+      HashMap<String, Object> data = new HashMap<>();
+      data.put("type", "bundle");
+      data.put("change", bundleEvent.getType());
+      data.put("id", bundleEvent.getBundle().getId());
+      data.put("location", bundleEvent.getBundle().getLocation());
+      data.put("symbolicName", bundleEvent.getBundle().getSymbolicName());
+      Event event = new Event("decanter/collect/bundle", data);
+      eventAdmin.postEvent(event);
+    }
+
+}
+----
+
+You can see here the usage of the OSGi EventAdmin as dispatcher: the collector creates a data map, and send it to
+a `decanter/collect/bundle` topic.
+
+We just need an Activator in the collector bundle to start our BundleCollector listener:
+
+----
+package org.apache.karaf.decanter.sample.collector;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class Activator implements BundleActivator {
+
+       private BundleCollector collector;
+
+       public void start(final BundleContext bundleContext) {
+           ServiceTracker tracker = new ServiceTracker(bundleContext, EventAdmin.class.getName(), null);
+           EventAdmin eventAdmin = (EventAdmin) tracker.waitForService(10000);
+           collector = new BundleCollector(eventAdmin);
+       }
+
+       public void stop(BundleContext bundleContext) {
+           collector = null;
+       }
+
+}
+----
+
+Now, we just need a Maven `pom.xml` to package the bundle with the correct OSGi headers:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.karaf.decanter.sample.collector</groupId>
+    <artifactId>org.apache.karaf.decanter.sample.collector.bundle</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Decanter :: Sample :: Collector :: Bundle</name>
+
+    <dependencies>
+
+        <!-- OSGi -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.4.0</version>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Version>${project.version}</Bundle-Version>
+                        <Bundle-Activator>org.apache.karaf.decanter.sample.collector.bundle.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+----
+
+You can now enable this collector, just by installing the bundle in Apache Karaf (using the deploy folder, or the
+`bundle:install` command.
+
+=== Polled Collector
+
+You can also create a polled collector.
+
+A polled collector is basically a Runnable OSGi service, periodically executed for you by the Decanter Scheduler.
+
+The run() method of the polled collector is responsible to harvest the data and send the monitoring event.
+
+For instance, we can create a very simple polled collector sending a constant `Hello World` string.
+
+We create the HelloCollector class implementing the Runnable interface:
+
+----
+package org.apache.karaf.decanter.sample.collector.hello;
+
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+import java.util.HashMap;
+
+public class HelloCollector implements Runnable {
+
+  private EventAdmin eventAdmin;
+
+  public HelloCollector(EventAdmin eventAdmin) {
+    this.eventAdmin = eventAdmin;
+  }
+
+  @Override
+  public void run() {
+    HashMap<String, Object> data = new HashMap<>();
+    data.put("type", "hello");
+    data.put("message", "Hello World");
+    Event event = new Event("decanter/collect/hello", data);
+    eventAdmin.postEvent(event);
+  }
+
+}
+----
+
+You can see the `run()` method which post the monitoring event in the `decanter/collector/hello` topic.
+
+We just need a BundleActivator to register the HelloCollector as an OSGi service:
+
+----
+package org.apache.karaf.decanter.sample.collector.hello;
+
+import org.osgi.framework.*;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class Activator implements BundleActivator {
+
+    private ServiceRegistration registration;
+
+    public void start(BundleContext bundleContext) {
+       ServiceTracker tracker = new ServiceTracker(bundleContext, EventAdmin.class.getName(), null);
+       EventAdmin eventAdmin = tracker.waitForService(10000);
+       HelloCollector collector = new HelloCollector(eventAdmin);
+
+       Dictionary<String, String> serviceProperties = new Hashtable<String, String>();
+       serviceProperties.put("decanter.collector.name", "hello");
+       registration = bundleContext.registerService(Runnable.class, collector, serviceProperties);
+    }
+
+    public void stop(BundleContext bundleContext) {
+       if (registration != null) registration.unregister();
+    }
+
+}
+----
+
+Now, we can package the bundle using the following Maven pom.xml:
+
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.karaf.decanter.sample.collector</groupId>
+    <artifactId>org.apache.karaf.decanter.sample.collector.hello</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Karaf :: Decanter :: Sample :: Collector :: Hello</name>
+
+    <dependencies>
+
+        <!-- OSGi -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.3.1</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.4.0</version>
+                <inherited>true</inherited>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Version>${project.version}</Bundle-Version>
+                        <Bundle-Activator>org.apache.karaf.decanter.sample.collector.hello.Activator</Bundle-Activator>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+----
+
+You can now enable this collector, just by installing the bundle in Apache Karaf (using the deploy folder, or the
+`bundle:install` command.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/dev-guide/dev-index.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/dev-guide/dev-index.adoc b/manual/src/main/asciidoc/dev-guide/dev-index.adoc
index 93d31fb..27b85da 100644
--- a/manual/src/main/asciidoc/dev-guide/dev-index.adoc
+++ b/manual/src/main/asciidoc/dev-guide/dev-index.adoc
@@ -20,4 +20,10 @@ Apache Karaf Decanter - Developer Guide
 :toc-title: Apache Karaf Decanter - Developer Guide
 :numbered:
 
-include::dev-guide/architecture.adoc[]
\ No newline at end of file
+include::dev-guide/architecture.adoc[]
+
+include::dev-guide/custom-collector.adoc[]
+
+include::dev-guide/custom-appender.adoc[]
+
+include::dev-guide/custom-alerter.adoc[]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/0f9a9905/manual/src/main/asciidoc/index.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc
index 9941249..13e4be9 100644
--- a/manual/src/main/asciidoc/index.adoc
+++ b/manual/src/main/asciidoc/index.adoc
@@ -34,4 +34,10 @@ include::user-guide/sla.adoc[]
 
 = Developer Guide
 
-include::dev-guide/architecture.adoc[]
\ No newline at end of file
+include::dev-guide/architecture.adoc[]
+
+include::dev-guide/custom-collector.adoc[]
+
+include::dev-guide/custom-appender.adoc[]
+
+include::dev-guide/custom-alerter.adoc[]
\ No newline at end of file