![]() |
VOOZH | about |
By Erin Glass
Senior Manager, DevEd
A previous version of this article was written by Justin Ellingwood and Vadym Kalsin.
The Elastic Stack β formerly known as the ELK Stack β is a collection of open-source software produced by Elastic which allows you to search, analyze, and visualize logs generated from any source in any format, a practice known as centralized logging. Centralized logging can be useful when attempting to identify problems with your servers or applications as it allows you to search through all of your logs in a single place. Itβs also useful because it allows you to identify issues that span multiple servers by correlating their logs during a specific time frame.
The Elastic Stack has four main components:
In this tutorial, you will install the Elastic Stack on an Ubuntu 20.04 server. You will learn how to install all of the components of the Elastic Stack β including Filebeat, a Beat used for forwarding and centralizing logs and files β and configure them to gather and visualize system logs. Additionally, because Kibana is normally only available on the localhost, we will use Nginx to proxy it so it will be accessible over a web browser. We will install all of these components on a single server, which we will refer to as our Elastic Stack server.
Note: When installing the Elastic Stack, you must use the same version across the entire stack. In this tutorial we will install the latest versions of the entire stack which are, at the time of this writing, Elasticsearch 7.7.1, Kibana 7.7.1, Logstash 7.7.1, and Filebeat 7.7.1.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Open source advocate and lover of education, culture, and community.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, the tutorial is not complete. First, we need to install JAVA and NGINX. Otherwise, there are errors. Can you fulfill the tutorial?
This comment has been deleted
Iβm getting this error when installing logstash:
Setting up logstash (1:7.8.1-1) ...
Using provided startup.options file: /etc/logstash/startup.options
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2020-08-13T00:30:56.216Z [main] WARN FilenoUtil : Native subprocess control requires open access to sun.nio.ch
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist' or '=org.jruby.core' to enable.
Errno::EBADF: Bad file descriptor - systemctl
spawn at org/jruby/RubyProcess.java:1635
spawn at org/jruby/RubyKernel.java:1658
popen_run at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:202
popen3 at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:98
execute at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/detector.rb:74
detect_systemd at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/detector.rb:29
detect_platform at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/detector.rb:24
detect at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/detector.rb:18
setup_defaults at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/cli.rb:153
execute at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/cli.rb:119
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.31/lib/pleaserun/cli.rb:114
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132
<main> at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:28
Unable to install system startup script for Logstash.
chmod: cannot access '/etc/default/logstash': No such file or directory
dpkg: error processing package logstash (--configure):
installed logstash package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
logstash
E: Sub-process /usr/bin/dpkg returned an error code (1)
I believe there is small typo with one of the commands. It should be this:
sudo filebeat setup -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["localhost:9200"]' -E setup.kibana.host=localhost:5601
How can we do these in localhost? So elasticsearch is localhost:9200, nginx is localhost:80. So can kibana be localhost:5601?? How can we configure that in nginx configuration, need to listen on 80 or 9200? And Kibana is not loaded in browser, itβs just loading and then the connection was reset. How to troubleshoot that? Appreciated the help/replyβ¦
I replaced a older elkstack on ubuntu and followed this process, it worked well except that it creates 2 indexes per day
filebeat-%{[@metadata][version]}-2020.10.03 filebeat-7.9.2-2020.10.03
the filebeat-7.9.2-2020.10.03 is from the elk server itself and the other is from filebeat from a remote syslog server that I was using before on the older server
It would be fine except the search doesnβt work, when I discover/search I only get the elkstack ubuntu server and a bunch of error popups for 1 of 3 shards failed
illegal_argument_exception
I ran GET _template/filebeat-* and the only one returned is the filebeat-7.9.2-2020.10.03 index so I am missing a index template for the other one
How can I fix this ? I tried hardcoding the %{[@metadata][version]} to 7.9.2 in the file /etc/logstash/conf.d/30-elasticsearch-output.conf but that caused even worse problems and could not load the data.
So I am a little confused, what port do I send my syslogs to? Port 514 isnt listening
Hi, Successfuly installed βVersion: 7.6.2β on Centos 7. Hope to follow your guide to install on ubuntu. Thanksβ¦
AS I successfully implemented the tutorial.
Now it is taking 35 GB of memory out of 60 GB and in other instance it is taking 90% of memory out of 16GB.
So is normal with everyone or there is an issue.
Excuse, Erin why different pictures of my Kibana ui and yours examples
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.