diff --git a/docker-compose/grafana/dashboards/home2.json b/docker-compose/grafana/dashboards/home2.json new file mode 100644 index 0000000000000000000000000000000000000000..b0369cb56d6acd56caa4c7f44770a238b96a6d25 --- /dev/null +++ b/docker-compose/grafana/dashboards/home2.json @@ -0,0 +1,785 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 12, + "links": [], + "liveNow": false, + "panels": [ + { + "alignNumbersToRightEnabled": true, + "columnAliases": [], + "columnFiltersEnabled": false, + "columnWidthHints": [], + "columns": [], + "compactRowsEnabled": true, + "datasource": { + "type": "yesoreyeram-infinity-datasource", + "uid": "alertaui" + }, + "datatablePagingType": "simple_numbers", + "datatableTheme": "basic_theme", + "emptyData": false, + "fontSize": "100%", + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "hoverEnabled": true, + "id": 58, + "infoEnabled": false, + "lengthChangeEnabled": true, + "orderColumnEnabled": true, + "pagingTypes": [ + { + "$$hashKey": "object:142", + "text": "Page number buttons only", + "value": "numbers" + }, + { + "$$hashKey": "object:143", + "text": "'Previous' and 'Next' buttons only", + "value": "simple" + }, + { + "$$hashKey": "object:144", + "text": "'Previous' and 'Next' buttons, plus page numbers", + "value": "simple_numbers" + }, + { + "$$hashKey": "object:145", + "text": "'First', 'Previous', 'Next' and 'Last' buttons", + "value": "full" + }, + { + "$$hashKey": "object:146", + "text": "'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers", + "value": "full_numbers" + }, + { + "$$hashKey": "object:147", + "text": "'First' and 'Last' buttons, plus page numbers", + "value": "first_last_numbers" + } + ], + "panelHeight": 170, + "pluginVersion": "8.4.5", + "rowNumbersEnabled": false, + "rowsPerPage": 5, + "scroll": false, + "scrollHeight": "default", + "searchEnabled": true, + "searchHighlightingEnabled": false, + "showCellBorders": false, + "showHeader": true, + "showRowBorders": true, + "sort": { + "col": 0, + "desc": true + }, + "sortByColumns": [ + { + "$$hashKey": "object:17", + "columnData": 0, + "sortMethod": "desc" + } + ], + "sortByColumnsData": [ + [ + 0, + "desc" + ] + ], + "stripedRowsEnabled": true, + "styles": [ + { + "$$hashKey": "object:19", + "dateFormat": "dd DD/MM HH:mm", + "pattern": "Time", + "type": "date" + }, + { + "$$hashKey": "object:45", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Panel|Dashboard|Alert", + "sanitize": true, + "splitPattern": "/ /", + "thresholds": [], + "type": "string", + "unit": "short", + "valueMaps": [] + }, + { + "$$hashKey": "object:76", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": true, + "mappingType": 1, + "pattern": "Alerta Link", + "splitPattern": "/ /", + "thresholds": [], + "type": "string", + "unit": "short", + "valueMaps": [] + }, + { + "$$hashKey": "object:867", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Since", + "splitPattern": "/ /", + "thresholds": [], + "type": "date", + "unit": "short" + } + ], + "targets": [ + { + "columns": [ + { + "selector": "createTime", + "text": "Since", + "type": "string" + }, + { + "selector": "severity", + "text": "Severity", + "type": "string" + }, + { + "selector": "status", + "text": "Status", + "type": "string" + }, + { + "selector": "event", + "text": "Name", + "type": "string" + }, + { + "selector": "text", + "text": "Description", + "type": "string" + }, + { + "selector": "attributes.lofarDevice", + "text": "Device", + "type": "string" + }, + { + "selector": "attributes.lofarAttribute", + "text": "Attribute", + "type": "string" + }, + { + "selector": "attributes.grafanaDashboardHtml", + "text": "Dashboard", + "type": "string" + }, + { + "selector": "attributes.grafanaPanelHtml", + "text": "Panel", + "type": "string" + }, + { + "selector": "attributes.grafanaAlertHtml", + "text": "Alert", + "type": "string" + }, + { + "selector": "href", + "text": "Alerta Link", + "type": "string" + } + ], + "datasource": { + "type": "yesoreyeram-infinity-datasource", + "uid": "alertaui" + }, + "filters": [], + "format": "table", + "global_query_id": "", + "hide": false, + "refId": "A", + "root_selector": "", + "source": "url", + "type": "json", + "url": "http://alerta-web:8080/api/alerts", + "url_options": { + "data": "", + "method": "GET" + } + } + ], + "themeOptions": { + "dark": "./styles/dark.scss", + "light": "./styles/light.scss" + }, + "themes": [ + { + "$$hashKey": "object:117", + "disabled": false, + "text": "Basic", + "value": "basic_theme" + }, + { + "$$hashKey": "object:118", + "disabled": true, + "text": "Bootstrap", + "value": "bootstrap_theme" + }, + { + "$$hashKey": "object:119", + "disabled": true, + "text": "Foundation", + "value": "foundation_theme" + }, + { + "$$hashKey": "object:120", + "disabled": true, + "text": "ThemeRoller", + "value": "themeroller_theme" + } + ], + "title": "Alerta Alerts", + "transform": "table", + "type": "briangann-datatable-panel" + }, + { + "description": "", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 60, + "links": [ + { + "targetBlank": true, + "title": "Details", + "url": "/alerting/list" + } + ], + "options": { + "alertInstanceLabelFilter": "", + "alertName": "", + "dashboardAlerts": false, + "groupBy": [], + "groupMode": "default", + "maxItems": 20, + "sortOrder": 1, + "stateFilter": { + "error": true, + "firing": true, + "inactive": false, + "noData": false, + "normal": false, + "pending": true + } + }, + "title": "Firing Alerts", + "type": "alertlist" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 15, + "panels": [], + "title": "Devices", + "type": "row" + }, + { + "description": "Links to other dashboards", + "gridPos": { + "h": 13, + "w": 3, + "x": 0, + "y": 12 + }, + "id": 47, + "options": { + "folderId": 0, + "maxItems": 10, + "query": "", + "showHeadings": false, + "showRecentlyViewed": false, + "showSearch": true, + "showStarred": false, + "tags": [] + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": false, + "rawSql": "SELECT\n data_time AS \"time\",\n att_conf_id\nFROM att_scalar_devboolean_rw\nWHERE\n $__timeFilter(data_time)\nORDER BY data_time", + "refId": "A", + "select": [ + [ + { + "params": [ + "att_conf_id" + ], + "type": "column" + } + ] + ], + "table": "att_scalar_devboolean_rw", + "timeColumn": "data_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Dashboards", + "type": "dashlist" + }, + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "description": "Progress of station initialisation", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + }, + { + "color": "red", + "value": 1 + }, + { + "color": "green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 4, + "x": 3, + "y": 12 + }, + "id": 61, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "text": {} + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "exemplar": true, + "expr": "device_attribute{device=\"stat/boot/1\",name=\"progress_R\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Station Initialisation", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "green", + "index": 1, + "text": "ON" + }, + "1": { + "color": "red", + "index": 3, + "text": "OFF" + }, + "7": { + "color": "yellow", + "index": 2, + "text": "STANDBY" + }, + "8": { + "color": "red", + "index": 0, + "text": "FAULT" + }, + "11": { + "color": "red", + "index": 4, + "text": "ALARM" + } + }, + "type": "value" + } + ], + "noValue": "???", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 6, + "x": 7, + "y": 12 + }, + "id": 4, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 20, + "valueSize": 20 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "exemplar": true, + "expr": "device_attribute{name=\"State\",device=~\"stat/.*/1\"}", + "instant": false, + "interval": "", + "legendFormat": "{{device}}", + "refId": "A" + } + ], + "title": "Device States", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": ".*/(.*)/1", + "renamePattern": "$1" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "???", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 7, + "x": 13, + "y": 12 + }, + "id": 62, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 20, + "valueSize": 20 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "exemplar": false, + "expr": "sort_desc(sum by (device,name) (device_attribute{name=~\".*_error_R\"})) > 0", + "instant": true, + "interval": "", + "legendFormat": "{{device}} / {{name}}", + "refId": "A" + } + ], + "title": "Error Conditions", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": ".*/(.*)/1", + "renamePattern": "$1" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 100 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 3, + "y": 18 + }, + "id": 44, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": false + }, + "pluginVersion": "8.4.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6W2nM-Vnz" + }, + "exemplar": false, + "expr": "device_attribute{device=\"stat/boot/1\",name=\"status_R\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Initialisation status", + "transformations": [ + { + "id": "labelsToFields", + "options": {} + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "device": true, + "device_attribute{device=\"stat/boot/1\", dim_x=\"1\", dim_y=\"0\", instance=\"tango-prometheus-exporter:8000\", job=\"tango\", label=\"status_R\", name=\"status_R\", str_value=\"Initialisation completed\", type=\"string\", x=\"0\", y=\"0\"}": true, + "dim_x": true, + "dim_y": true, + "instance": true, + "job": true, + "label": true, + "name": true, + "type": true, + "x": true, + "y": true + }, + "indexByName": { + "Time": 0, + "Value": 5, + "device": 1, + "dim_x": 2, + "dim_y": 3, + "instance": 4, + "job": 6, + "label": 7, + "name": 8, + "str_value": 9, + "type": 10, + "x": 11, + "y": 12 + }, + "renameByName": { + "name": "", + "str_value": "status" + } + } + } + ], + "type": "table" + } + ], + "refresh": false, + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Home2", + "uid": "home", + "version": 1, + "weekStart": "" +} diff --git a/docker-compose/grafana/grafana.ini b/docker-compose/grafana/grafana.ini index acfabe0f10190c2b07ae579d21bd1abfc1891ff3..a05da04de6eed9551215dca3bdedbd72843ff1be 100644 --- a/docker-compose/grafana/grafana.ini +++ b/docker-compose/grafana/grafana.ini @@ -290,7 +290,7 @@ enable_gzip = true ;min_refresh_interval = 5s # Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json" -default_home_dashboard_path = /var/lib/grafana/dashboards/home.json +default_home_dashboard_path = /var/lib/grafana/dashboards/home2.json #################################### Users ############################### [users]