Kibana provides us various features for data visualization and analysis and one of the features that we are going to cover in this blog is Uptime. Using Kibana Uptime, we can monitor the network endpoints using different protocols like HTTP, HTTPS, TCP, etc. I am going to explain a very basic use case to explain Uptime and that is to monitor web-based application uptime. The intent is to get the status in the dashboard if one or more web-based applications are running properly. It also provides us the historical data to understand if the application is performing well.
I am going to use the Kibana Uptime to monitor the bqstack.com website. We can add more than one website for uptime monitoring. But before monitoring the website uptime we need to do some installation and configuration. So please have a look while we are going to set up the stage for the Uptime monitoring. We need to do the following:
We first need to download and install the Heartbeat and here I am doing this configuration on an Ubuntu-based OS. We need to execute the following commands:
curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-7.6.2-amd64.deb
sudo dpkg -i heartbeat-7.6.2-amd64.deb
Now after the installation, we need to modify the /etc/heartbeat/heartbeat.yml file, to set the connection information:
In the above Heartbeat configuration file snippet, we need to update the Elasticsearch URL, the password for the elastic user, and Kibana URL.
After adding the Elasticsearch and Kibana details we need to add the monitors for monitoring the URLs. For testing, I am going to monitor the uptime for the index.php file on my localhost. This PHP script is just showing a hello message on the screen, please refer to the following code for index.php:
We need to edit the following snippet to monitor the index.php file on localhost:
- type: http
schedule: "@every 10s"
After updating these details we need to save the Heartbeat configuration file. After modifying the Heartbeat configuration file, we need to execute the setup command that loads the Kibana index pattern.
sudo heartbeat setup
After executing the setup command, we need to start the Heartbeat service.
sudo service heartbeat-elastic start
We can verify if the Heartbeat service is running by executing the below command:
sudo service heartbeat-elastic status
Now we can open the Uptime screen of Kibana by clicking on the Uptime link from the left menu. It will open the following screen:
In the above uptime overview screen, we can see the uptime details like whether the website/service is up or down, pings over time, monitor status, etc. We can click on the monitor status name to see the details for the uptime monitoring. It not only helps us to monitor the current state of the website/service but also enables us to see the historical data where we can easily find if there are any outages.
This way we can configure different URLs for uptime monitoring. It helps us to keep track of different services or web application uptime.
Other Blogs on Elastic Stack:
Configure Logstash to push MongoDB data into Elasticsearch
Load CSV Data into Elasticsearch
Introduction to Elasticsearch
Elasticsearch Installation and Configuration on Ubuntu 14.04
Log analysis with Elastic stack
Elasticsearch Rest API
Basics of Data Search in Elasticsearch
Elasticsearch Rest API
Wildcard and Boolean Search in Elasticsearch
Metrics Aggregation in Elasticsearch
Bucket Aggregation in Elasticsearch
How to create Elasticsearch Cluster
In case of any doubt please leave your comments. You can also follow me on Twitter: https://twitter.com/anu4udilse
If you found this article interesting, then you can explore “Mastering Kibana 6.0”, “Kibana 7 Quick Start Guide”, “Learning Kibana 7”, and “Elasticsearch 7 Quick Start Guide” books to get more insight about Elastic Stack, how to perform data analysis, and how you can create dashboards for key performance indicators using Kibana.
Leave a comment
Sep 23, 2020, 2:38:00 PM | Anurag Srivastava
Jan 16, 2020, 11:43:29 AM | Anurag Srivastava
Jan 14, 2020, 10:22:34 AM | Anurag Srivastava
Jun 21, 2018, 4:58:11 AM | Anurag Srivastava
Jul 16, 2018, 5:00:02 PM | Anurag Srivastava
Mar 9, 2019, 8:20:38 AM | Anurag Srivastava