{"id":3195,"date":"2023-04-09T15:09:51","date_gmt":"2023-04-09T12:09:51","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3195"},"modified":"2023-04-06T16:34:58","modified_gmt":"2023-04-06T13:34:58","slug":"install-elasticsearch-with-kibana-and-logstash-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/","title":{"rendered":"Install Elasticsearch with Kibana and Logstash on Ubuntu"},"content":{"rendered":"\n<p>Elasticsearch is an open-source, distributed search and analytics engine that is designed to handle large amounts of data. It is built on top of the Apache Lucene search engine library and is part of the Elastic Stack (formerly known as the ELK Stack), which includes Kibana and Logstash.<\/p>\n\n\n\n<p>It comes with several new features and improvements over the previous versions, including:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Frozen Indices<\/strong>: This feature allows users to store less frequently accessed data in a more cost-effective manner while still being able to search and analyze it.<\/li>\n\n\n\n<li><strong>Cross-Cluster Replication<\/strong>: This feature enables users to replicate data across multiple clusters, which is useful for disaster recovery, data migration, and scaling.<\/li>\n\n\n\n<li><strong>Improved Security<\/strong>: includes several improvements to its security features, including support for encrypted communication between nodes, fine-grained role-based access control, and improved auditing capabilities.<\/li>\n\n\n\n<li><strong>SQL Support<\/strong>: now includes support for SQL, which allows users to query and analyze data using SQL syntax.<\/li>\n<\/ol>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/#Prerequisites\" title=\"Prerequisites\">Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/#Setting_up_Elasticsearch_Installation_and_Configuration\" title=\"Setting up Elasticsearch: Installation and Configuration\">Setting up Elasticsearch: Installation and Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/#Setting_up_Kibana_Dashboard\" title=\"Setting up Kibana Dashboard\">Setting up Kibana Dashboard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/#Setting_up_Logstash\" title=\"Setting up Logstash\">Setting up Logstash<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>OpenJDK 11 must be installed<\/li>\n\n\n\n<li>Nginx must be installed on your server, <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-nginx-on-ubuntu-20-04\/\">click here for the guide.<\/a><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Setting_up_Elasticsearch_Installation_and_Configuration\"><\/span>Setting up Elasticsearch: Installation and Configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Elasticsearch components are not included in the default package repositories of Ubuntu. Nevertheless, you can install them via APT by adding Elastic&#8217;s package source list. To prevent package spoofing and ensure system security, all packages are signed with the signing key. Your package manager will consider the key-authenticated packages as trustworthy. To proceed with the installation, you need to import the public GPG key and add the Elastic package source list in this step.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>curl -fsSL https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch |sudo gpg --dearmor -o \/usr\/share\/keyrings\/elastic.gpg\n\necho \"deb &#91;signed-by=\/usr\/share\/keyrings\/elastic.gpg] https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main\" | sudo tee -a \/etc\/apt\/sources.list.d\/elastic-7.x.list<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3201\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-15-08-06\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?fit=1375%2C233&amp;ssl=1\" data-orig-size=\"1375,233\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-15.08.06\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?fit=750%2C127&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?resize=750%2C127&#038;ssl=1\" alt=\"Kibana and Logstash on Ubuntu\" class=\"wp-image-3201\" width=\"750\" height=\"127\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?resize=1024%2C174&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?resize=300%2C51&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?resize=768%2C130&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.08.06.png?w=1375&amp;ssl=1 1375w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>Update your APT packages index with the new Elastic source:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>apt-get update<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Use the following command to install:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt install elasticsearch<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"289\" data-attachment-id=\"3202\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-15-18-24\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?fit=1188%2C457&amp;ssl=1\" data-orig-size=\"1188,457\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-15.18.24\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?fit=750%2C289&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?resize=750%2C289&#038;ssl=1\" alt=\"Setting up Elasticsearch\" class=\"wp-image-3202\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?resize=1024%2C394&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?resize=300%2C115&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?resize=768%2C295&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.18.24.png?w=1188&amp;ssl=1 1188w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>Elasticsearch has been installed and is now ready for configuration. You may utilize your preferred text editor to modify the main configuration file, which is the elasticsearch.yml file. In this case, we will use nano:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>nano \/etc\/elasticsearch\/elasticsearch.yml<\/code><\/pre>\n\n\n\n<p>Locate the line in the configuration file that specifies &#8220;network.host&#8221;, remove the comment symbol, and substitute its value with &#8220;localhost&#8221; as demonstrated below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"212\" data-attachment-id=\"3203\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-15-19-49\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?fit=883%2C250&amp;ssl=1\" data-orig-size=\"883,250\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-15.19.49\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?fit=750%2C212&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?resize=750%2C212&#038;ssl=1\" alt=\"\" class=\"wp-image-3203\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?w=883&amp;ssl=1 883w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?resize=300%2C85&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.19.49.png?resize=768%2C217&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>Start the Elasticsearch service:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl start elasticsearch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl enable elasticsearch<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>curl -X GET \"localhost:9200\"<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"439\" data-attachment-id=\"3204\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-15-31-23\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?fit=1073%2C628&amp;ssl=1\" data-orig-size=\"1073,628\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-15.31.23\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?fit=750%2C439&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?resize=750%2C439&#038;ssl=1\" alt=\"\" class=\"wp-image-3204\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?resize=1024%2C599&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?resize=300%2C176&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?resize=768%2C449&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.31.23.png?w=1073&amp;ssl=1 1073w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Setting_up_Kibana_Dashboard\"><\/span>Setting up Kibana Dashboard<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Kibana is an open-source data visualization and exploration tool designed to work with Elasticsearch. It provides users with a user-friendly web interface for analyzing and visualizing data stored in Elasticsearch indices. Kibana offers a wide range of features such as data filtering, aggregation, and visualization tools that enable users to interactively explore and understand their data. It is commonly used in conjunction with Elasticsearch for log analysis, business intelligence, and other analytical use cases.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo apt install kibana<br>sudo systemctl enable kibana<br>sudo systemctl start kibana<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"209\" data-attachment-id=\"3205\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-15-38-09\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?fit=946%2C264&amp;ssl=1\" data-orig-size=\"946,264\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-15.38.09\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?fit=750%2C209&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?resize=750%2C209&#038;ssl=1\" alt=\"\" class=\"wp-image-3205\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?w=946&amp;ssl=1 946w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?resize=300%2C84&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-15.38.09.png?resize=768%2C214&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>In order to enable external access to Kibana, which is currently set up to only listen on localhost, a reverse proxy needs to be established. For this purpose, Nginx will be used, assuming it has already been installed on the server.<\/p>\n\n\n\n<p>The first step involves creating an administrative Kibana user using the openssl command. This account will be used to access the Kibana web interface. For example, we will name this account &#8220;virtonoadmin&#8221;. However, to ensure greater security, it is recommended to choose a non-standard username that would be difficult to guess.<\/p>\n\n\n\n<p>Executing the following command will create the administrative Kibana user and password, and store them in the &#8220;htpasswd.users&#8221; file. Nginx will be configured to require this username and password and read this file in the next steps:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>echo \"virtonoadmin:openssl passwd -apr1\" | sudo tee -a \/etc\/nginx\/htpasswd.users<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>nano \/etc\/nginx\/sites-available\/<mark>domain<\/mark><\/code><\/pre>\n\n\n\n<p>And paste the following:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>server {\n    listen 80;\n\n    server_name your_domain; MAKE SURE TO REPLACE WITH YOUR DOMAIN\n\n    auth_basic \"Restricted Access\";\n    auth_basic_user_file \/etc\/nginx\/htpasswd.users;\n\n    location \/ {\n        proxy_pass http:\/\/localhost:5601;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection 'upgrade';\n        proxy_set_header Host $host;\n        proxy_cache_bypass $http_upgrade;\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo ln -s \/etc\/nginx\/sites-available\/domain \/etc\/nginx\/sites-enabled\/domain\nsudo nginx -t\nsudo systemctl reload nginx<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"278\" data-attachment-id=\"3206\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-16-02-02\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?fit=835%2C310&amp;ssl=1\" data-orig-size=\"835,310\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-16.02.02\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?fit=750%2C278&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?resize=750%2C278&#038;ssl=1\" alt=\"\" class=\"wp-image-3206\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?w=835&amp;ssl=1 835w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?resize=300%2C111&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.02.02.png?resize=768%2C285&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>To access the Kibana server&#8217;s status page, navigate to http:\/\/domain\/status<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"398\" data-attachment-id=\"3207\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/install-elasticsearch-with-kibana-and-logstash-on-ubuntu\/attachment\/screenshot-2023-04-06-at-16-08-48\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?fit=1264%2C671&amp;ssl=1\" data-orig-size=\"1264,671\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-06-at-16.08.48\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?fit=750%2C398&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?resize=750%2C398&#038;ssl=1\" alt=\"\" class=\"wp-image-3207\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?resize=1024%2C544&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?resize=300%2C159&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?resize=768%2C408&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-06-at-16.08.48.png?w=1264&amp;ssl=1 1264w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Setting_up_Logstash\"><\/span>Setting up Logstash<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Use the following command to install Logstash:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>apt install logstash<\/code><\/pre>\n\n\n\n<p>Generate a configuration file named &#8220;02-beats-input.conf&#8221; in which you will configure your Filebeat input:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>nano \/etc\/logstash\/conf.d\/02-beats-input.conf<\/code><\/pre>\n\n\n\n<p>Add the following lines to the conf file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>input {\n  beats {\n    port => 5044\n  }\n}<\/code><\/pre>\n\n\n\n<p>Then, generate a configuration file named &#8220;30-elasticsearch-output.conf&#8221; and enter the following:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>nano \/etc\/logstash\/conf.d\/30-elasticsearch-output.conf\n\n\noutput {\n  if &#91;@metadata]&#91;pipeline] {\n\telasticsearch {\n  \thosts => &#91;\"localhost:9200\"]\n  \tmanage_template => false\n  \tindex => \"%{&#91;@metadata]&#91;beat]}-%{&#91;@metadata]&#91;version]}-%{+YYYY.MM.dd}\"\n  \tpipeline => \"%{&#91;@metadata]&#91;pipeline]}\"\n\t}\n  } else {\n\telasticsearch {\n  \thosts => &#91;\"localhost:9200\"]\n  \tmanage_template => false\n  \tindex => \"%{&#91;@metadata]&#91;beat]}-%{&#91;@metadata]&#91;version]}-%{+YYYY.MM.dd}\"\n\t}\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>Check The Config Validation:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo -u logstash \/usr\/share\/logstash\/bin\/logstash --path.settings \/etc\/logstash -t\n\nConfig Validation Result: OK. Exiting Logstash<\/code><\/pre>\n\n\n\n<p>Once your configuration test is deemed successful, commence and activate Logstash to apply the configuration modifications:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl start logstash<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl enable logstash<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch is an open-source, distributed search and analytics engine that is designed to handle large amounts of data. It is built on top of the Apache Lucene search engine library and is part of the Elastic Stack (formerly known as the ELK Stack), which includes Kibana and Logstash. It comes<\/p>\n","protected":false},"author":8,"featured_media":3208,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[258,257,256,259,255,254],"class_list":["post-3195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-configure-elasticsearch","tag-configure-kibana","tag-configure-logstash","tag-install-elasticsearch","tag-install-kibana","tag-install-logstash"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-Elasticsearch-with-Kibana-and-Logstash-on-Ubuntu.png?fit=600%2C330&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-Px","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3413,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-kubernetes-on-ubuntu-22-04\/","url_meta":{"origin":3195,"position":0},"title":"How to install and configure Kubernetes on Ubuntu 22.04","author":"George B.","date":"May 28, 2023","format":false,"excerpt":"Welcome to our comprehensive guide on installing and configuring Kubernetes on Ubuntu 22. In this tutorial, we will walk you through the process of setting up a Kubernetes cluster on your Ubuntu 22 machine. Whether you are a beginner or an experienced user, this guide will provide you with detailed\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-and-configure-Kubernetes-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-and-configure-Kubernetes-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/05\/How-to-install-and-configure-Kubernetes-on-Ubuntu-22.04.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3966,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-prestashop-on-centos-7\/","url_meta":{"origin":3195,"position":1},"title":"How to Install PrestaShop on CentOS 7","author":"George B.","date":"September 29, 2023","format":false,"excerpt":"PrestaShop is a widely used, open-source e-commerce platform. With its flexibility, scalability, and rich feature set, it has been adopted by many online retailers around the world. For those using the CentOS 7 operating system, this guide will take you step by step through the process of installing PrestaShop on\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/09\/How-to-Install-PrestaShop-on-CentOS.png?fit=360%2C240&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1033,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-mysql-on-opensuse-13-1\/","url_meta":{"origin":3195,"position":2},"title":"How To Install and Configure MySQL on openSuSe 13.1","author":"Daniel Draga","date":"September 24, 2017","format":false,"excerpt":"Introduction MYSQL is a software, with MySQL server at its core, and a lot of utility programs, that helps is managing and administration of database. For example, let say you want to create a new database, you send a message to the MySQL server that says, for instance, \u201ccreate a\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/mysql-1.jpg?fit=700%2C256&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/mysql-1.jpg?fit=700%2C256&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/mysql-1.jpg?fit=700%2C256&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/09\/mysql-1.jpg?fit=700%2C256&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3230,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-mongodb-on-ubuntu\/","url_meta":{"origin":3195,"position":3},"title":"How to install MongoDB on Ubuntu","author":"George B.","date":"April 13, 2023","format":false,"excerpt":"Welcome to this comprehensive guide on how to install MongoDB on Ubuntu! In the following steps, you will learn everything you need to know to set up MongoDB on your Ubuntu system. Whether you're a beginner or an experienced user, this guide will walk you through the installation process, providing\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-MongoDB-Ubuntu-22.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-MongoDB-Ubuntu-22.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-install-MongoDB-Ubuntu-22.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":493,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-webuzo\/","url_meta":{"origin":3195,"position":4},"title":"How to install Webuzo","author":"Daniel Draga","date":"August 19, 2016","format":false,"excerpt":"Webuzo\u00a0 is an Application Stack which can be used on any Virtual Machine. Webuzo is a Single User Control Panel which helps users deploy Web Apps (WordPress, Joomla, Drupal, etc) or System Apps (Apache, NGinx, PHP, Java, MongoDB, etc) on their virtual machines or in the cloud. Webuzo is a\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/webuzojpg.jpg?fit=280%2C205&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3492,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-install-and-configure-mail-server-on-ubuntu\/","url_meta":{"origin":3195,"position":5},"title":"How to Install and Configure Mail Server on Ubuntu","author":"George B.","date":"June 11, 2023","format":false,"excerpt":"Setting up a mail server on Ubuntu can be a daunting task for many, but with the right guidance and understanding, it becomes an achievable goal. In this article, we will provide a step-by-step guide on how to install and configure a mail server on Ubuntu. By the end, you'll\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/06\/How-to-Install-and-Configure-Mail-Server-on-Ubuntu.png?fit=600%2C330&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=3195"}],"version-history":[{"count":1,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3195\/revisions"}],"predecessor-version":[{"id":3209,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3195\/revisions\/3209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3208"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}