{"id":112,"date":"2020-09-30T08:05:37","date_gmt":"2020-09-30T08:05:37","guid":{"rendered":"https:\/\/www.sdwan2.com\/?p=112"},"modified":"2020-09-30T08:48:44","modified_gmt":"2020-09-30T08:48:44","slug":"elastiflow-velocloud","status":"publish","type":"post","link":"https:\/\/www.sdwan2.com\/index.php\/2020\/09\/30\/elastiflow-velocloud\/","title":{"rendered":"Elastiflow and VMware SD-WAN by Velocloud \u2013 Part 1"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Objective of Elastiflow with VMware SD-WAN by Velocloud &#8211; Part 1<\/h3>\n\n\n\n<p>VMware SD-WAN (Velocloud) supports exports flow information in Netflow IPFIX format to one or more Netflow collectors, this is documented in \u201c<a href=\"https:\/\/docs.vmware.com\/en\/VMware-SD-WAN-by-VeloCloud\/3.4\/VMware-SD-WAN-by-VeloCloud-Administration-Guide\/GUID-6B05A10E-1056-4995-AB62-6621EBAA83C4.html?hWord=N4IghgNiBcIHYFMAuAzCB7A7iAvkA\">Configured Netflow Settings<\/a>\u201d.<\/p>\n\n\n\n<p>A Netflow collector supporting IPFIX in theory is able to display flows from Velocloud Edge. However, the Velocloud Edge flow has specific information such as \u201cvcFlowPath\u201d to describe the flow is going direct, going via Gateway, going via Hub Edge, etc. That means how much specific information to Velocloud is able to display in the Netflow collector is another story.<\/p>\n\n\n\n<p>As of the time of written this post, I am aware of two commercial products, which are <a href=\"https:\/\/www.vmware.com\/products\/vrealize-network-insight.html\">VMware vRealize Network Insight<\/a> and <a href=\"https:\/\/www.plixer.com\/products\/scrutinizer\/)\">Plixer Scrutinizer<\/a> both officially claims to support VMware SD-WAN by Velocloud.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/robcowart\/elastiflow\">Elastiflow<\/a> (<a href=\"https:\/\/github.com\/robcowart\/elastiflow\">https:\/\/github.com\/robcowart\/elastiflow<\/a>) caught my attention as it has added support of Velocloud since version 4.0.0 (<a href=\"https:\/\/github.com\/robcowart\/elastiflow\/releases\">https:\/\/github.com\/robcowart\/elastiflow\/releases<\/a>). More importantly, Elastiflow is free to use as per my understanding. As a result, I would love to have the Elastiflow up and running as a collector\/analyzer for Velocloud in my lab. Then I can see the capabilities of Elastiflow when working with Velocloud.<\/p>\n\n\n\n<p>In this \u201cPart 1\u201d, the target is to document the steps for installation of the Elastiflow to a stage that flows from Velocloud Edge are visible in Elastiflow. The capabilities, limitations, hints of integrating Elastiflow with Velocloud are targeted at \u201cPart 2\u201d (hopefully can get time to do that).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Elastiflow with Velocloud Topology<\/h3>\n\n\n\n<p>The following is the topology (Figure 1) for this post:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1263\" height=\"822\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure1_n.png\" alt=\"\" class=\"wp-image-160\"\/><figcaption>Figure 1<\/figcaption><\/figure>\n\n\n\n<p>The setup is a dark site (closed environment) which everything is simulated. The are two Velocloud Edges (VCE) and the focus is on the VCE with name Left-3-t which will be the one sending IPFIX to the ElastiFlow virtual machine (elastic02).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Version Information<\/h3>\n\n\n\n<p>VMware SD-WAN, Velocloud:<br>The VCE is this test is running version 3.4.3<\/p>\n\n\n\n<p>Elastiflow:<br>The VM responsible for Elastiflow is an Ubuntu 20.04 server with 4 x vCPU, 32G RAM, 250G storage. Elastiflow version is 4.0.1.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Elastiflow Installation and Configuration<\/h3>\n\n\n\n<p>The official procedure can be found here: <a href=\"https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/INSTALL.md\">https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/INSTALL.md<\/a><\/p>\n\n\n\n<p>Let\u2019s break down to the way how I get the installation done:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><strong>Note<\/strong>: In this post, root user is being used for running the commands in the Ubuntu Linux. This is a bad habit, do not treat that as a usual practice, using non-root user with sudo is recommended.<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Some preparations on the Linux<\/h4>\n\n\n\n<p>The Ubuntu Linux is named as elastic02, with static IP address 24.17.0.9<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Installing net-tool and unzip<\/h5>\n\n\n\n<p>This will make \u201cifconfig\u201d and \u201cunzip\u201d commands available for later use.<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#3e2fe5\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install net-tools unzip<\/span><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Adjust net.core.rmem_default and net.core.rmem_max<\/h5>\n\n\n\n<p>Since the IPFIX, Netflow are UDP packets, Elastiflow needs to increase the receive buffer size. Add the following two lines to <em>\/etc\/sysctl.conf<\/em><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">net.core.rmem_default = 33554432<\/span><\/code><br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">net.core.rmem_max = 33554432<\/span><\/code><\/pre>\n\n\n\n<p>The following figure shows the grep command output after the changes of <em>\/etc\/sysctl.conf<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"604\" height=\"86\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure2-1.png\" alt=\"\" class=\"wp-image-120\"\/><figcaption>Figure 2<\/figcaption><\/figure>\n\n\n\n<p>To make the change effective immediately, issue the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# sysctl -w net.core.rmem_default=33554432<br>net.core.rmem_default = 33554432<br>root@elastic02:\/home\/leejoe# sysctl -w net.core.rmem_max=33554432<br>net.core.rmem_max = 33554432<br>root@elastic02:\/home\/leejoe#<\/span><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Installing Java<\/h5>\n\n\n\n<p>Java is required by Logstash. Issue the follow command to install Java<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install default-jre<\/span><\/code><\/pre>\n\n\n\n<p>After the installation of Java is completed, verify the installation by &#8220;<em>java -version&#8221;<\/em><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# java -version\nopenjdk version \"11.0.8\" 2020-07-14\nOpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu120.04)\nOpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)\nroot@elastic02:\/home\/leejoe#<\/span><\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Disable the firewall<\/h5>\n\n\n\n<p>Since the purpose is to have a test environment to test the Elastiflow, disabling the firewall to avoid the firewall is blocking the ports needed for Netflow.<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# ufw disable\nFirewall stopped and disabled on system startup\nroot@elastic02:\/home\/leejoe#<\/span><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Elastic Stack Installation<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Installation of Elasticsearch<\/h4>\n\n\n\n<p>Firstly, import the Elasticsearch PGP Key by:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# wget -qO - https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch | sudo apt-key add -\nOK\nroot@elastic02:\/home\/leejoe#<\/span><\/code><\/pre>\n\n\n\n<p>Next, install the apt-transport-https<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install apt-transport-https<\/span><\/code><\/pre>\n\n\n\n<p>The 3<sup>rd<\/sup> step is to save the elastic-7.x repository definition<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# echo \"deb https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main\" | sudo tee \/etc\/apt\/sources.list.d\/elastic-7.x.list\ndeb https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main\nroot@elastic02:\/home\/leejoe#<\/span><\/code><\/pre>\n\n\n\n<p>Before the installation of Elastisearch, it is necessary to perform \u201capt update\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt update<\/span><\/code><\/pre>\n\n\n\n<p>Lastly, install Elasticsearch<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install elasticsearch<\/span><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration of Elasticsearch<\/h4>\n\n\n\n<p>The configuration file of Elasticsearch is <em>\/etc\/elasticsearch.yml<\/em><\/p>\n\n\n\n<p>The following are the changes I have made:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Change the \u201c<em>network.host<\/em>\u201d line from<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">#network.host: 192.168.0.1<\/span><\/code><br>To<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">network.host: 0.0.0.0<\/span><\/code><\/li><li>Change \u201c<em>cluster.initial_master_nodes<\/em>\u201d line from<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">#cluster.initial_master_nodes: [\"node-1\", \"node-2\"]<\/span><\/code><br>To<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">cluster.initial_master_nodes: [\"24.17.0.9\"]<\/span><\/code><\/li><li>Adding the following two lines to <em>\/etc\/elasticsearch.yml<\/em><br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">indices.query.bool.max_clause_count: 8192<br>search.max_buckets: 250000<\/span><\/code><\/li><\/ol>\n\n\n\n<p>The first change of <em>network.host<\/em> will make Elasticsearch listen on all IP addresses of the host. This change is not a must (probably not a good practice for production), I make this change which will let me check the Elasticsearch status over the network.<br>The second change of the <em>cluster.initial_mask_nodes<\/em> is to let the Elasticsearch aware there is only a single member in this configuration. You need to change the IP address to the corresponding IP address of your virtual machine.<br>The third changes of configuring the values of <em>indices.query.bool.max_clause_count<\/em> and <em>search.max_buckets<\/em> are the requirement of Elastiflow.<\/p>\n\n\n\n<p>The following screen capture shows the output of the corresponding parameters in <em>elasticsearch.yml<\/em> after the above changes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"868\" height=\"125\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure3-1.png\" alt=\"\" class=\"wp-image-122\"\/><figcaption>Figure 3<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Starting Elasticsearch and verification<\/h4>\n\n\n\n<p>Start Elasticsearch service by &#8220;<em>service elasticsearch start&#8221;<\/em><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/elasticsearch# service elasticsearch start<\/span><\/code><\/pre>\n\n\n\n<p>Check the Elasticsearch service is running or not by &#8220;<em>service elasticsearch status<\/em>&#8220;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1244\" height=\"301\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure4-1.png\" alt=\"\" class=\"wp-image-123\"\/><figcaption>Figure 4<\/figcaption><\/figure>\n\n\n\n<p>While confirmed the elasticsearch service is running, can point the browser to localhost:9200 to further check:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/elasticsearch# curl http:\/\/localhost:9200<br>{<br>\"name\" : \"elastic02\",<br>\"cluster_name\" : \"elasticsearch\",<br>\"cluster_uuid\" : \"IDMLMAzwQZWUZhJIO5aMxg\",<br>\"version\" : {<br>\"number\" : \"7.9.2\",<br>\"build_flavor\" : \"default\",<br>\"build_type\" : \"deb\",<br>\"build_hash\" : \"d34da0ea4a966c4e49417f2da2f244e3e97b4e6e\",<br>\"build_date\" : \"2020-09-23T00:45:33.626720Z\",<br>\"build_snapshot\" : false,<br>\"lucene_version\" : \"8.6.2\",<br>\"minimum_wire_compatibility_version\" : \"6.8.0\",<br>\"minimum_index_compatibility_version\" : \"6.0.0-beta1\"<br>},<br>\"tagline\" : \"You Know, for Search\"<br>}<br>root@elastic02:\/etc\/elasticsearch#<\/span><\/code><\/pre>\n\n\n\n<p>Getting an output similar to above means the elasticsearch service is running properly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Installation of Kibana<\/h4>\n\n\n\n<p>Since I am going to have a single Ubuntu hosting all three Elasticsearch, Kibana and Logstash, and Elasticsearch is already installed, at this stage, can go ahead to use apt to install Kibana:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install kibana<\/span><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration of Kibana<\/h4>\n\n\n\n<p>The configuration file of Kibana is <em>\/etc\/kibana\/kibana.yml<\/em><br>Two changes will be make in kibana.yml<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Uncomment the line <em>server.port: 5601<\/em><\/li><li>Change the \u201c<em>server.host<\/em>\u201d line from<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">#server.host: \"localhost\"<\/span><\/code><br>To<br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">server.host: \"0.0.0.0\"<\/span><\/code><\/li><\/ol>\n\n\n\n<p>The first change let Kibana to listen on the default port number 5601. The second change makes Kibana listening on all the IP addresses of the Ubuntu instead of just localhost, this allows visit the Kibana page over network.<br>The following screen capture shows the output of the corresponding parameters in <em>kibana.yml<\/em> after the above changes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1018\" height=\"164\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure5-1.png\" alt=\"\" class=\"wp-image-125\"\/><figcaption>Figure 5<\/figcaption><\/figure>\n\n\n\n<p>Check the Kibana service status by &#8220;<em>service kibana status<\/em>&#8220;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1252\" height=\"423\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure6-1.png\" alt=\"\" class=\"wp-image-126\"\/><figcaption>Figure 6<\/figcaption><\/figure>\n\n\n\n<p>Further verify by pointing the Chrome Browser to the Ubuntu IP address with port 5601, if the Kibana is running properly, should be able to see a page similar to this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1404\" height=\"835\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure7-1.png\" alt=\"\" class=\"wp-image-128\"\/><figcaption>Figure 7<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Installation of Logstash<\/h4>\n\n\n\n<p>Since I am going to have a single Ubuntu hosting all three Elasticsearch, Kibana and Logstash, and Elasticsearch is already installed, at this stage, can go ahead to use apt to install Logstash:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/home\/leejoe# apt install logstash<\/span><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configuring Logstash for Elastiflow<\/h4>\n\n\n\n<p>It is time to download the Elastiflow from github. In this example, download the Elastiflow to <em>\/var\/tmp<\/em><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/var\/tmp# wget https:\/\/github.com\/robcowart\/elastiflow\/archive\/master.zip<\/span><\/code><\/pre>\n\n\n\n<p>Rename the master.zip to elastiflow.zip and then unzip the elastiflow.zip:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/var\/tmp# mv master.zip elastiflow.zip\nroot@elastic02:\/var\/tmp# unzip elastiflow.zip<\/span><\/code><\/pre>\n\n\n\n<p>The following steps are from the procedure \u201cSetting up Logstash\u201d in INSTALL.md<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Tune Linux for improved UDP Throughput. Copy <em>87-elastiflow.conf<\/em> into <em>\/etc\/sysctl.d<\/em><\/li><\/ol>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/var\/tmp# cp \/var\/tmp\/elastiflow-master\/sysctl.d\/87-elastiflow.conf \/etc\/sysctl.d\/<\/span><\/code><\/pre>\n\n\n\n<p>2. Increase Logstash Priority<br>Edit <em>\/etc\/systemd\/system\/logstash.service<\/em> by change the line \u201c<em>Nice=19<\/em>\u201d to \u201c<em>Nice=0<\/em>\u201d. The screen capture below shows the grep output after the change<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"656\" height=\"60\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure8-2.png\" alt=\"\" class=\"wp-image-131\"\/><figcaption>Figure 8<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"3\"><li>Set JVM heap size<br>In this example, I am using the value of 4GB for JVM heap. Edit the <em>\/etc\/logstash\/jvm.options<\/em> such that the two lines &#8220;<em>-Xms1g<\/em>&#8221; and &#8220;<em>-Xmx1g<\/em>&#8221; becomes &#8220;<em>-Xms4g<\/em>&#8221; and &#8220;<em>-Xmx4g<\/em>&#8220;. The screen capture below shows the grep output after the change:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"582\" height=\"123\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure9-1.png\" alt=\"\" class=\"wp-image-133\"\/><figcaption>Figure 9<\/figcaption><\/figure>\n\n\n\n<p>4. Add and Update required Logstash plugins, such as sFlow<br>Issue the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin install logstash-codec-sflow\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-codec-netflow\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-input-udp\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-input-tcp\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-filter-dns\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-filter-geoip\nroot@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/logstash-plugin update logstash-filter-translate<\/span><\/code><\/pre>\n\n\n\n<p>5. Copy the pipeline files to the Logstash configuration path<br>Issue the follow command to copy the elastiflow folder to <em>\/etc\/logstash<\/em><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# cp -R \/var\/tmp\/elastiflow-master\/logstash\/elastiflow\/ \/etc\/logstash\/<\/span><\/code><\/pre>\n\n\n\n<p>6. Setup environment variable helper files<br>The goal is to copy the <em>logstash.service.d\/elastiflow.conf<\/em> to <em>\/etc\/systemd\/system\/logstash.service.d\/<\/em> folder<br><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# mkdir \/etc\/systemd\/system\/logstash.service.d\nroot@elastic02:\/etc\/logstash# cp \/var\/tmp\/elastiflow-master\/logstash.service.d\/elastiflow.conf \/etc\/systemd\/system\/logstash.service.d\nroot@elastic02:\/etc\/logstash#<\/span><\/code>\n<\/pre>\n\n\n\n<p>It is required to edit <em>\/etc\/systemd\/system\/logstash.service.d\/elastiflow.conf<\/em> to let Logstash knows is there an array of Elasticsearch or a single Elasticsearch. In this post, there is only a single Elasticsearch, thus, comment out the following 3 lines:<br><\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">Environment=\"ELASTIFLOW_ES_HOST_1=127.0.0.1:9200\"\nEnvironment=\"ELASTIFLOW_ES_HOST_2=127.0.0.2:9200\"\nEnvironment=\"ELASTIFLOW_ES_HOST_3=127.0.0.3:9200\"<\/span><\/code><\/pre>\n\n\n\n<p>After commented out the Elasticsearch array configuration, the output will be as the screen capture below with this grep command:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"762\" height=\"130\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure10-1.png\" alt=\"\" class=\"wp-image-135\"\/><figcaption>Figure 10<\/figcaption><\/figure>\n\n\n\n<p>     In order to have the changes to take, issue \u201c<em>sudo systemctl daemon-reload<\/em>\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# systemctl daemon-reload\nroot@elastic02:\/etc\/logstash#<\/span><\/code><\/pre>\n\n\n\n<p>7. Configure the Logstash pipelines<br>The pipelines configuration for Logstash is located at <em>\/etc\/logstash\/pipelines.yml<\/em>. Since the Elastiflow is the only pipelines will be used in this Elastic Stack, what we need to do is comment out the default main pipeline and add the following two lines to pipelines.yml<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">- pipeline.id: elastiflow\npath.config: \"\/etc\/logstash\/elastiflow\/conf.d\/*.conf\"<\/span><\/code><\/pre>\n\n\n\n<p>The following screen capture shows how <em>pipelines.yml<\/em> looks like after the change:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"723\" height=\"204\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure11-1.png\" alt=\"\" class=\"wp-image-137\"\/><figcaption>Figure 11<\/figcaption><\/figure>\n\n\n\n<p>8. Inputs for Logstash<br>There are situation you might need to adjust the inputs for Elastiflow, which the configuration files are located at &#8220;<em>\/etc\/logstash\/elastiflow\/conf.d<\/em>&#8220;. In this demonstration, the default looks good, so there is no changes being made.<\/p>\n\n\n\n<p>9. DNS name resolution<br>By default, the Elastiflow does not resolve the IP address to DNS name for flow exporter (Velocloud Edge in this case) and endpoints. In this demonstration, DNS name resolution will not be enabled, thus, no configuration change is required.<br>If you are interested in enabling the DNS name resolution, check \u201cEnable DNS name resolution (optional)&#8221; in the Elastiflow INSTALL.md (<a href=\"https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/INSTALL.md\">https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/INSTALL.md<\/a>)<\/p>\n\n\n\n<p>10. Install the Logstash init files<br>Install the Logstash init files by command &#8220;<em>\/usr\/share\/logstash\/bin\/system-install<\/em>&#8220;<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# \/usr\/share\/logstash\/bin\/system-install\nOpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.\n\/usr\/share\/logstash\/vendor\/bundle\/jruby\/2.5.0\/gems\/pleaserun-0.0.31\/lib\/pleaserun\/platform\/base.rb:112: warning: constant ::Fixnum is deprecated\nSuccessfully created system startup script for Logstash\nroot@elastic02:\/etc\/logstash#<\/span><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Starting Logstash service<\/h4>\n\n\n\n<p>Before starting the Logstash, it can be a good idea to run \u201c<em>systemctl daemon-reload<\/em>\u201d one more time, which will ensure any changes of the environment variables are getting effective. <\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# systemctl daemon-reload <\/span><\/code><br><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash#<\/span><\/code><\/pre>\n\n\n\n<p>To start the Logstash service, run \u201c<em>systemctl start logstash<\/em>\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-verse\"><code><span style=\"color:#441cf7\" class=\"has-inline-color\">root@elastic02:\/etc\/logstash# systemctl start logstash\nroot@elastic02:\/etc\/logstash#<\/span><\/code><\/pre>\n\n\n\n<p>The Logstash takes some time to get started (in my environment it takes about 1 minute), it is recommended to check the <em>\/var\/log\/logstash\/logstash-plain.log<\/em> to see the progress and also check any error messages.<br>The following is a screen capture showing the last few lines of &#8220;<em>tail -F \/var\/log\/logstash\/logstash-plain.log<\/em>&#8220;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1239\" height=\"727\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure12-1.png\" alt=\"\" class=\"wp-image-140\"\/><figcaption>Figure 12<\/figcaption><\/figure>\n\n\n\n<p>The installation and configuration of Logstash are done at this point.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting up Kibana<\/h3>\n\n\n\n<p>To load the Elastiflow dashboard to Kibana, import <em>\/kibana\/elastiflow.kibana.7.8.x.ndjson<\/em> (<a href=\"https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/kibana\/elastiflow.kibana.7.8.x.ndjson\">https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/kibana\/elastiflow.kibana.7.8.x.ndjson<\/a>) in the Kibana UI. To do this, go to Management &#8211;&gt; Stack Management &#8211;&gt; Kibana Saved Objects and select Import.<br>Follow the following 5 screen captures (Figure 13 &#8211; Figure 17) for the exact steps:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1675\" height=\"1007\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure13-1.png\" alt=\"\" class=\"wp-image-142\"\/><figcaption>Figure 13<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1702\" height=\"1005\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure14-1.png\" alt=\"\" class=\"wp-image-143\"\/><figcaption>Figure 14<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1641\" height=\"990\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure15-1.png\" alt=\"\" class=\"wp-image-144\"\/><figcaption>Figure 15<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1604\" height=\"963\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure156.png\" alt=\"\" class=\"wp-image-145\"\/><figcaption>Figure 16<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1644\" height=\"993\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure17-1.png\" alt=\"\" class=\"wp-image-146\"\/><figcaption>Figure 17<\/figcaption><\/figure>\n\n\n\n<p>Apply the \u201cRecommended Kibana Advanced Settings\u201d<\/p>\n\n\n\n<p>The <a href=\"https:\/\/github.com\/robcowart\/elastiflow\/blob\/master\/INSTALL.md\">INSTALL.md<\/a> documented very well on how and why some Kibana Advanced Settings need to be changed. Here will not repeat those, instead, the follow screen captures (Figure 18 &#8211; Figure 21) show how the settings look like after applied the recommended settings:<\/p>\n\n\n\n<p>doc_table:highlight<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1381\" height=\"565\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure18-1.png\" alt=\"\" class=\"wp-image-148\"\/><figcaption>Figure 18<\/figcaption><\/figure>\n\n\n\n<p>filters:pinnedByDefault<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1392\" height=\"808\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure19.png\" alt=\"\" class=\"wp-image-149\"\/><figcaption>Figure 19<\/figcaption><\/figure>\n\n\n\n<p>state:storeInSessionStorage<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1403\" height=\"822\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure20.png\" alt=\"\" class=\"wp-image-150\"\/><figcaption>Figure 20<\/figcaption><\/figure>\n\n\n\n<p>timepicker:quickRanges<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1394\" height=\"836\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure21.png\" alt=\"\" class=\"wp-image-151\"\/><figcaption>Figure 21<\/figcaption><\/figure>\n\n\n\n<p>The Elasticflow setup and configuration are completed at this point.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">VMware SD-WAN Edge (Velocloud Edge) configuration<\/h3>\n\n\n\n<p>To instruct the Velocloud Edge (VCE) sending the IPFIX netflow to the Elastiflow virtual machine, follow the steps below<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Add the Elastiflow IP address 24.17.0.9 with port number 2055 as Netflow Collector by: Configure &#8211;&gt; Network Services &#8211;&gt; Netflow Settings:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1386\" height=\"831\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure22.png\" alt=\"\" class=\"wp-image-152\"\/><figcaption>Figure 22<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>In the VCE (Edge-3-t in this example), enable the Netflow with this elastic02 collector under \u201cConfigure &#8211;&gt; Edges &#8211;&gt; Netflow Settings\u201d<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1497\" height=\"984\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure23.png\" alt=\"\" class=\"wp-image-153\"\/><figcaption>Figure 23<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>(Optional) In this lab test, I would like the VCE sending out the Netflow IPFIX packets directly on the Internet interface, that is local breakout instead of going via the SD-WAN Gateway. That\u2019s why I have added a business policy called Elastic02-Direct for this purpose, this business policy makes the VCE sending traffic destinated to 24.17.0.9 (that is the Elastiflow) sending out direct.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1362\" height=\"818\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure24.png\" alt=\"\" class=\"wp-image-154\"\/><figcaption>Figure 24<\/figcaption><\/figure>\n\n\n\n<p>The above 3 steps concludes the Netflow configuration in the Velocloud side.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Checking the Elastiflow Dashboard<\/h3>\n\n\n\n<p>If the Netflow setting was just configured in the Velocloud side, I suggest wait for 15 minutes to visit the Elastiflow Dashboard.<br>To visit the Elastiflow Dashboard, in the Kibana Home, click on Dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1631\" height=\"985\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure25.png\" alt=\"\" class=\"wp-image-155\"\/><figcaption>Figure 25<\/figcaption><\/figure>\n\n\n\n<p>Click on the \u201cElastiFlow: Overview\u201d, which is the landing page for ElastiFlow:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1629\" height=\"979\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure26.png\" alt=\"\" class=\"wp-image-156\"\/><figcaption>Figure 26<\/figcaption><\/figure>\n\n\n\n<p>The &#8220;Figure 27&#8221; below is the sample screen capture of \u201cElastiflow Overview\u201d from this test lab environment:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1894\" height=\"1002\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure27.png\" alt=\"\" class=\"wp-image-157\"\/><figcaption>Figure 27<\/figcaption><\/figure>\n\n\n\n<p>Adding one more sample screen capture of \u201cElastiFlow Top-N\u201d:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1907\" height=\"998\" src=\"https:\/\/www.sdwan2.com\/wp-content\/uploads\/2020\/09\/figure28.png\" alt=\"\" class=\"wp-image-158\"\/><figcaption>Figure 28<\/figcaption><\/figure>\n\n\n\n<p>By browsing different ElastiFlow dashboard, can confirm this Ubuntu VM running ElastiFlow is able to receive Netflow from the VCE and report the flows in different dashboards. <br>This meets the objective of this post.<\/p>\n\n\n\n<p>Elastiflow and VMware SD-WAN by Velocloud &#8211; Part 1 is completed here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Objective of Elastiflow with VMware SD-WAN by Velocloud &#8211; Part 1 VMware SD-WAN (Velocloud) supports exports flow information in Netflow IPFIX format to one or more Netflow collectors, this is documented in \u201cConfigured Netflow Settings\u201d. A Netflow collector supporting IPFIX in theory is able to display flows from Velocloud Edge. However, the Velocloud Edge flow [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"templates\/template-fullwidth.php","format":"standard","meta":{"zakra_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"footnotes":""},"categories":[7,5],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-netflow","category-velocloud"],"_links":{"self":[{"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":24,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":166,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions\/166"}],"wp:attachment":[{"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sdwan2.com\/index.php\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}