Skip to content

Commit 2946b4d

Browse files
Added linechart for resource utilisation
1 parent 67e4733 commit 2946b4d

4 files changed

Lines changed: 86 additions & 20 deletions

File tree

public/configurations/dashboards/aarNSG.json

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"creationDate": "10/26/2016",
55
"title": "AAR NSG ({{snsg}})",
66
"visualizations": [
7-
{ "id": "aar-nsg-alarm-text", "x": 1, "y": 0, "w": 2, "h": 8, "minW": 1, "minH": 5, "static": true}
7+
{ "id": "aar-nsg-alarm-text", "x": 1, "y": 0, "w": 2, "h": 8, "minW": 1, "minH": 5, "static": true},
8+
{ "id": "aar-nsg-resource-linechart", "x": 0, "y": 8, "w": 10, "h": 15, "minW": 1, "minH": 5, "static": true}
89
],
910
"links": [
1011
{
@@ -31,22 +32,5 @@
3132
"label": "Alarms",
3233
"url": "/dashboards/aarNSGAlarms"
3334
}
34-
],
35-
"filterOptions": {
36-
"Metric": {
37-
"parameter": "metric",
38-
"default": "TotalBytesCount",
39-
"options": [
40-
{
41-
"label": "Total Bytes",
42-
"value": "TotalBytesCount",
43-
"default": true
44-
},
45-
{
46-
"label": "Total Packets",
47-
"value": "TotalPacketsCount"
48-
}
49-
]
50-
}
51-
}
35+
]
5236
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"id":"aar-nsg-resource-linechart",
3+
"title":"TBD",
4+
"service":"elasticsearch",
5+
"query":{
6+
"index":"{{index:nuage_sysmon}}",
7+
"type":"{{type:nuage_doc_type}}",
8+
"body":{
9+
"size":0,
10+
"query":{
11+
"bool":{
12+
"must":[
13+
{
14+
"range":{
15+
"timestamp":{
16+
"gte":"{{startTime:now-24h}}",
17+
"lte":"{{endTime:now}}",
18+
"format":"epoch_millis"
19+
}
20+
}
21+
},
22+
{
23+
"term": {
24+
"system_id": "{{nsgSystemId}}"
25+
}
26+
}
27+
]
28+
}
29+
},
30+
"aggs": {
31+
"ts": {
32+
"date_histogram": {
33+
"field": "timestamp",
34+
"interval": "{{interval:1h}}"
35+
},
36+
"aggs": {
37+
"CPU": {
38+
"avg": {
39+
"field": "cpu"
40+
}
41+
},
42+
"MEMORY": {
43+
"avg": {
44+
"field": "memory"
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"id": "aar-nsg-resource-linechart",
3+
"graph": "MultiLineGraph",
4+
"title": "Resource Utilisation",
5+
"description": "Memory and CPU utilization over a period of time selected in interval",
6+
"author": "Bharat Mukheja",
7+
"creationDate": "11/19/2018",
8+
"data": {
9+
"dateHistogram": true,
10+
"xColumn": "ts",
11+
"xLabel": "Time",
12+
"yColumn": ["CPU", "MEMORY"],
13+
"yTickFormat": ",.1f",
14+
"yLabel": "",
15+
"yTicks": 5,
16+
"linesColumn": ["CPU", "MEMORY"],
17+
"legend": {
18+
"orientation": "vertical",
19+
"show": true,
20+
"circleSize": 5,
21+
"labelOffset": 5
22+
},
23+
"tooltip": [
24+
{ "column": "columnType", "label": "Type"},
25+
{ "column": "yColumn", "label": "Value (%)", "format": "0.2f"},
26+
{ "column": "ts", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}
27+
]
28+
},
29+
"query": "aar-nsg-resource-linechart"
30+
}

src/components/App/MainMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class MainMenuView extends React.Component {
174174
<div>
175175
{nsgs.map((nsg) => {
176176

177-
let queryParams = Object.assign({}, context, { snsg: nsg.name, dnsg: nsg.name, nsgId: nsg.ID });
177+
let queryParams = Object.assign({}, context, { snsg: nsg.name, dnsg: nsg.name, nsgId: nsg.ID, nsgSystemId: nsg.systemID });
178178

179179
return (
180180
<ListItem

0 commit comments

Comments
 (0)