Using the Integrated Monitoring System (Elasticsearch, Fluentd and Kibana, Grafana, Zipkin) of Microk8s

Tram Ho

The importance of having a good monitoring system

Today, it’s hard to find a company that doesn’t use technology.

In fact, the right device, network, and system performance is essential for businesses to stay afloat. Elsewhere, what will be offered to customers will be immediate technology services.

While technology is essential to the work of any company, that doesn’t mean it’s infallible.

Anytime failure can occur giving rise to sometimes critical situations.

Therefore, in any company where the IT infrastructure is critical, it is necessary to monitor its correct functioning so that a possible failure does not affect the service provided to the users.

Why use a monitoring system?

To detect and prevent errors, it is very convenient to have a good monitoring tool. Monitoring systems are responsible for monitoring the technology a company uses (hardware, networks and communications, operating systems or applications, among others) to analyze its performance, and detect and warn about possible errors. A good monitoring system is capable of monitoring devices, infrastructure, applications, services, and even business processes.

Essentially, translated into the company’s language, a good monitoring system increases productivity. This is demonstrated in many ways:

1. Improved hardware utilization

By monitoring its good operation, you will manage to use your device better. For example, if a device is not working properly, the monitoring system will detect it, make a notification about it and can make a decision to repair or replace it.

2. Incident prevention and earlier detection

And that saves time and money!, Imagine that your business is an electronics store and the website is not performing well or lagging a lot. Without a monitoring system, it can take you hours to realize the problem (you will probably do it because of user complaints), which can cause significant money loss. A good monitoring system can alert you to problems as soon as they arise, allowing you to resolve problems immediately and reduce the amount of time your site is down or slow.

3. Company image is improved

By avoiding service failures or minimizing resolution times, the company’s image is improved for users.

Let’s go back to the previous example.

If your online store is down for a long time, you will not only lose the sales that would have been earned that day, but users will most likely think that your business is not working. going well. So they will forget about you as a serious and reliable option to purchase online.

Alternatively, they can discuss the glitch with friends, acquaintances, family, or even on social media, which means negative advertising can further damage their business. friend.

4. Spend less time monitoring the system

It takes less time to monitor the proper system operation, precisely because the monitoring system takes care of it.

That way, your qualified staff will be able to spend more time on other tasks, knowing that, should problems arise, they will receive corresponding alerts. This will also lead to increased productivity!

Activate the Monitoring System toolkit

Enable observability addons

Step 1: First we connect to vm microk8s-master-01

After successful ssh we enable addons observability with command

When applying, the bottom bar will have the default username vs password

Step 2: port-forwar port 3000

To access the service, I use port-forward with the command:

Screenshot 2023-01-23 at 10.55.47 PM.png

Step 3: Login to Grafana’s admin

Access the link: http://192.168.56.2:3000

Screenshot 2023-01-23 at 10.57.43 PM.png

username: admin

password: prom-operator

Once logged in successfully, we go to the dashboard: http://192.168.56.2:3000/dashboards

Here is a list of well-designed dashboard templates, you can use them all the time, or you can write more according to your needs.

Enable fluentd community addons (Elasticsearch, Fluentd and Kibana)

First we enable the community with the command

Screenshot 2023-01-27 at 1.35.08 PM.png

After successful community enable, we enable fluentd addons by command

When the application is successful, we wait for about 1 minute to upload the services, continue to use port forward to enter the kibana service

Screenshot 2023-01-27 at 1.42.13 PM.png

Go to the link: http://192.168.56.2:8181 to enter kibana

Screenshot 2023-01-27 at 1.46.02 PM.png

So we have successfully enabled fluentd addons

Conclusion

So I have successfully installed the Monitoring System in less than 15 minutes, the advantage is that I can control the entire system and be proactive when errors occur, without being complained by customers.

Share the news now

Source : Viblo