Added: 
dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/fastcapa/index.html
==============================================================================
--- dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/fastcapa/index.html 
(added)
+++ dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/fastcapa/index.html 
Fri Apr 28 03:53:51 2017
@@ -0,0 +1,1056 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-04-27
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20170427" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Metron &#x2013; Fastcapa</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.3.0.min.css" 
/>
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script type="text/javascript">$( document ).ready( function() { $( 
'.carousel' ).carousel( { interval: 3500 } ) } );</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://metron.apache.org/"; 
id="bannerLeft">
+                                                                               
                 <img src="../../images/metron-logo.png"  alt="Apache Metron" 
width="148px" height="48px"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="http://www.apache.org"; class="externalLink" 
title="Apache">
+        Apache</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="http://metron.apache.org/"; class="externalLink" 
title="Metron">
+        Metron</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="../../index.html" title="Documentation">
+        Documentation</a>
+        </li>
+      <li class="divider ">/</li>
+        <li class="">Fastcapa</li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right">Last Published: 
2017-04-27</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.0</li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">User Documentation</li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
           
+      <li>
+    
+                          <a href="../../index.html" title="Metron">
+          <i class="icon-chevron-down"></i>
+        Metron</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a href="../../Upgrading.html" title="Upgrading">
+          <i class="none"></i>
+        Upgrading</a>
+            </li>
+                                                                               
                                                                       
+      <li>
+    
+                          <a href="../../metron-analytics/index.html" 
title="Analytics">
+          <i class="icon-chevron-right"></i>
+        Analytics</a>
+                  </li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                     
+      <li>
+    
+                          <a href="../../metron-deployment/index.html" 
title="Deployment">
+          <i class="icon-chevron-right"></i>
+        Deployment</a>
+                  </li>
+                      
+      <li>
+    
+                          <a href="../../metron-docker/index.html" 
title="Docker">
+          <i class="none"></i>
+        Docker</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-config/index.html" title="Config">
+          <i class="none"></i>
+        Config</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-rest/index.html" title="Rest">
+          <i class="none"></i>
+        Rest</a>
+            </li>
+                                                                               
                                                                                
                                                                                
 
+      <li>
+    
+                          <a href="../../metron-platform/index.html" 
title="Platform">
+          <i class="icon-chevron-right"></i>
+        Platform</a>
+                  </li>
+                                                                               
                                       
+      <li>
+    
+                          <a href="../../metron-sensors/index.html" 
title="Sensors">
+          <i class="icon-chevron-down"></i>
+        Sensors</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a 
href="../../metron-sensors/bro-plugin-kafka/index.html" 
title="Bro-plugin-kafka">
+          <i class="none"></i>
+        Bro-plugin-kafka</a>
+            </li>
+                      
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Fastcapa</a>
+          </li>
+                      
+      <li>
+    
+                          <a href="../../metron-sensors/pycapa/index.html" 
title="Pycapa">
+          <i class="none"></i>
+        Pycapa</a>
+            </li>
+              </ul>
+        </li>
+              </ul>
+        </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <h1>Fastcapa</h1>
+<p>Fastcapa is a probe that performs fast network packet capture by leveraging 
Linux kernel-bypass and user space networking technology. The probe will bind 
to a network interface, capture network packets, and send the raw packet data 
to Kafka. This provides a scalable mechanism for ingesting high-volumes of 
network packet data into a Hadoop-y cluster.</p>
+<p>Fastcapa leverages the Data Plane Development Kit (<a class="externalLink" 
href="http://dpdk.org/";>DPDK</a>). DPDK is a set of libraries and drivers to 
perform fast packet processing in Linux user space. </p>
+
+<ul>
+  
+<li><a href="#Quick_Start">Quick Start</a></li>
+  
+<li><a href="#Requirements">Requirements</a></li>
+  
+<li><a href="#Installation">Installation</a></li>
+  
+<li><a href="#Usage">Usage</a>
+  
+<ul>
+    
+<li><a href="#Parameters">Parameters</a></li>
+    
+<li><a href="#Output">Output</a></li>
+    
+<li><a href="#Kerberos">Kerberos</a></li>
+  </ul></li>
+  
+<li><a href="#How_It_Works">How It Works</a></li>
+  
+<li><a href="#Performance">Performance</a></li>
+  
+<li><a href="#FAQs">FAQs</a></li>
+</ul>
+<div class="section">
+<h2><a name="Quick_Start"></a>Quick Start</h2>
+<p>The quickest way to see Fastcapa in action is to use a Virtualbox 
environment on your local machine. The necessary files and instructions to do 
this are located at <a 
href="../../metron-deployment/vagrant/fastcapa-test-platform/index.html"><tt>metron-deployment/vagrant/fastcapa-vagrant</tt></a>.
 All you need to do is execute the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>cd metron-deployment/vagrant/fastcapa-test-platform
+vagrant up
+</pre></div></div>
+<p>This environment sets up two nodes. One node produces network packets over 
a network interface. The second node uses Fastcapa to capture those packets and 
write them to a Kafka broker running on the first node. Basic validation is 
performed to ensure that Fastcapa is able to land packet data in 
Kafka.</p></div>
+<div class="section">
+<h2><a name="Requirements"></a>Requirements</h2>
+<p>The following system requirements must be met to run the Fastcapa probe.</p>
+
+<ul>
+  
+<li>Linux kernel &gt;= 2.6.34</li>
+  
+<li>A <a class="externalLink" href="http://dpdk.org/doc/nics";>DPDK supported 
ethernet device; NIC</a>.</li>
+  
+<li>Port(s) on the ethernet device that can be dedicated for exclusive use by 
Fastcapa</li>
+</ul></div>
+<div class="section">
+<h2><a name="Installation"></a>Installation</h2>
+<p>The process of installing Fastcapa has a fair number of steps and involves 
building DPDK, loading specific kernel modules, enabling huge page memory, and 
binding compatible network interface cards.</p>
+<div class="section">
+<h3><a name="Automated_Installation"></a>Automated Installation</h3>
+<p>The best documentation is code that actually does this for you. An Ansible 
role that performs the entire installation procedure can be found at <a 
href="../../metron-deployment/roles/fastcapa/index.html"><tt>metron-deployment/roles/fastcapa</tt></a>.
 Use this to install Fastcapa or as a guide for manual installation. The 
