mirror of https://gitee.com/stylefeng/roses
Merge branch 'v7.0.1-develop' into 7.0.2-develop
# Conflicts: # kernel-o-monitor/monitor-integration-beetl/pom.xmlpull/5/head
commit
78c84616c3
|
@ -28,14 +28,12 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.stylefeng.roses.kernel.monitor.api.PrometheusApi;
|
||||
import cn.stylefeng.roses.kernel.monitor.api.constants.MonitorConstants;
|
||||
import cn.stylefeng.roses.kernel.monitor.api.pojo.prometheus.PromResultInfo;
|
||||
import cn.stylefeng.roses.kernel.monitor.system.holder.SystemHardwareInfoHolder;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
|
@ -110,7 +108,7 @@ public class PrometheusMonitorController {
|
|||
*/
|
||||
@GetResource(name = "jvm监控数据", path = "/view/monitor/getJvmInfo")
|
||||
@ResponseBody
|
||||
public String jvmInfo(@RequestParam("id") String id, @RequestParam("area") String area) {
|
||||
public String jvmInfo(@RequestParam(value = "id",required = false) String id, @RequestParam(value = "area",required = false) String area) {
|
||||
Map<String, Object> metricMap = getMetricInfos(getPromQl(id, area), "jvm_", "", "");
|
||||
return JSON.toJSONString(metricMap);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,8 @@
|
|||
request.dataObject = {
|
||||
level: level,
|
||||
isRate: 'irate',
|
||||
rateMetric: 'logback_events_total'
|
||||
rateMetric: 'logback_events_total',
|
||||
timeInterval: '[5m]'
|
||||
};
|
||||
request.setAsync(true);
|
||||
request.start();
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
<version>7.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<!--prometheus融合模块-->
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>monitor-integration-beetl</artifactId>
|
||||
<version>7.0.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue