• Hello and welcome! Register to enjoy full access and benefits:

    • Advertise in the Marketplace section for free.
    • Get more visibility with a signature link.
    • Company/website listings.
    • Ask & answer queries.
    • Much more...

    Register here or log in if you're already a member.

  • 🎉 WHV has crossed 56000 (56k) monthly views (unique) and 285135 clicks per month, as per Google Analytics! Thank you for your support! 🎉

VPS Monitoring Made Easy: Deploying the ELK/EFK Stack Step-by-Step

johny899

New Member
Content Writer
Messages
859
Reaction score
3
Points
23
Balance
$1,053.6USD
Have you ever tried troubleshooting a VPS with a slow response time and literally felt like it was all guesswork? I have been there myself, and it's so frustrating! This is why I really love using a monitoring stack, such as ELK or EFK, to see what is actually going on within your server, to help troubleshoot issues quickly.

Why ELK/EFK is Very Useful​

I really like ELK (Elasticsearch, Logstash, Kibana) and also EFK (Elasticsearch, Fluentd, Kibana). They help make confusing logs much more understandable. Have you ever wondered how people find issues before a user complains? This stack makes it possible!

The first time I remember using ELK was when my VPS was losing connection frequently. I had no idea what was wrong. After I set this monitoring tool up, I was able to see every little detail being captured all together on one simple dashboard. I literally said to myself, "Wow, why didn't I start using this months ago?"

Selecting ELK or EFK​

Let's keep it straightforward:

Opt for ELK if you are looking for:

  • Excellent log filtering
  • Better customization
  • A more flexible installation
Opt for EFK if you are looking for:
  • A more lightweight installation
  • A faster installation
  • Lower server resources utilization
I generally lean towards EFK on smaller VPS plans because Fluentd tends to perform better and uses less memory.

Setting Everything Up​

Here are the steps I tend to take to set things up on a VPS.

Step 1: Install Elasticsearch

I start with Elasticsearch because it stores and searches all logs and utilizes a decent amount of RAM, so just make sure your VPS has plenty of RAM to do this.

Step 2: Add Logstash or Fluentd

This is where logs are collected to send them to Elasticsearch. Logstash (ELK) or Fluentd (EFK) will be sending the logs to Elasticsearch. I much prefer Fluentd when I'm using smaller servers as it has a lighter footprint.

Step 3: Kibana Installation

Kibana
serves as the dashboard, and this is where things get interesting—for the first time, you will be able to view charts, graphs, and log searching in a manner that is both clear and effective. Have you ever wanted to discover spikes of traffic or errors as they were occurring? You will see that tracked as well.

Why Monitor Your VPS​

At some point, you will experience your VPS slowing down, and you have no way of knowing why. However, with ELK or EFK you will have an answer. You will immediately find things that are a problem, such as:
  • CPU or memory spikes
  • Firewall issues
  • App crashes
  • Slow database queries
I even had an instance using EFK on a client’s VPS where I found a cron job that was broken that they had no idea existed. They said, “Bro, how did you find that?” That is the power of having good monitoring in place.
 
Top