automated installation assumes CentOS 7.1 and is directly tested against <a 
class="externalLink" 
href="https://atlas.hashicorp.com/bento/boxes/centos-7.1";>bento/centos-7.1</a>.</p></div>
+<div class="section">
+<h3><a name="Manual_Installation"></a>Manual Installation</h3>
+<p>The following manual installation steps assume that they are executed on 
CentOS 7.1. Some minor differences may result if you use a different Linux 
distribution.</p>
+
+<ul>
+  
+<li><a href="#Enable_Transparent_Huge_Pages">Enable Transparent Huge 
Pages</a></li>
+  
+<li><a href="#Install_DPDK">Install DPDK</a></li>
+  
+<li><a href="#Install_Librdkafka">Install Librdkafka</a></li>
+  
+<li><a href="#Install_Fastcapa">Install Fastcapa</a></li>
+</ul>
+<div class="section">
+<h4><a name="Enable_Transparent_Huge_Pages"></a>Enable Transparent Huge 
Pages</h4>
+<p>The probe performs its own memory management by leveraging transparent huge 
pages. In Linux, Transparent Huge Pages (THP) can be enabled either dynamically 
or on boot. It is recommended that these be allocated on boot to increase the 
chance that a larger, physically contiguous chunk of memory can be 
allocated.</p>
+<p>The size of THPs that are supported will vary based on your CPU. These 
typically include 2 MB and 1 GB THPs. For better performance, allocate 1 GB 
THPs if supported by your CPU.</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Ensure that your CPU supports 1 GB THPs. A CPU flag <tt>pdpe1gb</tt> 
indicates whether or not the CPU supports 1 GB THPs.</p>
+  
+<div class="source">
+<div class="source">
+<pre>grep --color=always pdpe1gb /proc/cpuinfo | uniq
+</pre></div></div></li>
+  
+<li>
+<p>Add the following boot parameters to the Linux kernel. Edit 
<tt>/etc/default/grub</tt> and add the additional kernel parameters to the line 
starting with <tt>GRUB_CMDLINE_LINUX</tt>.</p>
+  
+<div class="source">
+<div class="source">
+<pre>GRUB_CMDLINE_LINUX=... default_hugepagesz=1G hugepagesz=1G hugepages=16
+</pre></div></div></li>
+  
+<li>
+<p>Rebuild the grub configuration then reboot. The location of the Grub 
configuration file will differ across Linux distributions.</p>
+  
+<div class="source">
+<div class="source">
+<pre>cp /etc/grub2-efi.cfg /etc/grub2-efi.cfg.orig
+/sbin/grub2-mkconfig -o /etc/grub2-efi.cfg
+</pre></div></div></li>
+  
+<li>
+<p>Once the host has been rebooted, ensure that the THPs were successfully 
allocated.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ grep HugePage /proc/meminfo
+AnonHugePages:    933888 kB
+HugePages_Total:      16
+HugePages_Free:        0
+HugePages_Rsvd:        0
+HugePages_Surp:        0
+</pre></div></div>
+<p>The total number of huge pages that you have been allocated should be 
distributed fairly evenly across each NUMA node. In this example, a total of 16 
were requested and 8 have been assigned on each of the 2 NUMA nodes.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ cat 
/sys/devices/system/node/node*/hugepages/hugepages-1048576kB/nr_hugepages
+8
+8
+</pre></div></div></li>
+  
+<li>
+<p>Once the THPs have been reserved, they need to be mounted to make them 
available to the probe.</p>
+  
+<div class="source">
+<div class="source">
+<pre>cp /etc/fstab /etc/fstab.orig
+mkdir -p /mnt/huge_1GB
+echo &quot;nodev /mnt/huge_1GB hugetlbfs pagesize=1GB 0 0&quot; &gt;&gt; 
/etc/fstab
+mount -fav
+</pre></div></div></li>
+</ol></div>
+<div class="section">
+<h4><a name="Install_DPDK"></a>Install DPDK</h4>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Install the required dependencies.</p>
+  
+<div class="source">
+<div class="source">
+<pre>yum -y install &quot;@Development tools&quot;
+yum -y install pciutils net-tools glib2 glib2-devel git
+yum -y install kernel kernel-devel kernel-headers
+</pre></div></div></li>
+  
+<li>
+<p>Decide where DPDK will be installed.</p>
+  
+<div class="source">
+<div class="source">
+<pre>export DPDK_HOME=/usr/local/dpdk/
+</pre></div></div></li>
+  
+<li>
+<p>Download, build and install DPDK.</p>
+  
+<div class="source">
+<div class="source">
+<pre>wget http://fast.dpdk.org/rel/dpdk-16.11.1.tar.xz -O - | tar -xJ
+cd dpdk-stable-16.11.1/
+make config install T=x86_64-native-linuxapp-gcc DESTDIR=$DPDK_HOME
+</pre></div></div></li>
+  
+<li>
+<p>Find the PCI address of the ethernet device that you plan on using to 
capture network packets. In the following example I plan on binding 
<tt>enp9s0f0</tt> which has a PCI address of <tt>09:00.0</tt>.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ lspci | grep &quot;VIC Ethernet&quot;
+09:00.0 Ethernet controller: Cisco Systems Inc VIC Ethernet NIC (rev a2)
+0a:00.0 Ethernet controller: Cisco Systems Inc VIC Ethernet NIC (rev a2)
+</pre></div></div></li>
+  
+<li>
+<p>Bind the device. Replace the device name and PCI address with what is 
appropriate for your environment.</p>
+  
+<div class="source">
+<div class="source">
+<pre>ifdown enp9s0f0
+modprobe uio_pci_generic
+$DPDK_HOME/sbin/dpdk-devbind --bind=uio_pci_generic &quot;09:00.0&quot;
+</pre></div></div></li>
+  
+<li>
+<p>Ensure that the device was bound. It should be shown as a &#x2018;network 
device using DPDK-compatible driver.&#x2019;</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ dpdk-devbind --status
+Network devices using DPDK-compatible driver
+============================================
+0000:09:00.0 'VIC Ethernet NIC' drv=uio_pci_generic unused=enic
+Network devices using kernel driver
+===================================
+0000:01:00.0 'I350 Gigabit Network Connection' if=eno1 drv=igb 
unused=uio_pci_generic
+</pre></div></div></li>
+</ol></div>
+<div class="section">
+<h4><a name="Install_Librdkafka"></a>Install Librdkafka</h4>
+<p>The probe has been tested with <a class="externalLink" 
href="https://github.com/edenhill/librdkafka/releases/tag/v0.9.4";>Librdkafka 
0.9.4</a>.</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Choose an installation path. In this example, the libs will actually be 
installed at <tt>/usr/local/lib</tt>; note that <tt>lib</tt> is appended to the 
prefix.</p>
+  
+<div class="source">
+<div class="source">
+<pre>export RDK_PREFIX=/usr/local
+</pre></div></div></li>
+  
+<li>
+<p>Download, build and install.</p>
+  
+<div class="source">
+<div class="source">
+<pre>wget https://github.com/edenhill/librdkafka/archive/v0.9.4.tar.gz  -O - | 
tar -xz
+cd librdkafka-0.9.4/
+./configure --prefix=$RDK_PREFIX
+make 
+make install
+</pre></div></div></li>
+  
+<li>
+<p>Ensure that the installation location is on the search path for the runtime 
shared library loader.</p>
+  
+<div class="source">
+<div class="source">
+<pre>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDK_PREFIX/lib
+</pre></div></div></li>
+</ol></div>
+<div class="section">
+<h4><a name="Install_Fastcapa"></a>Install Fastcapa</h4>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Set the required environment variables.</p>
+  
+<div class="source">
+<div class="source">
+<pre>export RTE_SDK=$DPDK_HOME/share/dpdk/
+export RTE_TARGET=x86_64-native-linuxapp-gcc
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDK_HOME
+</pre></div></div></li>
+  
+<li>
+<p>Build Fastcapa. The resulting binary will be placed at 
<tt>build/app/fastcapa</tt>.</p>
+  
+<div class="source">
+<div class="source">
+<pre>cd incubator-metron/metron-sensors/fastcapa
+make
+</pre></div></div></li>
+</ol></div></div></div>
+<div class="section">
+<h2><a name="Usage"></a>Usage</h2>
+<p>Follow these steps to run Fastcapa.</p>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Create a configuration file that at a minimum specifies your Kafka broker. 
An example configuration file, <tt>conf/fastcapa.conf</tt>, is available that 
documents other useful parameters.</p>
+  
+<div class="source">
+<div class="source">
+<pre>[kafka-global]
+metadata.broker.list = kafka-broker1:9092
+</pre></div></div></li>
+  
+<li>
+<p>Bind the capture device. This is only needed if the device is not already 
bound. In this example, the device <tt>enp9s0f0</tt> with a PCI address of 
<tt>09:00:0</tt> is bound. Use values specific to your environment.</p>
+  
+<div class="source">
+<div class="source">
+<pre>ifdown enp9s0f0
+modprobe uio_pci_generic
+$DPDK_HOME/sbin/dpdk-devbind --bind=uio_pci_generic &quot;09:00.0&quot;
+</pre></div></div></li>
+  
+<li>
+<p>Run Fastcapa.</p>
+  
+<div class="source">
+<div class="source">
+<pre>fastcapa -c 0x03 --huge-dir /mnt/huge_1GB -- -p 0x01 -t pcap -c 
/etc/fastcapa.conf
+</pre></div></div></li>
+  
+<li>
+<p>Terminate Fastcapa with <tt>SIGINT</tt> or by entering <tt>CTRL-C</tt>. The 
probe will cleanly shut down all of the workers and allow the backlog of 
packets to drain. To terminate the process without clearing the queue, send a 
<tt>SIGKILL</tt> or be entering <tt>killall -9 fastcapa</tt>.</p></li>
+</ol>
+<div class="section">
+<h3><a name="Parameters"></a>Parameters</h3>
+<p>Fastcapa accepts three sets of parameters. </p>
+
+<ol style="list-style-type: decimal">
+  
+<li>Command-line parameters passed directly to DPDK&#x2019;s Environmental 
Abstraction Layer (EAL)</li>
+  
+<li>Command-line parameters that define how Fastcapa will interact with DPDK. 
These parametera are separated on the command line by a double-dash 
(<tt>--</tt>).</li>
+  
+<li>A configuration file that define how Fastcapa interacts with 
Librdkafka.</li>
+</ol>
+<div class="section">
+<h4><a name="Environmental_Abstraction_Layer_Parameters"></a>Environmental 
Abstraction Layer Parameters</h4>
+<p>The most commonly used EAL parameter involves specifying which logical CPU 
cores should be used for processing. This can be specified in any of the 
following ways.</p>
+
+<div class="source">
+<div class="source">
+<pre>  -c COREMASK         Hexadecimal bitmask of cores to run on
+  -l CORELIST         List of cores to run on
+                      The argument format is &lt;c1&gt;[-c2][,c3[-c4],...]
+                      where c1, c2, etc are core indexes between 0 and 128
+  --lcores COREMAP    Map lcore set to physical cpu set
+                      The argument format is
+                            '&lt;lcores[@cpus]&gt;[&lt;,lcores[@cpus]&gt;...]'
+                      lcores and cpus list are grouped by '(' and ')'
+                      Within the group, '-' is used for range separator,
+                      ',' is used for single number separator.
+                      '( )' can be omitted for single element group,
+                      '@' can be omitted if cpus and lcores have the same 
value                     
+</pre></div></div>
+<p>To get more information about other EAL parameters, run the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>fastcapa -h
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Fastcapa-Core_Parameters"></a>Fastcapa-Core Parameters</h4>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th>Name </th>
+      
+<th>Command </th>
+      
+<th>Description </th>
+      
+<th>Default </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td>Port Mask </td>
+      
+<td>-p PORT_MASK </td>
+      
+<td>A bit mask identifying which ports to bind. </td>
+      
+<td>0x01 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Burst Size </td>
+      
+<td>-b BURST_SIZE </td>
+      
+<td>Maximum number of packets to receive at one time. </td>
+      
+<td>32 </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Receive Descriptors </td>
+      
+<td>-r NB_RX_DESC </td>
+      
+<td>The number of descriptors for each receive queue (the size of the receive 
queue.) Limited by the ethernet device in use. </td>
+      
+<td>1024 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Transmission Ring Size </td>
+      
+<td>-x TX_RING_SIZE </td>
+      
+<td>The size of each transmission ring. This must be a power of 2. </td>
+      
+<td>2048 </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Number Receive Queues </td>
+      
+<td>-q NB_RX_QUEUE </td>
+      
+<td>Number of receive queues to use for each port. Limited by the ethernet 
device in use. </td>
+      
+<td>2 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Kafka Topic </td>
+      
+<td>-t KAFKA_TOPIC </td>
+      
+<td>The name of the Kafka topic. </td>
+      
+<td>pcap </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>Configuration File </td>
+      
+<td>-c KAFKA_CONF </td>
+      
+<td>Path to a file containing configuration values. </td>
+      
+<td> </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>Stats </td>
+      
+<td>-s KAFKA_STATS </td>
+      
+<td>Appends performance metrics in the form of JSON strings to the specified 
file. </td>
+      
+<td> </td>
+    </tr>
+  </tbody>
+</table>
+<p>To get more information about the Fastcapa specific parameters, run the 
following. Note that this puts the <tt>-h</tt> after the double-dash 
<tt>--</tt>.</p>
+
+<div class="source">
+<div class="source">
+<pre>fastcapa -- -h
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Fastcapa-Kafka_Configuration_File"></a>Fastcapa-Kafka 
Configuration File</h4>
+<p>The path to the configuration file is specified with the <tt>-c</tt> 
command line argument. The file can contain any global or topic-specific, 
producer-focused <a class="externalLink" 
href="https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md";>configuration
 values accepted by Librdkafka</a>. </p>
