From e8d7ab2226a10f17fedcd61f5c0a1bd3e2156766 Mon Sep 17 00:00:00 2001 From: smile Date: Thu, 20 Jun 2019 17:49:47 +0300 Subject: [PATCH] Add new Radio Metrics Row for rssi/cinr and rx/tx power metrics --- templates/ddash/dash_mo.j2 | 22 +++++- templates/ddash/graph_radio_rssi_cinr.j2 | 97 +++++++++++++++++++++++ templates/ddash/graph_radio_txrxpower.j2 | 99 ++++++++++++++++++++++++ 3 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 templates/ddash/graph_radio_rssi_cinr.j2 create mode 100644 templates/ddash/graph_radio_txrxpower.j2 diff --git a/templates/ddash/dash_mo.j2 b/templates/ddash/dash_mo.j2 index 411a962049..65e0108cf2 100644 --- a/templates/ddash/dash_mo.j2 +++ b/templates/ddash/dash_mo.j2 @@ -124,7 +124,7 @@ {% for port in port_types -%} {{ comma() }} { - "collapse": false, + "collapse": true, "editable": false, "height": "250px", "showTitle": true, @@ -142,7 +142,7 @@ , {% set comma = joiner(",") -%} { - "collapse": false, + "collapse": true, "editable": false, "height": "250px", "showTitle": true, @@ -160,7 +160,7 @@ {% for lag in lags -%} {{ comma() }}{ - "collapse": false, + "collapse": true, "editable": false, "height": "250px", "showTitle": true, @@ -179,6 +179,22 @@ {% include "row_errors.j2" with context -%} {%endif%} + {%if port_types %} + , + { + "collapse": true, + "editable": false, + "height": "250px", + "showTitle": true, + "internal_comment": "radio_row", + "title": "Radio metrics", + "panels": [ + {% include "graph_radio_rssi_cinr.j2" with context -%}, + {% include "graph_radio_txrxpower.j2" with context -%} + ] + } + {%endif%} + {%if object_metrics%} , diff --git a/templates/ddash/graph_radio_rssi_cinr.j2 b/templates/ddash/graph_radio_rssi_cinr.j2 new file mode 100644 index 0000000000..afbe1677d4 --- /dev/null +++ b/templates/ddash/graph_radio_rssi_cinr.j2 @@ -0,0 +1,97 @@ +{ + "title": "Radio | RSSI and CINR", + "aliasColors": {}, + "bars": false, + "datasource": null, + "fill": 1, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": "4fcca442-a11f-44af-903f-d0fb50570eaf", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dateTimeColDataType": "ts", + "datetimeLoading": false, + "database": "noc", + "dateLoading": false, + "tableLoading": false, + "dateColDataType": "date", + "table": "interface", + "intervalFactor": 1, + "query": "SELECT \n t, \n groupArray((iface, RSSI)) AS groupArr \nFROM (\n SELECT $timeSeries as t, \n arrayStringConcat(path,'.') as iface, \n avg(rssi) as `RSSI` \n FROM \n $table \n WHERE \n managed_object=$bi_id \n and $timeFilter \n and rssi != -32555 \n GROUP BY arrayStringConcat(path,'.'), t ORDER BY t) \nGROUP BY t \nORDER BY t ASC", + "refId": "A", + "resultFormat": "time_series" + }, + { + "dateTimeColDataType": "ts", + "datetimeLoading": false, + "database": "noc", + "dateLoading": false, + "tableLoading": false, + "dateColDataType": "date", + "table": "interface", + "intervalFactor": 1, + "query": "SELECT \n t, \n groupArray((iface, CINR)) AS groupArr \nFROM (\n SELECT $timeSeries as t, \n arrayStringConcat(path,'.') as iface, \n avg(cinr) as `CINR` \n FROM \n $table \n WHERE \n managed_object=$bi_id \n and $timeFilter \n and cinr != -32555 \n GROUP BY arrayStringConcat(path,'.'), t ORDER BY t) \nGROUP BY t \nORDER BY t ASC", + "refId": "A", + "resultFormat": "time_series" + } + ], + "timeFrom": null, + "timeShift": null, + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "show": true + }, + "y-axis": true, + "yaxes": [ + { + "format": "dB", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] +} diff --git a/templates/ddash/graph_radio_txrxpower.j2 b/templates/ddash/graph_radio_txrxpower.j2 new file mode 100644 index 0000000000..e5c685076e --- /dev/null +++ b/templates/ddash/graph_radio_txrxpower.j2 @@ -0,0 +1,99 @@ +{ + "title": "Radio | RX/TX Power", + "aliasColors": {}, + "bars": false, + "datasource": null, + "fill": 1, + "grid": { + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": "97bc1951-7466-43a8-b91d-22c470082dad", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "sortDesc": true, + "total": false, + "values": true, + "rightSide": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dateTimeColDataType": "ts", + "datetimeLoading": false, + "database": "noc", + "dateLoading": false, + "tableLoading": false, + "dateColDataType": "date", + "table": "interface", + "intervalFactor": 1, + "query": "SELECT \n t, \n groupArray((iface, \"TX Power\")) AS groupArr \nFROM (\n SELECT $timeSeries as t, \n arrayStringConcat(path,'.') as iface, \n avg(tx_power) as `TX Power` \n FROM \n $table \n WHERE \n managed_object=$bi_id \n and $timeFilter \n and tx_power != -32555 \n GROUP BY arrayStringConcat(path,'.'), t ORDER BY t) \nGROUP BY t \nORDER BY t ASC", + "refId": "A", + "resultFormat": "time_series" + }, + { + "dateTimeColDataType": "ts", + "datetimeLoading": false, + "database": "noc", + "dateLoading": false, + "tableLoading": false, + "dateColDataType": "date", + "table": "interface", + "intervalFactor": 1, + "query": "SELECT \n t, \n groupArray((iface, \"RX Power\")) AS groupArr \nFROM (\n SELECT $timeSeries as t, \n arrayStringConcat(path,'.') as iface, \n avg(rx_power) as `RX Power` \n FROM \n $table \n WHERE \n managed_object=$bi_id \n and $timeFilter \n and rx_power != -32555 \n GROUP BY arrayStringConcat(path,'.'), t ORDER BY t) \nGROUP BY t \nORDER BY t ASC", + "refId": "A", + "resultFormat": "time_series" + } + + ], + "timeFrom": null, + "timeShift": null, + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "show": true + }, + "y-axis": true, + "yaxes": [ + { + "format": "dBm", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] +} -- GitLab