Simply speaking, there are two methods: 1. Remote collection method Use Python to log in to the managed machine through ssh and other methods, execute various commands, collect data, write to the database, and wait for JavaWeb to display You need to solve the problem of Python execution commands and The problem of obtaining data The advantage is that it does not invade the controlled machine and does not occupy the resources of the controlled machine (cpu, memory) The disadvantage is that the function may be limited 2. Agent mode It is divided into service program and Agent program. The service program is responsible for scheduling and communication. The Agent program is responsible for collecting data. It installs the Agent program on the controlled machine to collect data. It then sends it back to the service program through sockets and other methods, and writes it into the database for display on JavaWeb. The advantage is that the function can be very powerful The disadvantage is that the implementation is more complicated, communication problems need to be solved, and the resources of the controlled machine are occupied
You can try Ansible. The Ansible community is very active and has many functions. You can also develop your own plug-ins. It can be regarded as the implementation of the first method on the first floor
java uses 字节码增强 to obtain the running status of server processes and even java methods and server monitoring indicators, and then uploads them to the collection server, uses python to perform data analysis and scientific calculations, and displays charts
Simply speaking, there are two methods:
1. Remote collection method
Use Python to log in to the managed machine through ssh and other methods, execute various commands, collect data, write to the database, and wait for JavaWeb to display
You need to solve the problem of Python execution commands and The problem of obtaining data
The advantage is that it does not invade the controlled machine and does not occupy the resources of the controlled machine (cpu, memory)
The disadvantage is that the function may be limited
2. Agent mode
It is divided into service program and Agent program. The service program is responsible for scheduling and communication. The Agent program is responsible for collecting data. It installs the Agent program on the controlled machine to collect data. It then sends it back to the service program through sockets and other methods, and writes it into the database for display on JavaWeb.
The advantage is that the function can be very powerful
The disadvantage is that the implementation is more complicated, communication problems need to be solved, and the resources of the controlled machine are occupied
Simple idea
You can try Ansible. The Ansible community is very active and has many functions. You can also develop your own plug-ins.
It can be regarded as the implementation of the first method on the first floor
java uses
字节码增强
to obtain the running status of server processes and even java methods and server monitoring indicators, and then uploads them to the collection server, uses python to perform data analysis and scientific calculations, and displays charts