java - linux运维系统怎么编写
高洛峰
高洛峰 2017-04-18 09:41:19
0
3
587

最近做些运维的工作,经常碰到磁盘不足、cpu过高、或者某个服务未启动。想用java写一个web界面来管理,以及展示一些图表, 用python来采集数据到数据库。 有没做过类似的,希望给出点意见给我。我应当怎么做。

技术体系,实现思路都可以

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
左手右手慢动作

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

PHPzhong

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template