Cubic is an application-transparent, non-intrusive Java application diagnostic tool used to improve developers' diagnostic efficiency and capabilities.
Cubic's goal is to be a one-stop Java application diagnostic solution that allows developers to diagnose and improve applications from various aspects such as logs, memory, threads, class information, debugging, machine and system properties, etc. without logging into the machine or modifying the system. Developer efficiency and ability to diagnose problems.
Cubic can call internal custom commands and dynamically load arthas using the arthas command set.
Because many companies require customized development when using monitoring, Cubic can be used as a technical reference and I hope it can bring some inspiration to everyone.
Technical system: Spring Boot, Vue, Netty, Websocket, xterm, etc.
Directory structure
agent-dist stores the packaged agent.jar (appears after packaging)
agent-proxy-dist stores the packaged proxy.jar (appears after packaging)
arthas-dist is used to support the arthas command set
config agent configuration file
cubic-agent agent start
cubic-core agent core
cubic-proxy proxy application, currently integrated with simple pages
cubic-ui UI is under continuous development. Experts are welcome to fix bugs. After packaging, copy the dist directory data to cubic-proxy resources/static.
docs documentation
scripts includes packaging scripts and startup scripts (for testing)
Instructions for use
1. The agent is loaded as follows. Copy the entire agent-dist to a directory for loading. Please do not change the structure inside. Do not copy a jar separately. java -jar -javaagent:/xxx/agent-dist/cubic-agent.jar yyy .jar
2. Start the proxy service to connect the agent and web java -jar cubic-proxy.jar
3. Visit web ui localhost:6080
After normal startup, data will be reported to the server, which can be viewed on the homepage. Click the unique identifier to jump to the command mode - click connect to enter to reconnect.
4. The command is divided into two parts. Enter 1 for the basic command and the 3-digit arthas command. Enter 1 and then enter help to view the help.
5. You can also directly enter the command mode and use the search command to query the agent configured in our project. For example, in agent config we configure the parameter agent.service_name = cubic, then query and obtain the agentId of the application (if it is started using quick_start, Because -Dcubic.agent.service_name=cubic-proxy is added, we can use cubic-proxy to query the ID).
6. Then fill in the agentId into the above input box and click the connect button to reload. Then enter the command mode of the current application, enter 3, switch to the arthas command, and you can use it.
Cubic java application diagnostic tool update log
v1.4.2
1. Fix some minor bugs in Arthas
2. Improve the processing method of serialization protocol