+<p>The configuration file is a <tt>.ini</tt>-like Glib configuration file. The 
global configuration values should be placed under a <tt>[kafka-global]</tt> 
header and topic-specific values should be placed under 
<tt>[kafka-topic]</tt>.</p>
+<p>A minimally viable configuration file would only need to include the Kafka 
broker to connect to.</p>
+
+<div class="source">
+<div class="source">
+<pre>[kafka-global]
+metadata.broker.list = kafka-broker1:9092, kafka-broker2:9092
+</pre></div></div>
+<p>The configuration parameters that are important for either basic 
functioning or performance tuning of Fastcapa include the following.</p>
+<p>Global configuration values that should be located under the 
<tt>[kafka-global]</tt> header.</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th><i>Name</i> </th>
+      
+<th><i>Description</i> </th>
+      
+<th><i>Default</i> </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td>metadata.broker.list </td>
+      
+<td>Initial list of brokers as a CSV list of broker host or host:port </td>
+      
+<td> </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>client.id </td>
+      
+<td>Client identifier. </td>
+      
+<td> </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>queue.buffering.max.messages </td>
+      
+<td>Maximum number of messages allowed on the producer queue </td>
+      
+<td>100000 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>queue.buffering.max.ms </td>
+      
+<td>Maximum time, in milliseconds, for buffering data on the producer queue 
</td>
+      
+<td>1000 </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>message.copy.max.bytes </td>
+      
+<td>Maximum size for message to be copied to buffer. Messages larger than this 
will be passed by reference (zero-copy) at the expense of larger iovecs. </td>
+      
+<td>65535 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>batch.num.messages </td>
+      
+<td>Maximum number of messages batched in one MessageSet </td>
+      
+<td>10000 </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>statistics.interval.ms </td>
+      
+<td>How often statistics are emitted; 0 = never </td>
+      
+<td>0 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>compression.codec </td>
+      
+<td>Compression codec to use for compressing message sets; {none, gzip, 
snappy, lz4 } </td>
+      
+<td>none </td>
+    </tr>
+  </tbody>
+</table>
+<p>Topic configuration values that should be located under the 
<tt>[kafka-topic]</tt> header.</p>
+
+<table border="0" class="table table-striped">
+  <thead>
+    
+<tr class="a">
+      
+<th><i>Name</i> </th>
+      
+<th><i>Description</i> </th>
+      
+<th><i>Default</i> </th>
+    </tr>
+  </thead>
+  <tbody>
+    
+<tr class="b">
+      
+<td>compression.codec </td>
+      
+<td>Compression codec to use for compressing message sets; {none, gzip, 
snappy, lz4 } </td>
+      
+<td>none </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>request.required.acks </td>
+      
+<td>How many acknowledgements the leader broker must receive from ISR brokers 
before responding to the request; { 0 = no ack, 1 = leader ack, -1 = all ISRs } 
</td>
+      
+<td>1 </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>message.timeout.ms </td>
+      
+<td>Local message timeout. This value is only enforced locally and limits the 
time a produced message waits for successful delivery. A time of 0 is infinite. 
</td>
+      
+<td>300000 </td>
+    </tr>
+    
+<tr class="a">
+      
+<td>queue.buffering.max.kbytes </td>
+      
+<td>Maximum total message size sum allowed on the producer queue </td>
+      
+<td> </td>
+    </tr>
+  </tbody>
+</table></div></div>
+<div class="section">
+<h3><a name="Output"></a>Output</h3>
+<p>When running the probe some basic counters are output to stdout. Of course 
during normal operation these values will be much larger.</p>
+
+<div class="source">
+<div class="source">
+<pre>     ------ in ------  --- queued --- ----- out ----- ---- drops ----
+[nic]               8               -               -               -
+[rx]                8               0                8                0
+[tx]                8               0                8                0
+[kaf]               8               1                7                0
+</pre></div></div>
+
+<ul>
+  
+<li><tt>[nic]</tt> + <tt>in</tt>: The ethernet device is reporting that it has 
seen 8 packets.</li>
+  
+<li><tt>[rx]</tt> + <tt>in</tt>: The receive workers have consumed 8 packets 
from the device.</li>
+  
+<li><tt>[rx]</tt> + <tt>out</tt>: The receive workers have enqueued 8 packets 
onto the transmission rings.</li>
+  
+<li><tt>[rx]</tt> + <tt>drops</tt>: If the transmission rings become full it 
will prevent the receive workers from enqueuing additional packets. The excess 
packets are dropped. This value will never decrease.</li>
+  
+<li><tt>[tx]</tt> + <tt>in</tt>: The transmission workers have consumed 8 
packets.</li>
+  
+<li><tt>[tx]</tt> + <tt>out</tt>: The transmission workers have packaged 8 
packets into Kafka messages.</li>
+  
+<li><tt>[tx]</tt> + <tt>drops</tt>: If the Kafka client library accepted fewer 
packets than expected. This value can increase or decrease over time as 
additional packets are acknowledged by the Kafka client library at a later 
point in time.</li>
+  
+<li><tt>[kaf]</tt> + <tt>in</tt>: The Kafka client library has received 8 
packets.</li>
+  
+<li><tt>[kaf]</tt> + <tt>out</tt>: A total of 7 packets has successfully 
reached Kafka.</li>
+  
+<li><tt>[kaf]</tt> + <tt>queued</tt>: There is 1 packet within the 
<tt>rdkafka</tt> queue waiting to be sent.</li>
+</ul></div>
+<div class="section">
+<h3><a name="Kerberos"></a>Kerberos</h3>
+<p>The probe can be used in a Kerberized environment. Follow these additional 
steps to use Fastcapa with Kerberos. The following assumptions have been made. 
These may need altered to fit your environment.</p>
+
+<ul>
+  
+<li>The Kafka broker is at <tt>kafka1:6667</tt></li>
+  
+<li>Zookeeper is at <tt>zookeeper1:2181</tt></li>
+  
+<li>The Kafka security protocol is <tt>SASL_PLAINTEXT</tt></li>
+  
+<li>The keytab used is located at 
<tt>/etc/security/keytabs/metron.headless.keytab</tt></li>
+  
+<li>The service principal is <tt>met...@example.com</tt></li>
+</ul>
+
+<ol style="list-style-type: decimal">
+  
+<li>
+<p>Build Librdkafka with SASL support (<tt>--enable-sasl</tt>).</p>
+  
+<div class="source">
+<div class="source">
+<pre>wget https://github.com/edenhill/librdkafka/archive/v0.9.4.tar.gz  -O - | 
tar -xz
+cd librdkafka-0.9.4/
+./configure --prefix=$RDK_PREFIX --enable-sasl
+make 
+make install
+</pre></div></div></li>
+  
+<li>
+<p>Validate Librdkafka does indeed support SASL. Run the following command and 
ensure that <tt>sasl</tt> is returned as a built-in feature.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$ examples/rdkafka_example -X builtin.features
+builtin.features = gzip,snappy,ssl,sasl,regex
+</pre></div></div>
+<p>If it is not, ensure that you have <tt>libsasl</tt> or <tt>libsasl2</tt> 
installed. On CentOS, this can be installed with the following command.</p>
+  
+<div class="source">
+<div class="source">
+<pre>yum install -y cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi
+</pre></div></div></li>
+  
+<li>
+<p>Grant access to your Kafka topic. In this example, it is simply named 
<tt>pcap</tt>.</p>
+  
+<div class="source">
+<div class="source">
+<pre>$KAFKA_HOME/bin/kafka-acls.sh --authorizer 
kafka.security.auth.SimpleAclAuthorizer \
+  --authorizer-properties zookeeper.connect=zookeeper1:2181 \
+  --add --allow-principal User:metron --topic pcap
+</pre></div></div></li>
+  
+<li>
+<p>Obtain a Kerberos ticket.</p>
+  
+<div class="source">
+<div class="source">
+<pre>kinit -kt /etc/security/keytabs/metron.headless.keytab met...@example.com
+</pre></div></div></li>
+  
+<li>
+<p>Add the following additional configuration values to your Fastcapa 
configuration file.</p>
+  
+<div class="source">
+<div class="source">
+<pre>security.protocol = SASL_PLAINTEXT
+sasl.kerberos.keytab = /etc/security/keytabs/metron.headless.keytab
+sasl.kerberos.principal = met...@example.com
+</pre></div></div></li>
+  
+<li>
+<p>Now run Fastcapa as you normally would. It should have no problem landing 
packets in your kerberized Kafka broker.</p></li>
+</ol></div></div>
+<div class="section">
+<h2><a name="How_It_Works"></a>How It Works</h2>
+<p>The probe leverages a poll-mode, burst-oriented mechanism to capture 
packets from a network interface and transmit them efficiently to a Kafka 
topic. Each packet is wrapped within a single Kafka message and the current 
timestamp, as epoch microseconds in network byte order, is attached as the 
message&#x2019;s key.</p>
+<p>The probe leverages Receive Side Scaling (RSS), a feature provided by some 
ethernet devices that allows processing of received data to occur across 
multiple processes and logical cores. It does this by running a hash function 
on each packet, whose value assigns the packet to one, of possibly many, 
receive queues. The total number and size of these receive queues are limited 
by the ethernet device in use. More capable ethernet devices will offer a 
greater number and greater sized receive queues. </p>
+
+<ul>
+  
+<li>Increasing the number of receive queues allows for greater parallelization 
of receive side processing.</li>
+  
+<li>Increasing the size of each receive queue can allow the probe to handle 
larger, temporary spikes of network packets that can often occur.</li>
+</ul>
+<p>A set of receive workers, each assigned to a unique logical core, are 
responsible for fetching packets from the receive queues. There can only be one 
receive worker for each receive queue. The receive workers continually poll the 
receive queues and attempt to fetch multiple packets on each request. The 
maximum number of packets fetched in one request is known as the &#x2018;burst 
size&#x2019;. If the receive worker actually receives &#x2018;burst 
size&#x2019; packets, then it is likely that the queue is under pressure and 
more packets are available. In this case the worker immediately fetches another 
&#x2018;burst size&#x2019; set of packets. It repeats this process up to a 
fixed number of times while the queue is under pressure.</p>
+<p>The receive workers then enqueue the received packets into a fixed size 
ring buffer known as a transmit ring. There is always one transmit ring for 
each receive queue. A set of transmit workers then dequeue packets from the 
transmit rings. There can be one or more transmit workers assigned to any 
single transmit ring. Each transmit worker has its own unique connection to 
Kafka.</p>
+
+<ul>
+  
+<li>Increasing the number of transmit workers allows for greater 
parallelization when writing data to Kafka.</li>
+  
+<li>Increasing the size of the transmit rings allows the probe to better 
handle temporary interruptions and latency when writing to Kafka.</li>
+</ul>
+<p>After receiving the network packets from the transmit worker, the Kafka 
client library internally maintains its own send queue of messages. Multiple 
threads are then responsible for managing this queue and creating batches of 
messages that are sent in bulk to a Kafka broker. No control is exercised over 
this additional send queue and its worker threads, which can be an impediment 
to performance. This is an opportunity for improvement that can be addressed as 
follow-on work.</p></div>
+<div class="section">
+<h2><a name="Performance"></a>Performance</h2>
+<p>Beyond tuning the parameters previously described, the following should be 
carefully considered to achieve maximum performance.</p>
+<div class="section">
+<h3><a name="Kafka_Partitions"></a>Kafka Partitions</h3>
+<p>Parallelizing access to a topic in Kafka is achieved by defining multiple 
partitions. The greater the number of partitions, the more parallelizable 
access to that topic becomes. To achieve high throughput it is important to 
ensure that the Kafka topic in use has a large number of partitions, evenly 
distributed across each of the nodes in your Kafka cluster.</p>
+<p>The specific number of partitions needed will differ for each environment, 
but at least 128 partitions has been shown to significantly increase 
performance in some environments.</p></div>
+<div class="section">
+<h3><a name="Physical_Layout"></a>Physical Layout</h3>
+<p>It is important to note the physical layout of the hardware when assigning 
worker cores to the probe. The worker cores should be on the same NUMA node or 
socket as the ethernet device itself. Assigning logical cores across NUMA 
boundaries can significantly impede performance.</p>
+<p>The following commands can help identify logical cores that are located on 
the same NUMA node or socket as the ethernet device itself. These commands 
should be run when the device is still managed by the kernel itself; before 
binding the interface.</p>
+
+<div class="source">
+<div class="source">
+<pre>$ cat /sys/class/net/enp9s0f0/device/local_cpulist
+0-7,16-23
+</pre></div></div>
+<p>The following command can be used to better understand the physical layout 
of the CPU in relation to NUMA nodes.</p>
+
+<div class="source">
+<div class="source">
+<pre>$ lscpu
+...
+NUMA node0 CPU(s):     0-7,16-23
+NUMA node1 CPU(s):     8-15,24-31
+</pre></div></div>
+<p>In this example <tt>enp9s0f0</tt> is located on NUMA node 0 and is local to 
the logical cores 0-7 and 16-23. You should choose worker cores from this 
list.</p></div>
+<div class="section">
+<h3><a name="CPU_Isolation"></a>CPU Isolation</h3>
+<p>Once you have chosen the logical cores to use that are local to the 
ethernet device, it also beneficial to isolate those cores so that the Linux 
kernel scheduler does not attempt to run tasks on them. This can be done using 
the <tt>isolcpus</tt> kernel boot parameter.</p>
+
+<div class="source">
+<div class="source">
+<pre>isolcpus=0,1,2,3,4,5,6,7
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Device_Limitations"></a>Device Limitations</h3>
+<p>Check the output of running the probe to ensure that there are no device 
limitations that you are not aware of. While you may have specified 16 receive 
queues on the command line, your device may not support that number. This is 
especially true for the number of receive queues and descriptors.</p>
+<p>The following example shows the output when the number of receive 
descriptors requested is greater than what can be supported by the device. In 
many cases the probe will not terminate, but will choose the maximum allowable 
value and continue. This behavior is specific to the underlying device driver 
in use.</p>
+
+<div class="source">
+<div class="source">
+<pre>PMD: rte_enic_pmd: Rq 0 Scatter rx mode enabled
+PMD: rte_enic_pmd: Rq 0 Scatter rx mode not being used
+PMD: rte_enic_pmd: Number of rx_descs too high, adjusting to maximum
+PMD: rte_enic_pmd: Using 512 rx descriptors (sop 512, data 0)
+PMD: rte_enic_pmd: Rq 1 Scatter rx mode enabled
+PMD: rte_enic_pmd: Rq 1 Scatter rx mode not being used
+PMD: rte_enic_pmd: Number of rx_descs too high, adjusting to maximum
+PMD: rte_enic_pmd: Using 512 rx descriptors (sop 512, data 0)
+PMD: rte_enic_pmd: TX Queues - effective number of descs:32
+PMD: rte_enic_pmd: vNIC resources used:  wq 1 rq 4 cq 3 intr 0
+</pre></div></div></div>
+<div class="section">
+<h3><a name="More_Information"></a>More Information</h3>
+<p>More information on this topic can be found in <a class="externalLink" 
href="http://dpdk.org/doc/guides/linux_gsg/nic_perf_intel_platform.html";>DPDK&#x2019;s
 Getting Started Guide</a>.</p></div></div>
+<div class="section">
+<h2><a name="FAQs"></a>FAQs</h2>
+<div class="section">
+<h3><a name="No_free_hugepages_reported"></a>No free hugepages reported</h3>
+<p>Problem: When executing <tt>fastcapa</tt> it fails with the following error 
message.</p>
+
+<div class="source">
+<div class="source">
+<pre>EAL: No free hugepages reported in hugepages-1048576kB
+PANIC in rte_eal_init():
+Cannot get hugepage information
+</pre></div></div>
+<p>Solution: This can occur if any process that has been allocated THPs 
crashes and fails to return the resources. </p>
+
+<ul>
+  
+<li>
+<p>Delete the THP files that are not in use.</p>
+  
+<div class="source">
+<div class="source">
+<pre>rm -f /mnt/huge_1GB/rtemap_*
+</pre></div></div></li>
+  
+<li>
+<p>If the first option does not work, re-mount the <tt>hugetlbfs</tt> file 
system.</p>
+  
+<div class="source">
+<div class="source">
+<pre>umount -a -t hugetlbfs
+mount -a
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="No_ethernet_ports_detected"></a>No ethernet ports detected</h3>
+<p>Problem: When executing <tt>fastcapa</tt> it fails with the following error 
message.</p>
+
+<div class="source">
+<div class="source">
+<pre>EAL: Error - exiting with code: 1
+  Cause: No ethernet ports detected.
+</pre></div></div>
+
+<ul>
+  
+<li>Solution 1: The <tt>uio_pci_generic</tt> kernel module has not been 
loaded.</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre>modprobe uio_pci_generic
+</pre></div></div>
+
+<ul>
+  
+<li>Solution 2: Ensure that the ethernet device is bound. Re-bind if 
necessary.</li>
+</ul>
+
+<div class="source">
+<div class="source">
+<pre> dpdk-devbind --unbind &quot;09:00.0&quot;
+ dpdk-devbind --bind=uio_pci_generic &quot;09:00.0&quot;
+ dpdk-devbind --status
+</pre></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                   2017.
+          All Rights Reserved.      
+                    
+      </div>
+
+                          
+        
+                </div>
+    </footer>
+  </body>
+</html>

