Index: bootstrap/css/bootstrap-theme.css
===================================================================
diff -u -r8220615e8374703726b27970e2340af1c479da86 -rb2cda0742bff7e718fcf0ee5eaaeb142d632b849
--- bootstrap/css/bootstrap-theme.css (.../bootstrap-theme.css) (revision 8220615e8374703726b27970e2340af1c479da86)
+++ bootstrap/css/bootstrap-theme.css (.../bootstrap-theme.css) (revision b2cda0742bff7e718fcf0ee5eaaeb142d632b849)
@@ -506,6 +506,11 @@
+
+
+
+
+
Index: ARMS/metricbeat2ReqTemplate.js
===================================================================
diff -u
--- ARMS/metricbeat2ReqTemplate.js (revision 0)
+++ ARMS/metricbeat2ReqTemplate.js (revision b2cda0742bff7e718fcf0ee5eaaeb142d632b849)
@@ -0,0 +1,99 @@
+function metricbeat2(selectedNodeHost){
+
+ console.log("<== metricbeat2 ==> ");
+ console.log("before savedNodeHost ==> " + savedNodeHost);
+ if(typeof selectedNodeHost == "undefined" || selectedNodeHost == null || selectedNodeHost == "")
+ console.log("savedNodeHost = " + savedNodeHost);
+ else
+ savedNodeHost = $.trim(selectedNodeHost);
+
+ var start = $("#reservationtime").data().daterangepicker.startDate;
+ console.log("start hour check = " + start.format('H'));
+ var startHours = parseInt(start.format('H'));
+ var startHoursStr;
+ if(startHours < 10){
+ startHoursStr = "0" + startHours;
+ }else{
+ startHoursStr = startHours;
+ }
+ var searchStartStr = start.format('YYYY-MM-DD') + "T" + startHoursStr + start.format(':mm:ss') + ".000Z";
+ console.log("searchStartStr check = " + searchStartStr);
+
+ var end = $("#reservationtime").data().daterangepicker.endDate;
+ console.log("end hour check = " + end.format('H'));
+ var endHours = parseInt(end.format('H'));
+ var endHoursStr;
+ if(endHours < 10){
+ endHoursStr = "0" + endHours;
+ }else{
+ endHoursStr = endHours;
+ }
+ var searchEndStr = end.format('YYYY-MM-DD') + "T" + endHoursStr + end.format(':mm:ss') + ".000Z";
+ console.log("searchEndStr check = " + searchEndStr);
+
+ console.log("after savedNodeHost ==> " + savedNodeHost);
+
+ $.getJSON("metricbeatReqTemplate.json", function (reqdata) {
+ console.log(reqdata.query.bool.filter[1].range["@timestamp"].gte);
+ reqdata.query.bool.filter[1].range["@timestamp"].gte = searchStartStr;
+ reqdata.query.bool.filter[1].range["@timestamp"].lte = searchEndStr;
+ reqdata.query.bool.filter[0].bool.should[0].match["agent.hostname"] = savedNodeHost;
+
+ var queryString = JSON.stringify(reqdata);
+ console.log(queryString);
+
+ var url = "";
+ var type = "";
+ if($(location).attr('port') == 9999){
+ url = "/api/elasticsearch/metricbeat/search/api2.json";
+ type = "get";
+ }else{
+ url="/elasticsearch/metricbeat-*/_search";
+ type = "post";
+ }
+
+ $.ajax({
+ url : url,
+ type : type,
+ data : queryString,
+ dataType : 'json',
+ jsonp : false,
+ timeout : 31313,
+ global : true,
+ contentType : 'application/json;charset=UTF-8',
+ cache : false,
+ success : function(data) {
+
+ console.log("metricbeat response data = " + JSON.stringify(data));
+ var chartLabels = [];
+ var chartData5 = [];
+ var chartData6 = [];
+
+ var filteredObj = data.aggregations[2].buckets;
+
+ $.each(filteredObj, function(inx, obj){
+ chartLabels.push(obj.key_as_string);
+ chartData5.push(obj[5].value);
+ chartData6.push(obj[6].value);
+ });
+
+ var config = {
+ type: 'line',
+ data: {
+ labels: chartLabels,
+ datasets: [{
+ label: 'memory.actual.used.pct',
+ data: chartData5,
+ backgroundColor: 'rgba(0, 119, 204, 0.3)'
+ },{
+ label: 'memory.used.pct',
+ data: chartData6,
+ backgroundColor: 'rgba(0, 119, 204, 0.3)'
+ }]
+ }
+ }
+ new Chart(document.getElementById('metricbeat2Canvas'), config);
+ }
+ });
+ });
+}
\ No newline at end of file
Index: ARMS/metricbeat2ReqTemplate2.json
===================================================================
diff -u
--- ARMS/metricbeat2ReqTemplate2.json (revision 0)
+++ ARMS/metricbeat2ReqTemplate2.json (revision b2cda0742bff7e718fcf0ee5eaaeb142d632b849)
@@ -0,0 +1,72 @@
+{
+ "aggs": {
+ "2": {
+ "date_histogram": {
+ "field": "@timestamp",
+ "fixed_interval": "30s",
+ "time_zone": "Asia/Seoul",
+ "min_doc_count": 1
+ },
+ "aggs": {
+ "5": {
+ "max": {
+ "field": "memory.actual.used.pct"
+ }
+ },
+ "6": {
+ "max": {
+ "field": "memory.used.pct"
+ }
+ }
+ }
+ }
+ },
+ "size": 0,
+ "_source": {
+ "excludes": []
+ },
+ "stored_fields": [
+ "*"
+ ],
+ "script_fields": {},
+ "docvalue_fields": [
+ {
+ "field": "@timestamp",
+ "format": "date_time"
+ },
+ {
+ "field": "system.process.cpu.start_time",
+ "format": "date_time"
+ }
+ ],
+ "query": {
+ "bool": {
+ "must": [],
+ "filter": [
+ {
+ "bool": {
+ "should": [
+ {
+ "match": {
+ "agent.hostname": "9eb75e7e6e3e"
+ }
+ }
+ ],
+ "minimum_should_match": 1
+ }
+ },
+ {
+ "range": {
+ "@timestamp": {
+ "format": "strict_date_optional_time",
+ "gte": "2020-12-20T04:57:55.436Z",
+ "lte": "2020-12-20T05:12:55.436Z"
+ }
+ }
+ }
+ ],
+ "should": [],
+ "must_not": []
+ }
+ }
+}
\ No newline at end of file
Index: api/elasticsearch/metricbeat/search/api2.json
===================================================================
diff -u
--- api/elasticsearch/metricbeat/search/api2.json (revision 0)
+++ api/elasticsearch/metricbeat/search/api2.json (revision b2cda0742bff7e718fcf0ee5eaaeb142d632b849)
@@ -0,0 +1,354 @@
+{
+ "took": 1861,
+ "timed_out": false,
+ "_shards": {
+ "total": 45,
+ "successful": 44,
+ "skipped": 0,
+ "failed": 0
+ },
+ "hits": {
+ "total": {
+ "value": 1361,
+ "relation": "eq"
+ },
+ "max_score": null,
+ "hits": []
+ },
+ "aggregations": {
+ "2": {
+ "buckets": [
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8194000124931335
+ },
+ "key_as_string": "2020-12-20T13:58:00.000+09:00",
+ "key": 1608440280000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.30000001192092896
+ },
+ "6": {
+ "value": 0.8192999958992004
+ },
+ "key_as_string": "2020-12-20T13:58:30.000+09:00",
+ "key": 1608440310000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8195000290870667
+ },
+ "key_as_string": "2020-12-20T13:59:00.000+09:00",
+ "key": 1608440340000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8195000290870667
+ },
+ "key_as_string": "2020-12-20T13:59:30.000+09:00",
+ "key": 1608440370000,
+ "doc_count": 47
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8195000290870667
+ },
+ "key_as_string": "2020-12-20T14:00:00.000+09:00",
+ "key": 1608440400000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8195000290870667
+ },
+ "key_as_string": "2020-12-20T14:00:30.000+09:00",
+ "key": 1608440430000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.819599986076355
+ },
+ "key_as_string": "2020-12-20T14:01:00.000+09:00",
+ "key": 1608440460000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.819599986076355
+ },
+ "key_as_string": "2020-12-20T14:01:30.000+09:00",
+ "key": 1608440490000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.819599986076355
+ },
+ "key_as_string": "2020-12-20T14:02:00.000+09:00",
+ "key": 1608440520000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8197000026702881
+ },
+ "key_as_string": "2020-12-20T14:02:30.000+09:00",
+ "key": 1608440550000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8197000026702881
+ },
+ "key_as_string": "2020-12-20T14:03:00.000+09:00",
+ "key": 1608440580000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8197000026702881
+ },
+ "key_as_string": "2020-12-20T14:03:30.000+09:00",
+ "key": 1608440610000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3003000020980835
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:04:00.000+09:00",
+ "key": 1608440640000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:04:30.000+09:00",
+ "key": 1608440670000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:05:00.000+09:00",
+ "key": 1608440700000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:05:30.000+09:00",
+ "key": 1608440730000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:06:00.000+09:00",
+ "key": 1608440760000,
+ "doc_count": 44
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:06:30.000+09:00",
+ "key": 1608440790000,
+ "doc_count": 48
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:07:00.000+09:00",
+ "key": 1608440820000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:07:30.000+09:00",
+ "key": 1608440850000,
+ "doc_count": 43
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8198000192642212
+ },
+ "key_as_string": "2020-12-20T14:08:00.000+09:00",
+ "key": 1608440880000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:08:30.000+09:00",
+ "key": 1608440910000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:09:00.000+09:00",
+ "key": 1608440940000,
+ "doc_count": 44
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8199999928474426
+ },
+ "key_as_string": "2020-12-20T14:09:30.000+09:00",
+ "key": 1608440970000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8199999928474426
+ },
+ "key_as_string": "2020-12-20T14:10:00.000+09:00",
+ "key": 1608441000000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8199999928474426
+ },
+ "key_as_string": "2020-12-20T14:10:30.000+09:00",
+ "key": 1608441030000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3001999855041504
+ },
+ "6": {
+ "value": 0.8199999928474426
+ },
+ "key_as_string": "2020-12-20T14:11:00.000+09:00",
+ "key": 1608441060000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:11:30.000+09:00",
+ "key": 1608441090000,
+ "doc_count": 46
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:12:00.000+09:00",
+ "key": 1608441120000,
+ "doc_count": 45
+ },
+ {
+ "5": {
+ "value": 0.3000999987125397
+ },
+ "6": {
+ "value": 0.8198999762535095
+ },
+ "key_as_string": "2020-12-20T14:12:30.000+09:00",
+ "key": 1608441150000,
+ "doc_count": 46
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file