mirror of https://gitee.com/stylefeng/roses
【monitor】新增monitor运维模块
parent
040336006c
commit
7bcf1d729e
|
@ -0,0 +1 @@
|
|||
系统监控模块
|
|
@ -0,0 +1 @@
|
|||
监控模块的api
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-o-monitor</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>monitor-api</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,21 @@
|
|||
package cn.stylefeng.roses.kernel.monitor.api.constants;
|
||||
|
||||
/**
|
||||
* 监控模块常量
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/31 22:33
|
||||
*/
|
||||
public interface MonitorConstants {
|
||||
|
||||
/**
|
||||
* 监控模块的名称
|
||||
*/
|
||||
String MONITOR_MODULE_NAME = "kernel-o-monitor";
|
||||
|
||||
/**
|
||||
* 异常枚举的步进值
|
||||
*/
|
||||
String MONITOR_EXCEPTION_STEP_CODE = "27";
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package cn.stylefeng.roses.kernel.monitor.api.exception;
|
||||
|
||||
import cn.stylefeng.roses.kernel.monitor.api.constants.MonitorConstants;
|
||||
import cn.stylefeng.roses.kernel.rule.abstracts.AbstractExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
||||
|
||||
/**
|
||||
* 监控模块异常
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/31 22:35
|
||||
*/
|
||||
public class MonitorException extends ServiceException {
|
||||
|
||||
public MonitorException(AbstractExceptionEnum exception) {
|
||||
super(MonitorConstants.MONITOR_MODULE_NAME, exception);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package cn.stylefeng.roses.kernel.monitor.api.exception.enums;
|
||||
|
||||
import cn.stylefeng.roses.kernel.monitor.api.constants.MonitorConstants;
|
||||
import cn.stylefeng.roses.kernel.rule.abstracts.AbstractExceptionEnum;
|
||||
import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 监控模块异常枚举
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/31 22:35
|
||||
*/
|
||||
@Getter
|
||||
public enum MonitorExceptionEnum implements AbstractExceptionEnum {
|
||||
|
||||
/**
|
||||
* 演示环境无法操作
|
||||
*/
|
||||
DEMO_OPERATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE + MonitorConstants.MONITOR_EXCEPTION_STEP_CODE + "01", "演示环境无法操作!");
|
||||
|
||||
/**
|
||||
* 错误编码
|
||||
*/
|
||||
private final String errorCode;
|
||||
|
||||
/**
|
||||
* 提示用户信息
|
||||
*/
|
||||
private final String userTip;
|
||||
|
||||
MonitorExceptionEnum(String errorCode, String userTip) {
|
||||
this.errorCode = errorCode;
|
||||
this.userTip = userTip;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
监控模块的业务
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-o-monitor</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>monitor-business</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--监控模块的的api-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>monitor-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
监控模块之系统信息监控,硬件,内存空间,磁盘容量等
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-o-monitor</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>monitor-sdk-system-info</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--监控模块的的api-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>monitor-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1 @@
|
|||
监控模块的自动配置
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-o-monitor</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>monitor-spring-boot-starter</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--监控模块的业务-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>monitor-business</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
package cn.stylefeng.roses.kernel.monitor.starter;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 系统监控的自动配置
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/31 22:37
|
||||
*/
|
||||
@Configuration
|
||||
public class GunsMonitorAutoConfiguration {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.stylefeng.roses.kernel.monitor.starter.GunsMonitorAutoConfiguration
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>roses-kernel</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>kernel-o-monitor</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>monitor-api</module>
|
||||
<module>monitor-business</module>
|
||||
<module>monitor-sdk-system-info</module>
|
||||
<module>monitor-spring-boot-starter</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 开发规则 -->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>kernel-a-rule</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
52
pom.xml
52
pom.xml
|
@ -22,26 +22,20 @@
|
|||
<!--规则模块,开发规则-->
|
||||
<module>kernel-a-rule</module>
|
||||
|
||||
<!--dao框架-->
|
||||
<module>kernel-d-db</module>
|
||||
|
||||
<!--认证和鉴权模块-->
|
||||
<module>kernel-d-auth</module>
|
||||
|
||||
<!--缓存模块-->
|
||||
<module>kernel-d-cache</module>
|
||||
|
||||
<!--系统配置表-->
|
||||
<module>kernel-d-config</module>
|
||||
|
||||
<!--参数校验模块-->
|
||||
<module>kernel-d-validator</module>
|
||||
<!--dao框架-->
|
||||
<module>kernel-d-db</module>
|
||||
|
||||
<!--wrapper包装模块-->
|
||||
<module>kernel-d-wrapper</module>
|
||||
|
||||
<!--jwt模块,用于token校验-->
|
||||
<module>kernel-d-jwt</module>
|
||||
|
||||
<!--缓存模块-->
|
||||
<module>kernel-d-cache</module>
|
||||
<!--多数据源模块-->
|
||||
<module>kernel-d-ds-container</module>
|
||||
|
||||
<!--邮件发送模块-->
|
||||
<module>kernel-d-email</module>
|
||||
|
@ -55,27 +49,36 @@
|
|||
<!--文件操作模块-->
|
||||
<module>kernel-d-i18n</module>
|
||||
|
||||
<!--sms模块-->
|
||||
<module>kernel-d-sms</module>
|
||||
|
||||
<!--定时任务模块-->
|
||||
<module>kernel-d-timer</module>
|
||||
<!--jwt模块,用于token校验-->
|
||||
<module>kernel-d-jwt</module>
|
||||
|
||||
<!--日志记录模块-->
|
||||
<module>kernel-d-log</module>
|
||||
|
||||
<!--多数据源模块-->
|
||||
<module>kernel-d-ds-container</module>
|
||||
|
||||
<!--资源扫描模块-->
|
||||
<module>kernel-d-scanner</module>
|
||||
|
||||
<!--office模块-->
|
||||
<module>kernel-d-office</module>
|
||||
|
||||
<!--拼音工具模块-->
|
||||
<module>kernel-d-pinyin</module>
|
||||
|
||||
<!--资源扫描模块-->
|
||||
<module>kernel-d-scanner</module>
|
||||
|
||||
<!--sms模块-->
|
||||
<module>kernel-d-sms</module>
|
||||
|
||||
<!--定时任务模块-->
|
||||
<module>kernel-d-timer</module>
|
||||
|
||||
<!--参数校验模块-->
|
||||
<module>kernel-d-validator</module>
|
||||
|
||||
<!--wrapper包装模块-->
|
||||
<module>kernel-d-wrapper</module>
|
||||
|
||||
<!--系统监控模块-->
|
||||
<module>kernel-o-monitor</module>
|
||||
|
||||
<!--演示环境-->
|
||||
<module>kernel-s-demo</module>
|
||||
|
||||
|
@ -87,6 +90,7 @@
|
|||
|
||||
<!--系统管理基础业务-->
|
||||
<module>kernel-s-system</module>
|
||||
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
Loading…
Reference in New Issue