Contents
Preface
In the previous article (Building), we successfully deployed the server and agent of wgcloud (see article:Home Data Center Series Deploy Your Own Operation and Maintenance Monitoring System Through wgcloud (Part 1): Construction)After a period of actual operation, I can finally summarize the functions and basic configuration of wgcloud. After all, operation and maintenance still need to see the actual effect, and we also adhere to the principle of practice makes perfect.
Monitoring function introduction
Monitoring Summary
Here you can see a summary of all monitoring items of wgcloud and an overall statistics of resource usage:
Resource Management
Resource management is the most important part. The monitoring targets we usually focus on are all under this project:
Host Management
Here you can see the detailed system information of all hosts where the agent is deployed, including CPU, memory, uplink and downlink speeds, number of connections, number of processes, etc., as shown below:
The host in the red box is my Tencent Cloud lightweight cloud host, which is added through the tailscale address. The system and chart in the red box on the right can show the detailed information of the monitored host in detail. The following is part of the system and chart.
system:
chart:
If the monitored host is a Linux device, you can directly perform web ssh under More on the right, which is very considerate, as shown below:
Note: Hosts in the host management cannot be added manually. They are all automatically registered and added by the agent, so it is necessary to ensure communication between the agent and the server.
Host abnormal process
Here you can see some processes on each host that consume more memory or CPU resources. For example, on my Tencent Cloud lightweight server, the Java process occupies 56.16% of CPU resources, so it is judged as an abnormal process:
However, this may be related to the judgment method, which may not be accurate. It still needs to be combined with the actual situation on the target host.
Process Monitoring
Here you can add the key processes you are concerned about on the hosts that already exist in the host management. Just click Add in the red box above, as shown below:
Enter the add interface and add a process as shown below:
For example, I added monitoring of two key processes, authserver and worldserver, on the World of Warcraft server:
Port Monitoring
Here you can add monitoring of specific ports on the host that already exists in the host management. In fact, if you only want to monitor some open ports, you can use solutions such as uptime-kuma to do it. However, the most important function of port monitoring on wgcloud is to monitor the ports on the localhost address on the host, which cannot be achieved through external monitoring.
Click "Add" in the red box above:
Add the port information according to the host where the port you need to monitor is located. For example, I use the port of warp proxy on Tencent Cloud lightweight server as an example:
After adding successfully, you can see the port status:
Log monitoring
Here you can specify to view the logs on a certain host and specify its alarm keywords. You need to have a certain understanding of the log file location and log content applied on the host. I will not demonstrate it here. There is no such need for the time being. Just take a look at the monitoring setting interface:
File tamper-proof
I won’t go into detail about this Chinese-style feature. It is similar to the log monitoring settings. You can understand it by looking at the interface:
Docker Monitoring
Here you can monitor the docker deployed on each host, still click the "Add" button in the red box above:
Then fill in the information of the docker that needs to be monitored as shown in the figure below:
The docker I actually monitor is:
Data Monitoring
The data monitoring part is for the database, among which data source management is for a specific "library", and data table monitoring is for a specific "table" in the "library":
Data Source Management
The configuration is very simple, just follow the picture tutorial below:
Actual effect display:
Data table management
This part is mainly to monitor the changes of a certain value in a table in a certain library. I don’t have any requirements, so I didn’t set it up. You can configure it according to your needs. The interface is as follows:
Service interface monitoring
This part can use the specified method to access the URL corresponding to the service and judge its health status based on the returned status code:
Display Board
Data communication monitoring
This part of the function is relatively simple, that is, monitoring equipment through two methods: ping and snmp:
PING monitoring
To monitor in this way, the monitored host needs to be able to respond to ICMP queries, and you may need to enable the firewall on the corresponding device. This method can only monitor whether the target is online. The addition method is similar to the previous one, so I will not repeat it, but just show the effect:
SNMP monitoring
This method monitors the target through the SNMP protocol. In addition to whether the host is online, it can also monitor the traffic, rate, CPU, memory, temperature, voltage, etc. of the device in and out. However, the monitored target needs to support the SNMP protocol, and different functions may need to support different SNMP versions (for example, if verification function is required, SNMP v3 is required).
The interface for adding monitoring targets is as follows:
The monitoring results are as follows:
FTP/SFTP Monitoring
This function is very simple, that is, monitoring FTP and SFTP servers. As before, you need to manually add the FTP/SFTP servers to be monitored. The final effect is as follows:
Middleware monitoring
This part can monitor the following types of content, but it requires a host that can access both the wgcloud server and the monitored content, and install a component similar to agent called "server-backup" as an auxiliary tool. I won't go into details here, so please research it yourself if you are interested.
Operation and maintenance function introduction
Inspection report
By default, wgcloud generates daily, weekly, and monthly inspection reports:
The content is relatively simple. Here is part of the daily report:
System Management
This part has two contents, system log and command delivery, as shown below:
The system log will show some alarms on each monitoring host:
The command can be sent through the agent to let the selected monitoring host run the command, such as database backup. The command can be run immediately or at a scheduled time (multiple times):
Alarm settings
This part is very simple and is divided into 3 parts. You will understand it by looking at the configuration pages of these 3 parts.
Email alert, set the email address to receive alerts:
Script alert:
Customize alarms, customize alarm items and thresholds for monitoring hosts:
asset Management
Provides simple asset management functions:
Device Account Management
Provides simple device account management functions:
Summarize
In general, wgcloud is still in line with the usage habits of Chinese people, and the functions provided by the personal free version are sufficient for ordinary people to use. The only regret is that the limit of 10 monitoring targets is slightly less.
In addition, 10 is the limit for each function item: for example, 10 monitoring hosts, 10 monitoring processes, and 10 monitoring dockers... If you only consider the key monitoring targets and make some plans, it is enough for ordinary people.