Search in sources :

Example 1 with WallResult

use of com.alibaba.druid.admin.model.dto.WallResult in project druid by alibaba.

the class MonitorStatService method getWallStatMap.

public String getWallStatMap(Map<String, String> parameters) {
    Map<String, ServiceNode> allNodeMap = getServiceAllNodeMap(parameters);
    List<WallResult> countResult = new ArrayList<>();
    for (String nodeKey : allNodeMap.keySet()) {
        ServiceNode serviceNode = allNodeMap.get(nodeKey);
        String url = getRequestUrl(parameters, serviceNode, "/druid/wall.json");
        WallResult wallResult = HttpUtil.get(url, WallResult.class);
        countResult.add(wallResult);
    }
    WallResult lastCount = new WallResult();
    for (WallResult wallResult : countResult) {
        lastCount.sum(wallResult, lastCount);
    }
    return JSON.toJSONString(lastCount);
}
Also used : ServiceNode(com.alibaba.druid.admin.model.ServiceNode) WallResult(com.alibaba.druid.admin.model.dto.WallResult) ArrayList(java.util.ArrayList)

Aggregations

ServiceNode (com.alibaba.druid.admin.model.ServiceNode)1 WallResult (com.alibaba.druid.admin.model.dto.WallResult)1 ArrayList (java.util.ArrayList)1