Added: dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/index.html
==============================================================================
--- dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/index.html (added)
+++ dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/index.html Fri Apr 
28 03:53:51 2017
@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-04-27
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20170427" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Metron &#x2013; Metron Sensors</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script type="text/javascript">$( document ).ready( function() { $( 
'.carousel' ).carousel( { interval: 3500 } ) } );</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://metron.apache.org/"; 
id="bannerLeft">
+                                                                               
                 <img src="../images/metron-logo.png"  alt="Apache Metron" 
width="148px" height="48px"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="http://www.apache.org"; class="externalLink" 
title="Apache">
+        Apache</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="http://metron.apache.org/"; class="externalLink" 
title="Metron">
+        Metron</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="../index.html" title="Documentation">
+        Documentation</a>
+        </li>
+      <li class="divider ">/</li>
+        <li class="">Metron Sensors</li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right">Last Published: 
2017-04-27</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.0</li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">User Documentation</li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
           
+      <li>
+    
+                          <a href="../index.html" title="Metron">
+          <i class="icon-chevron-down"></i>
+        Metron</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a href="../Upgrading.html" title="Upgrading">
+          <i class="none"></i>
+        Upgrading</a>
+            </li>
+                                                                               
                                                                       
+      <li>
+    
+                          <a href="../metron-analytics/index.html" 
title="Analytics">
+          <i class="icon-chevron-right"></i>
+        Analytics</a>
+                  </li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                     
+      <li>
+    
+                          <a href="../metron-deployment/index.html" 
title="Deployment">
+          <i class="icon-chevron-right"></i>
+        Deployment</a>
+                  </li>
+                      
+      <li>
+    
+                          <a href="../metron-docker/index.html" title="Docker">
+          <i class="none"></i>
+        Docker</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../metron-interface/metron-config/index.html" title="Config">
+          <i class="none"></i>
+        Config</a>
+            </li>
+                      
+      <li>
+    
+                          <a href="../metron-interface/metron-rest/index.html" 
title="Rest">
+          <i class="none"></i>
+        Rest</a>
+            </li>
+                                                                               
                                                                                
                                                                                
 
+      <li>
+    
+                          <a href="../metron-platform/index.html" 
title="Platform">
+          <i class="icon-chevron-right"></i>
+        Platform</a>
+                  </li>
+                                                                               
                                 
+      <li class="active">
+    
+            <a href="#"><i class="icon-chevron-down"></i>Sensors</a>
+                  <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a 
href="../metron-sensors/bro-plugin-kafka/index.html" title="Bro-plugin-kafka">
+          <i class="none"></i>
+        Bro-plugin-kafka</a>
+            </li>
+                      
+      <li>
+    
+                          <a href="../metron-sensors/fastcapa/index.html" 
title="Fastcapa">
+          <i class="none"></i>
+        Fastcapa</a>
+            </li>
+                      
+      <li>
+    
+                          <a href="../metron-sensors/pycapa/index.html" 
title="Pycapa">
+          <i class="none"></i>
+        Pycapa</a>
+            </li>
+              </ul>
+        </li>
+              </ul>
+        </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <h1>Metron Sensors</h1>
+<p><a name="Metron_Sensors"></a></p>
+
+<ul>
+  
+<li>Fast CAPA</li>
+  
+<li>Py CAPA</li>
+</ul>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                   2017.
+          All Rights Reserved.      
+                    
+      </div>
+
+                          
+        
+                </div>
+    </footer>
+  </body>
+</html>

Added: dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/pycapa/index.html
==============================================================================
--- dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/pycapa/index.html 
(added)
+++ dev/incubator/metron/0.4.0-RC2/book-site/metron-sensors/pycapa/index.html 
Fri Apr 28 03:53:51 2017
@@ -0,0 +1,280 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-04-27
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20170427" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Metron &#x2013; Pycapa</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.3.0.min.css" 
/>
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+
+      
+    <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.3.0.min.js"></script>
+
+                          
+        
+<script type="text/javascript">$( document ).ready( function() { $( 
'.carousel' ).carousel( { interval: 3500 } ) } );</script>
+          
+            </head>
+        <body class="topBarDisabled">
+          
+                
+                    
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                    <a href="http://metron.apache.org/"; 
id="bannerLeft">
+                                                                               
                 <img src="../../images/metron-logo.png"  alt="Apache Metron" 
width="148px" height="48px"/>
+                </a>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                              <li class="">
+                    <a href="http://www.apache.org"; class="externalLink" 
title="Apache">
+        Apache</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="http://metron.apache.org/"; class="externalLink" 
title="Metron">
+        Metron</a>
+        </li>
+      <li class="divider ">/</li>
+            <li class="">
+                    <a href="../../index.html" title="Documentation">
+        Documentation</a>
+        </li>
+      <li class="divider ">/</li>
+        <li class="">Pycapa</li>
+        
+                
+                    
+                  <li id="publishDate" class="pull-right">Last Published: 
2017-04-27</li> <li class="divider pull-right">|</li>
+              <li id="projectVersion" class="pull-right">Version: 0.4.0</li>
+            
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">User Documentation</li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
           
+      <li>
+    
+                          <a href="../../index.html" title="Metron">
+          <i class="icon-chevron-down"></i>
+        Metron</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a href="../../Upgrading.html" title="Upgrading">
+          <i class="none"></i>
+        Upgrading</a>
+            </li>
+                                                                               
                                                                       
