In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to build a visual monitoring center for Docker containers, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.
Prepare for Mirror
Adviser: responsible for collecting container data over time
Influxdb: responsible for storing time series data
Grafana: responsible for analyzing and displaying time series data
Deploy influxdb services
It can be thought of as a database service that is indeed used to store data. The reason for choosing this database is, as stated on the official website:
Open source time series db platform for metrics & events (time series data)
Let's deploy the service.
1 2 3 4docker run-d-p 5000 name grafana grafana/grafana 3000\-v ~ / grafana:/var/lib/grafana\-link=influxdb:influxdb\-name grafana grafana/grafana
So far, all three containers have been activated:
Let's start the concrete experiment.
Actual combat
Access the grafana service
Open localhost:5000 to access grafana's web service, which prompts you to log in. Note that the user name and password are admin.
After logging in, you can see the main page of grafana:
It is obvious that there are several steps to be done on grafana. Now that install grafana is done, we need to:
Add data source
Create dashboard
... ...
Add data source
Click add data source to enter
Then there are mainly setting tab settings
We need to fill in all the contents according to the actual situation:
Data source will be prompted if it is added successfully.
After the data source is added, we need to add the dashboard (dashboard)
Add dashboard
Click add dashboard to enter
There are many types of dashboards to choose from. Let's just choose the most commonly used graph.
After entering, click the panel title drop-down list, and then select edit to edit.
The main thing in edit is that you need to add query conditions. Continue to see below.
Add query editor
In the query conditions, we can select the metrics to be monitored:
Choose a memory usage here, and then choose grafana itself for the container you want to monitor.
Of course, you can monitor not only one indicator, but also more than one container. For more combinations, we just need to add query entries one by one below!
Finally, I added three monitoring conditions, which are used to monitor the memory usage metrics of grafana, influxdb and cadvisor containers, and display them in the diagram at the same time.
There are many other settings that can be explored here, such as some coordinate customization, display policy customization, and even we can customize the alarm policy and so on.
These are all the contents of the article "how to build a visual monitoring center for Docker containers". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Original link: https://segmentfault.com/a/1190000014421844
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.