yexuanyang opened a new pull request, #3547: URL: https://github.com/apache/hertzbeat/pull/3547
## What's changed? Hello, everyone! Currently, we are looking at monitoring data or alarm data on hertzbeat platform, but we can't make the next step such as automatic recovery, automatic repair, etc. for alarm data or collected data. Now with AI's capabilities, we can automate monitoring and alerting with the help of AI, which generates and decides on its own the repair scripts or tasks for abnormal services on the other end based on the alert information, monitoring information, etc., and then calls the mcp server deployed on the other end to execute them. So I wrote a mcp server and put it under the `mcp-servers` folder, other mcp servers can be put into this same directory, so that it is easy to add new mcp servers to hertzbeat. This mcp server currently accomplishes the following: - [x] Execute scripts through the mcp server. Scripts are currently executed from unix-like os using the shibang `#! ` ASCII text executable file in unix-like os using shibang `#!` in the header, windows `bat` format is not tested. - [x] There are preset tools that combine a series of common commands to accomplish some information gathering tasks. For example, getting the current disk usage. - [x] Record logs of command and script execution. There may be omissions in the logging of some operations, but this is only the first version. - [x] Command blacklist and operator blacklist. Me. Commands and operators in the blacklist cannot be executed; the blacklist is now configured in config.yaml. Some things that need to be done in the future: - [ ] Command whitelisting. Some commands may have dangerous operators and commands, but administrators still want to allow such commands to be executed, these commands are put into a whitelist, and the program prioritizes checking to see if the command matches one of the whitelisted items, and executes it directly if it matches, and only checks with the blacklist if it doesn't exist. - [ ] documentation. Current The documentation is incomplete in the current code, and needs to be filled in later. Sorry, this pr might be a bit big, I'll try to work with reviewer to ease the pain of review. ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [ ] I have added the necessary unit tests and all cases have passed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
