Github user mmiklavc commented on the issue:

    https://github.com/apache/metron/pull/1157
  
    **Testing**
    
    Test plan pulled from here - 
https://github.com/apache/metron/pull/1081#issuecomment-400556832
    
    Get PCAP data into Metron: 
    1. Install and setup pycapa (this has been updated in master recently) - 
https://github.com/apache/metron/blob/master/metron-sensors/pycapa/README.md#centos-6
    2. (if using singlenode vagrant) Kill the enrichment, profiler, indexing, 
and sensor topologies via `for i in bro enrichment random_access_indexing 
batch_indexing yaf snort;do storm kill $i;done`
    3. Start the pcap topology via $METRON_HOME/bin/start_pcap_topology.sh
    4. Start the pycapa packet capture producer on eth1 via /usr/bin/pycapa 
--producer --topic pcap -i eth1 -k node1:6667
    5. Watch the topology in the Storm UI and kill the packet capture utility 
from before, when the number of packets ingested is over 3k.
    6. Ensure that at at least 3 files exist on HDFS by running hadoop fs -ls 
/apps/metron/pcap
    7. Choose a file (denoted by $FILE) and dump a few of the contents using 
the pcap_inspector utility via $METRON_HOME//bin/pcap_inspector.sh -i $FILE -n 5
    8. Choose one of the lines and note the protocol.
    9. Note that when you run the commands below, the resulting file will be 
placed in the execution directory where you kicked off the job from.
    
    ### Fixed filter
    
    1. Run a fixed filter query by executing the following command with the 
values noted above (match your start_time format to the date format provided - 
default is to use millis since epoch)
    2. `$METRON_HOME/bin/pcap_query.sh fixed -st <start_time> -df "yyyyMMdd" -p 
<protocol_num> -rpf 500`
    3. Verify the MR job finishes successfully. Upon completion, you should see 
multiple files named with relatively current datestamps in your current 
directory, e.g. pcap-data-20160617160549737+0000.pcap
    4. Copy the files to your local machine and verify you can them it in 
Wireshark. I chose a middle file and the last file. The middle file should have 
500 records (per the records_per_file option), and the last one will likely 
have a number of records <= 500.
    
    ### Query filter
    
    1. Run a Stellar query filter query by executing a command similar to the 
following, with the values noted above (match your start_time format to the 
date format provided - default is to use millis since epoch)
    2. `$METRON_HOME/bin/pcap_query.sh query -st "20160617" -df "yyyyMMdd" 
-query "protocol == '6'"  -rpf 500`
    3. Verify the MR job finishes successfully. Upon completion, you should see 
multiple files named with relatively current datestamps in your current 
directory, e.g. pcap-data-20160617160549737+0000.pcap
    4. Copy the files to your local machine and verify you can them it in 
Wireshark. I chose a middle file and the last file. The middle file should have 
500 records (per the records_per_file option), and the last one will likely 
have a number of records <= 500.
    
    Also run riffs on the fixed query via the Metron Alerts UI PCAP query panel.


---

Reply via email to