Hello, I want to create a graph for following sample input,
Date, Name (can be TCP/UDP or any other), Packets In, Packets Out
This graph will show network throughput of TCP packets, UDP packets and total of TCP and UDP packets.
I am able to create it for TCP and UDP packets. Please refer screenshot.
How to add Total Network Throughput in the graph?
Note: For Network Throughput I have created scripted field in the index.
Here is graph object json
{
"index": "trae-stat",
"query": {
"query_string": {
"query": "name:(udp|tcp)",
"analyze_wildcard": true
}
},
"filter":
}
{
"type": "line",
"params": {
"shareYAxis": true,
"addTooltip": true,
"addLegend": true,
"showCircles": true,
"smoothLines": false,
"interpolate": "linear",
"scale": "linear",
"drawLinesBetweenPoints": true,
"radiusRatio": 9,
"times": ,
"addTimeMarker": false,
"defaultYExtents": false,
"setYExtents": false,
"yAxis": {}
},
"aggs": [
{
"id": "1",
"type": "sum",
"schema": "metric",
"params": {
"field": "nw_thrput"
}
},
{
"id": "2",
"type": "date_histogram",
"schema": "segment",
"params": {
"field": "@timestamp",
"interval": "s",
"customInterval": "2h",
"min_doc_count": 1,
"extended_bounds": {}
}
},
{
"id": "3",
"type": "terms",
"schema": "group",
"params": {
"field": "name",
"size": 5,
"order": "desc",
"orderBy": "1"
}
}
],
"listeners": {}
}