+      <li>
+    
+                          <a href="../../metron-analytics/index.html" 
title="Analytics">
+          <i class="icon-chevron-right"></i>
+        Analytics</a>
+                  </li>
+                                                                               
                                                                                
                                                                                
                                                                                
                                                     
+      <li>
+    
+                          <a href="../../metron-deployment/index.html" 
title="Deployment">
+          <i class="icon-chevron-right"></i>
+        Deployment</a>
+                  </li>
+                      
+      <li>
+    
+                          <a href="../../metron-docker/index.html" 
title="Docker">
+          <i class="none"></i>
+        Docker</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-config/index.html" title="Config">
+          <i class="none"></i>
+        Config</a>
+            </li>
+                      
+      <li>
+    
+                          <a 
href="../../metron-interface/metron-rest/index.html" title="Rest">
+          <i class="none"></i>
+        Rest</a>
+            </li>
+                                                                               
                                                                                
                                                                                
 
+      <li>
+    
+                          <a href="../../metron-platform/index.html" 
title="Platform">
+          <i class="icon-chevron-right"></i>
+        Platform</a>
+                  </li>
+                                                                               
                                       
+      <li>
+    
+                          <a href="../../metron-sensors/index.html" 
title="Sensors">
+          <i class="icon-chevron-down"></i>
+        Sensors</a>
+                    <ul class="nav nav-list">
+                      
+      <li>
+    
+                          <a 
href="../../metron-sensors/bro-plugin-kafka/index.html" 
title="Bro-plugin-kafka">
+          <i class="none"></i>
+        Bro-plugin-kafka</a>
+            </li>
+                      
+      <li>
+    
+                          <a href="../../metron-sensors/fastcapa/index.html" 
title="Fastcapa">
+          <i class="none"></i>
+        Fastcapa</a>
+            </li>
+                      
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Pycapa</a>
+          </li>
+              </ul>
+        </li>
+              </ul>
+        </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/"; title="Built 
by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <h1>Pycapa</h1>
+<p><a name="Pycapa"></a></p>
+<div class="section">
+<h2><a name="Overview"></a>Overview</h2>
+<p>Pycapa performs network packet capture, both off-the-wire and from Kafka, 
which is useful for the testing and development of <a class="externalLink" 
href="https://github.com/apache/incubator-metron";>Apache Metron</a>. It is not 
intended for production use. The tool will capture packets from a specified 
interface and push them into a Kafka Topic.</p></div>
+<div class="section">
+<h2><a name="Installation"></a>Installation</h2>
+
+<div class="source">
+<div class="source">
+<pre>pip install -r requirements.txt
+python setup.py install
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Usage"></a>Usage</h2>
+
+<div class="source">
+<div class="source">
+<pre>$ pycapa --help
+usage: pycapa [-h] [-p] [-c] [-k KAFKA_BROKERS] [-t TOPIC] [-n PACKET_COUNT]
+              [-d DEBUG] [-i INTERFACE]
+
+optional arguments:
+  -h, --help            show this help message and exit
+  -p, --producer        sniff packets and send to kafka
+  -c, --consumer        read packets from kafka
+  -k KAFKA_BROKERS, --kafka KAFKA_BROKERS
+                        kafka broker(s)
+  -t TOPIC, --topic TOPIC
+                        kafka topic
+  -n PACKET_COUNT, --number PACKET_COUNT
+                        number of packets to consume
+  -d DEBUG, --debug DEBUG
+                        debug every X packets
+  -i INTERFACE, --interface INTERFACE
+                        interface to listen on
+</pre></div></div>
+<p>Pycapa has two primary runtime modes.</p>
+<div class="section">
+<h3><a name="Producer_Mode"></a>Producer Mode</h3>
+<p>Pycapa can be configured to capture packets from a network interface and 
then forward those packets to a Kafka topic. The following example will capture 
packets from the <tt>eth0</tt> network interface and forward those to a Kafka 
topic called <tt>pcap</tt> running on <tt>localhost</tt>.</p>
+
+<div class="source">
+<div class="source">
+<pre>pycapa --producer --kafka localhost:9092 --topic pcap -i eth0
+</pre></div></div>
+<p>To output debug messages every 100 captured packets, run the following.</p>
+
+<div class="source">
+<div class="source">
+<pre>pycapa --producer --kafka localhost:9092 --topic pcap -i eth0 --debug 100
+</pre></div></div></div>
+<div class="section">
+<h3><a name="Consumer_Mode"></a>Consumer Mode</h3>
+<p>Pycapa can be configured to consume packets from a Kafka topic and then 
write those packets to a <a class="externalLink" 
href="https://wiki.wireshark.org/Development/LibpcapFileFormat";>libpcap-compliant
 file</a>. To read 100 packets from a kafka topic and then write those to a <a 
class="externalLink" 
href="https://wiki.wireshark.org/Development/LibpcapFileFormat";>libpcap-compliant
 file</a>, run the following command. The file <tt>out.pcap</tt> can then be 
opened with a tool such as Wireshark for further validation.</p>
+
+<div class="source">
+<div class="source">
+<pre>pycapa --consumer --kafka localhost:9092 --topic pcap --n 100 &gt; 
out.pcap
+</pre></div></div>
+<p>To consume packets from Kafka continuously and print debug messages every 
10 packets, run the following command. </p>
+
+<div class="source">
+<div class="source">
+<pre>pycapa --consumer --kafka localhost:9092 --topic pcap --debug 10
+</pre></div></div></div></div>
+<div class="section">
+<h2><a name="Dependencies"></a>Dependencies</h2>
+
+<ul>
+  
+<li><a class="externalLink" 
href="https://github.com/dpkp/kafka-python";>kafka-python</a></li>
+  
+<li><a class="externalLink" 
href="https://github.com/CoreSecurity/pcapy";>pcapy</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Implementation"></a>Implementation</h2>
+<p>When run in Producer Mode, Pycapa embeds the raw network packet data in the 
Kafka message. The message key contains the timestamp indicating when the 
packet was captured in microseconds from the epoch. This value is in network 
byte order.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                   2017.
+          All Rights Reserved.      
+                    
+      </div>
+
+                          
+        
+                </div>
+    </footer>
+  </body>
+</html>


Reply via email to