[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174653589 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python --- End diff -- This code block is broken in the rendered doc. ---
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174652376 --- Diff: metron-platform/Performance-tuning-guide.md --- @@ -422,10 +422,12 @@ modifying the options outlined above, increasing the poll timeout, or both. ## Reference +* [Enrichment Performance](metron-platform/metron-enrichment/Performance.md) --- End diff -- `s/metron-platform/./` ---
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174653285 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python + import dns.resolver + import csv + + resolver = dns.resolver.Resolver() + resolver.nameservers = ['8.8.8.8', '8.8.4.4'] +
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174654407 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python + import dns.resolver + import csv + + resolver = dns.resolver.Resolver() + resolver.nameservers = ['8.8.8.8', '8.8.4.4'] +
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174653386 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python + import dns.resolver + import csv + + resolver = dns.resolver.Resolver() + resolver.nameservers = ['8.8.8.8', '8.8.4.4'] +
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174653490 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python + import dns.resolver + import csv + + resolver = dns.resolver.Resolver() + resolver.nameservers = ['8.8.8.8', '8.8.4.4'] +
[GitHub] metron pull request #961: METRON-1487 Define Performance Benchmarks for Enri...
Github user JonZeolla commented on a diff in the pull request: https://github.com/apache/metron/pull/961#discussion_r174652892 --- Diff: metron-platform/metron-enrichment/Performance.md --- @@ -0,0 +1,527 @@ + + +# Enrichment Performance + +This guide defines a set of benchmarks used to measure the performance of the Enrichment topology. The guide also provides detailed steps on how to execute those benchmarks along with advice for tuning the Unified Enrichment topology. + +* [Benchmarks](#benchmarks) +* [Benchmark Execution](#benchmark-execution) +* [Performance Tuning](#performance-tuning) +* [Benchmark Results](#benchmark-results) + +## Benchmarks + +The following section describes a set of enrichments that will be used to benchmark the performance of the Enrichment topology. + +* [Geo IP Enrichment](#geo-ip-enrichment) +* [HBase Enrichment](#hbase-enrichment) +* [Stellar Enrichment](#stellar-enrichment) + +### Geo IP Enrichment + +This benchmark measures the performance of executing a Geo IP enrichment. Given a valid IP address the enrichment will append detailed location information for that IP. The location information is sourced from an external Geo IP data source like [Maxmind](https://github.com/maxmind/GeoIP2-java). + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a Geo IP enrichment. +``` +geo := GEO_GET(ip_dst_addr) +``` + +After the enrichment process completes, the telemetry message will contain a set of fields with location information for the given IP address. +``` +{ + "ip_dst_addr":"151.101.129.140", + ... + "geo.city":"San Francisco", + "geo.country":"US", + "geo.dmaCode":"807", + "geo.latitude":"37.7697", + "geo.location_point":"37.7697,-122.3933", + "geo.locID":"5391959", + "geo.longitude":"-122.3933", + "geo.postalCode":"94107", + } +``` + +### HBase Enrichment + +This benchmark measures the performance of executing an enrichment that retrieves data from an external HBase table. This type of enrichment is useful for enriching telemetry from an Asset Database or other source of relatively static data. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define an Hbase enrichment. This looks up the 'ip_dst_addr' within an HBase table 'top-1m' and returns a hostname. +``` +top1m := ENRICHMENT_GET('top-1m', ip_dst_addr, 'top-1m', 't') +``` + +After the telemetry has been enriched, it will contain the host and IP elements that were retrieved from the HBase table. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "top1m.host":"earther.com", + "top1m.ip":"151.101.2.166" +} +``` + +### Stellar Enrichment + +This benchmark measures the performance of executing a basic Stellar expression. In this benchmark, the enrichment is purely a computational task that has no dependence on an external system like a database. + + Configuration + +Adding the following Stellar expression to the Enrichment topology configuration will define a basic Stellar enrichment. The following returns true if the IP is in the given subnet and false otherwise. +``` +local := IN_SUBNET(ip_dst_addr, '192.168.0.0/24') +``` + +After the telemetry has been enriched, it will contain a field with a boolean value indicating whether the IP was within the given subnet. +``` +{ + "ip_dst_addr":"151.101.2.166", + ... + "local":false +} +``` + +## Benchmark Execution + +This section describes the steps necessary to execute the performance benchmarks for the Enrichment topology. + +* [Prepare Enrichment Data](#prepare-enrichment-data) +* [Load HBase with Enrichment Data](#load-hbase-with-enrichment-data) +* [Configure the Enrichments](#configure-the-enrichments) +* [Create Input Telemetry](#create-input-telemetry) +* [Cluster Setup](#cluster-setup) +* [Monitoring](#monitoring) + +### Prepare Enrichment Data + +The Alexa Top 1 Million was used as an data source for these benchmarks. + +1. Download the [Alexa Top 1 Million](http://s3.amazonaws.com/alexa-static/top-1m.csv.zip). + +2. For each hostname, query DNS to retrieve an associated IP address. + + A script like the following can be used for this. There is no need to do this for all 1 million entries in the data set. Doing this for around 10,000 records is sufficient. + + ```python + import dns.resolver + import csv + + resolver = dns.resolver.Resolver() + resolver.nameservers = ['8.8.8.8', '8.8.4.4'] +
[GitHub] metron pull request #958: METRON-1483: Create a tool to monitor performance ...
Github user cestella commented on a diff in the pull request: https://github.com/apache/metron/pull/958#discussion_r174478516 --- Diff: metron-contrib/metron-performance/src/main/java/org/apache/metron/performance/load/SendToKafka.java --- @@ -0,0 +1,107 @@ +/** + * 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. + */ +package org.apache.metron.performance.load; + +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerRecord; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.TimerTask; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; + +public class SendToKafka extends TimerTask { --- End diff -- Ah, so if I'm following you, making the `ThreadLocal` into `ThreadLocal>` would solve the issue, correct? I'd prefer to not change to`SendToKafka ` because it implies that we might be sending something other than String in this implementation. We would not because the message generator sends Strings and I'd prefer to not generalize that. ---
[GitHub] metron pull request #958: METRON-1483: Create a tool to monitor performance ...
Github user justinleet commented on a diff in the pull request: https://github.com/apache/metron/pull/958#discussion_r174488230 --- Diff: metron-contrib/metron-performance/src/main/java/org/apache/metron/performance/load/SendToKafka.java --- @@ -0,0 +1,107 @@ +/** + * 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. + */ +package org.apache.metron.performance.load; + +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerRecord; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.TimerTask; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; + +public class SendToKafka extends TimerTask { --- End diff -- Yeah, that's a fair point. Yeah, I'd just go ahead with `ThreadLocal>` and make the arguments to the couple functions that take it `KafkaProducer ` and I'm good. ---
[GitHub] metron pull request #958: METRON-1483: Create a tool to monitor performance ...
Github user justinleet commented on a diff in the pull request: https://github.com/apache/metron/pull/958#discussion_r174468438 --- Diff: metron-contrib/metron-performance/src/main/java/org/apache/metron/performance/load/SendToKafka.java --- @@ -0,0 +1,107 @@ +/** + * 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. + */ +package org.apache.metron.performance.load; + +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerRecord; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.TimerTask; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; + +public class SendToKafka extends TimerTask { --- End diff -- To expand on the reasoning for just making it SendToKafka, right now it's using raw KafkaProducer, with one exception. Since we already know the types, we can make it KafkaProducer in the arguments. I think we shouldn't leave it raw, because passing in a different KafkaProducer is going to be incorrect the exception at line 71: `KafkaProducer producer = kafkaProducer.get();`. I definitely don't think making the whole thing pluggable is worth doing now but making the KafkaProducer's all for correctness vs just making the class is basically the same amount of effort. ---
[GitHub] metron issue #961: METRON-1487 Define Performance Benchmarks for Enrichment ...
Github user justinleet commented on the issue: https://github.com/apache/metron/pull/961 I'm +1 by inspection, assuming @cestella is good with the requested changes. ---
[GitHub] metron pull request #963: METRON-1490: Better error message when user specif...
GitHub user cestella opened a pull request: https://github.com/apache/metron/pull/963 METRON-1490: Better error message when user specifies an enrichment type that doesn't exist ## Contributor Comments If a user specifies an enrichment adapter name that doesn't exist (e.g. `hbaseEnrichment` vs `hbaseThreatIntel`), then we NPE rather than express the issue in the logs. To test this, try to create an enrichment with an incorrect name. For instance, an enrichment like so: ``` { "enrichment": { "fieldMap": {}, "fieldToTypeMap": {}, "config": {} }, "threatIntel": { "fieldMap": { "hbaseEnrichment": ["ip_src_addr", "ip_dst_addr"] }, "fieldToTypeMap": { "ip_src_addr": ["malicious_ip"], "ip_dst_addr": ["malicious_ip"] }, "config": {}, "triageConfig": { "riskLevelRules": [], "aggregator": "MAX", "aggregationConfig": {} } }, "configuration": {} } ``` Because there is no enrichment adapter named `hbaseEnrichment` available for threat intel (the correct name is `hbaseThreatIntel`), an error should be noted in the logs and there should be a sensible message, such as: `java.lang.IllegalStateException: Unable to find an adapter for hbaseEnrichment, possible adapters are: stellar,hbaseThreatIntel` rather than a NPE. ## Pull Request Checklist Thank you for submitting a contribution to Apache Metron. Please refer to our [Development Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235) for the complete guide to follow for contributions. Please refer also to our [Build Verification Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview) for complete smoke testing guides. In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel). - [x] Does your PR title start with METRON- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [x] Has your PR been rebased against the latest commit within the target branch (typically master)? ### For code changes: - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed? - [x] Have you included steps or a guide to how the change may be verified and tested manually? - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via: ``` mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh ``` - [x] Have you written or updated unit tests and or integration tests to verify your changes? - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent? Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. It is also recommended that [travis-ci](https://travis-ci.org) is set up for your personal repository such that your branches are built there before submitting a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/cestella/incubator-metron METRON-1490 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/metron/pull/963.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #963 commit a0914b2db15ec94f98d2c82173c187bfc101bc04 Author: cstellaDate: 2018-03-14T21:02:12Z METRON-1490: Better error message when user specifies an enrichment type that doesn't exist ---
[GitHub] metron issue #958: METRON-1483: Create a tool to monitor performance of the ...
Github user cestella commented on the issue: https://github.com/apache/metron/pull/958 Moving this conversation to the top. I believe I have refactored the KafkaProducers appropriately. Let me know if I missed something, @justinleet ---