use of com.alibaba.druid.admin.model.dto.SqlDetailResult in project druid by alibaba.
the class MonitorStatService method getSqlStat.
/**
* 获取sql详情
*
* @param id
* @param serviceId consul获取的服务id
* @return
*/
private String getSqlStat(Integer id, String serviceId) {
log.info("serviceId:{}", serviceId);
ServiceNode serviceNode = serviceIdMap.get(serviceId);
String url = "http://" + serviceNode.getAddress() + ":" + serviceNode.getPort() + "/druid/sql-" + id + ".json";
SqlDetailResult sqlDetailResult = HttpUtil.get(url, SqlDetailResult.class);
return JSON.toJSONString(sqlDetailResult);
}
Aggregations