Commit d17ad59e authored by gaozhentao's avatar gaozhentao

修改折线图纵轴信息

parent eb3de0a7
......@@ -73,7 +73,7 @@ public class ReliabilityApi {
/**
* 2. 可靠性信息接口:所有集群的状态
* 获取折线图
*
* @return 集群信息json字符串
*/
......
......@@ -48,10 +48,16 @@ public class HttpTask extends BasicTask{
Map<String,String> map = new HashMap();
long dur = 0;
long start = System.currentTimeMillis();
try {
if (hostInfo.getService_method().equals("post") && !hostInfo.getCluster_name().equals("网证开通接口")) {
if(hostInfo.getRequest_body()== null){
map = SendHttpUtil.doPost(hostInfo.getService_path(),"");
}else {
map = SendHttpUtil.doPost(hostInfo.getService_path(),hostInfo.getRequest_body());
}
}
if (hostInfo.getService_method().equals("get")) {
map = SendHttpUtil.doGet(hostInfo.getService_path());
}
......
......@@ -220,12 +220,10 @@ public class Manager {
public Map selectChart(String json) throws Exception{
JSONObject jsonObject = JSONObject.fromObject(json);
String clusterName = jsonObject.getString("clusterName");
String ip = jsonObject.getString("ip");
String port = jsonObject.getString("port");
String url = jsonObject.getString("url");
String flag = jsonObject.getString("flag");
Server_Host_Info hostInfo = cassandraDao.findHostInfo(clusterName, ip, port);
Server_Host_Info hostInfo = cassandraDao.findHostInfo(url);
return getData(hostInfo.getService_path(),flag);
}
......@@ -291,7 +289,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - number);
queryBuilder.setStart(calendar.getTime())
.setEnd(new Date())
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(1, org.kairosdb.client.builder.TimeUnit.MINUTES));
break;
......@@ -300,7 +298,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - (number*10));
queryBuilder.setStart(calendar.getTime())
.setEnd(new Date())
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(10, org.kairosdb.client.builder.TimeUnit.MINUTES));
......@@ -310,7 +308,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - (number*30));
queryBuilder.setStart(calendar.getTime())
.setEnd(new Date())
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(30, org.kairosdb.client.builder.TimeUnit.MINUTES));
break;
......@@ -319,7 +317,7 @@ public class Manager {
calendar.get(Calendar.HOUR) - number);
queryBuilder.setStart(calendar.getTime())
.setEnd(new Date())
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(1, org.kairosdb.client.builder.TimeUnit.HOURS));
break;
......@@ -345,7 +343,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - number);
queryBuilder.setStart(calendar.getTime())
.setEnd(currDate)
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(1, org.kairosdb.client.builder.TimeUnit.MINUTES));
break;
......@@ -354,7 +352,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - (number*10));
queryBuilder.setStart(calendar.getTime())
.setEnd(currDate)
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(10, org.kairosdb.client.builder.TimeUnit.MINUTES));
break;
......@@ -363,7 +361,7 @@ public class Manager {
calendar.get(Calendar.MINUTE) - (number*30));
queryBuilder.setStart(calendar.getTime())
.setEnd(currDate)
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(30, org.kairosdb.client.builder.TimeUnit.MINUTES));
break;
......@@ -372,7 +370,7 @@ public class Manager {
calendar.get(Calendar.HOUR) - number);
queryBuilder.setStart(calendar.getTime())
.setEnd(currDate)
.addMetric("heartbeat")
.addMetric("respdur")
.addTag("host",servicePath)
.addAggregator(AggregatorFactory.createSumAggregator(1, org.kairosdb.client.builder.TimeUnit.HOURS));
break;
......
......@@ -91,8 +91,8 @@ public class CassandraDaoImpl {
return template.selectOne(cql,Admin.class);
}
public Server_Host_Info findHostInfo(String clusterName, String ip, String port) {
String cql ="select * from ctid_prof.server_host_info;";
public Server_Host_Info findHostInfo(String url) {
String cql ="select * from ctid_prof.server_host_info where service_path = '"+url+"' allow filtering;;";
return template.selectOne(cql, Server_Host_Info.class);
}
}
......@@ -4,15 +4,14 @@ spring:
data:
cassandra:
keyspace-name: ctid_prof
# contact-points: 192.168.189.130
contact-points: 200.102.10.11
# contact-points: 121.22.111.251
# contact-points: 200.102.10.11
contact-points: 121.22.111.251
# contact-points: 172.16.15.7
port: 9042
# port: 9002
username: gzt
password: gzt
# port: 9042
port: 9002
# username: gzt
# password: gzt
security:
user:
name: user
......@@ -33,8 +32,8 @@ demo:
kairosdb:
# url: "http://172.16.15.7:8080"
# url: "http://192.168.189.130:8080"
url: "http://200.102.10.11:8080"
# url: "http://121.22.111.251:8080"
# url: "http://200.102.10.11:8080"
url: "http://121.22.111.251:8080"
maxConnTotal: 50
maxConnPerRoute: 30
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>可靠性监控</title><link href=/css/app.2203e9b9ee8b1d7192443b2785515e8d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/js/manifest.1766e3c7586055624ca0.js></script><script type=text/javascript src=/js/vendor.ca5f61d8c28f8f06b46b.js></script><script type=text/javascript src=/js/app.e497873ea691b2c2a6b4.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>可靠性监控</title><link href=/css/app.f9fdd6e7fd0db3e16532e3273f619809.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/js/manifest.1766e3c7586055624ca0.js></script><script type=text/javascript src=/js/vendor.ca5f61d8c28f8f06b46b.js></script><script type=text/javascript src=/js/app.cb5f129dbe993bc66a88.js></script></body></html>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap 3f83eb00deeb99c1fc0f"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"js/manifest.1766e3c7586055624ca0.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3f83eb00deeb99c1fc0f"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 35e12178afd06c48524a"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"js/manifest.1766e3c7586055624ca0.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 35e12178afd06c48524a"],"sourceRoot":""}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment