Huawei Cloud Yunyao Cloud Server L instance evaluation | Yunyao Cloud Server L instance deploys HertzBeat real-time monitoring system
- 1. Introduction to Yunyao Cloud Server L Instance
- 2. Introduction to HertzBeat
- 3. Introduction to this practice
- 4. Check the Yunyao Cloud Server L instance environment
- 5. Deploy HertzBeat real-time monitoring system
- 6. Access HertzBeat real-time monitoring system
- 7. Basic use of HertzBeat
- 8. Use experience and summary
1. Introduction to Yunyao Cloud Server L Instance
1.1 Introduction to Yunyao Cloud Server L instance
Yunyao Cloud Server L instance is a new generation of lightweight application cloud server, specially designed for small and medium-sized enterprises and developers, providing a convenient out-of-box experience. This product provides rich and strictly screened application images and can deploy applications with one click, greatly simplifying the process of customers building e-commerce websites, web applications, applets, learning environments, and various development and testing tasks in the cloud.
1.2 Features of Yunyao Cloud Server L instance
-
Intelligent and non-stuck: Huawei Cloud Qingtian architecture supports software and hardware collaboration combined with AI algorithm intelligent scheduling to provide you with high-quality performance. Huawei Cloud has a global storage and computing network with data transmission latency shorter than the blink of an eye, meeting the high requirements of low network latency scenarios such as games and audio and video.
-
Excellent price, easy to use: super cost-effective, ultra-low threshold, open to use as you like. Multiple instance specifications to balance performance and cost. Technology upgrades optimize cloud costs and benefit more start-ups and developers.
-
It’s easier to get started: order multiple images and resource combinations with one click. A variety of high-quality images have been carefully selected and rigorously tested by Huawei Cloud officials. They cover seven major scenarios and have preset templates, which are quick to build, safe and trustworthy. Automated orchestration, one-click activation of resources, and business online in minutes. Smooth learning curve, wizard-based application construction, and easy application activation.
-
Management is more worry-free: topology, resources, and mirroring are managed visually, and business architecture is transparently managed. Intimate service status reminders, one-click resource renewal and withdrawal, and simplified management. Real-time monitoring of resource load, security, and usage ensures that services are always online. A wide range of optional security services are available, including extensive backup, host security and other services, providing the highest level of security protection.
2. Introduction to HertzBeat
2.1 Introduction to HertzBeat
HertzBeat is an open source real-time monitoring and alarm system with powerful custom monitoring capabilities, high-performance clusters, and no Agent required.
2.2 HertzBeat features
- It integrates monitoring + alarm + notification, and supports monitoring threshold alarm notifications for application services, databases, operating systems, middleware, cloud native, networks, etc. in one step.
- Easy to use and friendly, no agent required, full WEB page operation, you can monitor alarms with just one click of the mouse, and there is zero learning cost to get started.
- Configurable protocol specifications such as Http, Jmx, Ssh, Snmp, Jdbc, etc. You only need to configure the monitoring template YML in the browser to use these protocols to customize the collection of desired indicators. Do you believe that you can immediately adapt to a new monitoring type such as K8s or Docker by simply configuring it?
- High performance, supports horizontal expansion of multi-collector clusters, supports multi-isolated network monitoring, and cloud-edge collaboration.
- Free alarm threshold rules, emails, Discord, Slack, Telegram, DingTalk, WeChat, Feishu, SMS, Webhook Server, etc., messages are delivered in a timely manner.
3. Introduction to this practice
3.1 Introduction to this practice
1. This practice is a personal test learning environment, aiming to quickly deploy applications. Please be cautious in the production environment;
2. This practice environment is a Yunyao Cloud Server L instance, and the application image used is Portainer 2.18.4;
3. Due to the use The application image is Portainer, and the cloud server has automatically deployed the Docker environment;
4. Deploy the HertzBeat real-time monitoring system on the Huawei Cloud Cloud Server L instance.
3.2 This environmental plan
Server category | Application image | Intranet IP address | Docker version | Portainer version |
---|---|---|---|---|
Yunyao cloud server L instance | Docker visualization Portainer | 192.168.0.168 | 24.0.4 | 2.18.4 |
4. Check the Yunyao Cloud Server L instance environment
4.1 Purchase Yunyao Cloud Server L instance
- Purchase steps:
1. Official website link: https://www.huaweicloud.com/product/hecs-light.html
2. Purchase specifications:
Region: North China-Beijing IV;
Application image: Docker visualization-Portainer;
Instance specifications: 2 cores 2G/system Disk 40G/peak bandwidth 3Mbps/traffic package 400G;
instance name: Customize it, edit it here as HECS-L-Portainer;
purchase duration: 1 month.
- Just pay after selecting the specifications.
4.2 Xshell remote connection server
- Copy the elastic public IP address of Yunyao Cloud Server L instance and use it when connecting to the server remotely.
- In the Xshell tool, fill in the server's elastic public IP address, account and password information, and connect to the remote server via ssh.
- Successfully used the Xshell tool to connect to Huawei Cloud Yaoyun Server L instance.
4.3 Check operating system version
Check the operating system version of Yunyao Cloud Server L instance. The current operating system version is Ubuntu 22.04.1 LTS.
root@hcss-ecs-f91c:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
4.4 View system information
Use the neofetch command to view the system information of Yunyao Cloud Server L instance.
neofetch
4.5 Check Docker environment
Check Docker version
root@hcss-ecs-f91c:~# docker -v
Docker version 24.0.4, build 3713ee1
Check Docker service status
root@hcss-ecs-f91c:~# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-09-20 22:36:00 CST; 19h ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 1168 (dockerd)
Tasks: 50
Memory: 99.8M
CPU: 17.267s
CGroup: /system.slice/docker.service
Check the docker compose version. The current default installed version is 2.19.1.
root@hcss-ecs-f91c:~# docker compose version
Docker Compose version v2.19.1
5. Deploy HertzBeat real-time monitoring system
5.1 Create mounting directory
Create the mounting directory /data/hertzbeat/
mkdir -p /data/hertzbeat/{
data,logs} && cd /data/hertzbeat/
5.2 Edit the docker-compose.yaml file
Enter the /data/hertzbeat/ directory and edit the docker-compose.yaml file as follows:
version: '3.7'
services:
hertzbeat:
image: tancloud/hertzbeat
container_name: hertzbeat
restart: always
ports:
- 6850:1157
volumes:
- /data/hertzbeat/data:/opt/hertzbeat/data
- /data/hertzbeat/logs:/opt/hertzbeat/logs
environment:
- LANG=zh_CN.UTF-8
- TZ=Asia/Shanghai
5.3 Deploy HertzBeat
Use docker compose to create a HertzBeat container.
docker compose up -d
5.4 Check HertzBeat container status
Check the status of the HertzBeat container to ensure that the HertzBeat container is running normally.
root@hcss-ecs-f91c:/data/hertzbeat# docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
hertzbeat tancloud/hertzbeat "./bin/entrypoint.sh" hertzbeat 2 minutes ago Up 2 minutes 22/tcp, 1158/tcp, 0.0.0.0:6850->1157/tcp, :::6850->1157/tcp
5.5 View container running logs
Check the HertzBeat container log to ensure that the HertzBeat service starts normally.
docker compose logs
6. Access HertzBeat real-time monitoring system
6.1 Release security group ports
On the security group management page of Yunyao Cloud Server L instance, allow inbound port 6850.
6.2 Visit the HertzBeat homepage
Access address: http://Elastic public IP address: 6850
Default account password admin/hertzbeat
7. Basic use of HertzBeat
7.1 Application service monitoring
7.1.1 Monitor PING connectivity
Select Application Service Monitoring - Ping Connectivity, and click "Add Ping Connectivity".
Host: Fill in the IP address of the server that needs to be pinged;
Monitoring name: Customize the settings;
the rest of the configuration is default, click Test, and confirm after it prompts success.
7.1.2 Website monitoring
Application service monitoring - website monitoring, click "Add website monitoring".
Host: Fill in the IP address of the server that needs to be monitored;
Monitoring name: Customize the settings;
Port: Fill in the web service listening port;
The rest of the configuration is default, click Test, and confirm after it prompts success.
7.2 Database monitoring
7.2.1 Mysql database monitoring
Database monitoring - Mysql database monitoring, click "Add Mysql database".
Host: Server IP address;
Monitoring name: Custom;
Port: Database port;
Database name: Fill in the database name;
Username: root;
Password: Database root password;
click Test, and confirm after prompting that the connection is normal.
7.2.2 MariaDB database monitoring
Database monitoring - Mysql database monitoring, click "Add MariaDB database".
Host: Server IP address;
Monitoring name: Custom;
Port: Database port;
Database name: Fill in the database name;
Username: root;
Password: Database root password;
click Test, and confirm after prompting that the connection is normal.
7.3 Docker monitoring
Edit the docker.server file, find the [Service] node, modify the ExecStart attribute, and add -H tcp://0.0.0.0:2375.
vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://0.0.0.0:2375
Reload Docker for the configuration to take effect.
systemctl daemon-reload
systemctl restart docker
Cloud native monitoring - Docker container monitoring, click "Add Docker".
Host: Server IP address;
Monitoring name: Custom;
Port: 2375;
Click Test and confirm after prompting that the connection is normal.
7.4 View the dashboard
View the dashboard to check the monitoring overview.
8. Use experience and summary
This practice "Huawei Cloud Yunyao Cloud Server L Instance Evaluation | Yunyao Cloud Server L Instance Deployment HertzBeat Real-time Monitoring System" was successfully completed. When deploying the project, the operation was smooth, the network was stable, and the server had no downtime or lags. Especially The use of application images can help developers save a lot of deployment time. The portainer application image that I personally recommend not only automatically deploys the Docker environment, but also installs the portainer tool to facilitate container management. Huawei Cloud Yaoyun Server L instance has high performance in terms of performance, reliability, security and operability, and the overall use is quite satisfactory.