diff --git a/etc/kayobe/kolla/config/grafana/dashboards/openstack/openstack.json b/etc/kayobe/kolla/config/grafana/dashboards/openstack/openstack.json index 6841ad19f..4de56d678 100644 --- a/etc/kayobe/kolla/config/grafana/dashboards/openstack/openstack.json +++ b/etc/kayobe/kolla/config/grafana/dashboards/openstack/openstack.json @@ -2126,6 +2126,19 @@ "title": "Glance Images", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 11, + "panels": [], + "title": "Logs", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -2390,6 +2403,360 @@ } ], "type": "table" + }, + { + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "symlog" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Show in Opensearch", + "url": "http{% endraw %}{{ 's' if kolla_enable_tls_internal | bool else '' }}://{{ kolla_internal_vip_address }}{% raw %}:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'${__from:date}',to:'${__to:date}'))&_a=(columns:!(_source),filters:!(),interval:auto,query:(language:lucene,query:'log_level:${loglevel:lucene} AND programname:(\"${__data.fields[\"programname.keyword\"]}\") AND Hostname:${host:lucene}'),sort:!())" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "programname.keyword" + }, + "properties": [ + { + "id": "displayName", + "value": "Program Name" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "alias": "", + "bucketAggs": [ + { + "field": "programname.keyword", + "id": "3", + "settings": { + "min_doc_count": "1", + "order": "desc", + "orderBy": "_count", + "size": "20" + }, + "type": "terms" + }, + { + "field": "@timestamp", + "id": "2", + "settings": { + "interval": "1h", + "min_doc_count": "0", + "trimEdges": "0" + }, + "type": "date_histogram" + } + ], + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "format": "table", + "metrics": [ + { + "id": "1", + "type": "count" + } + ], + "query": "log_level:$loglevel AND programname:$program_name AND Hostname:$host", + "queryType": "lucene", + "refId": "A", + "timeField": "@timestamp" + } + ], + "title": "Number of $loglevel per service", + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "links": [ + { + "targetBlank": true, + "title": "Show in Opensearch", + "url": "http{% endraw %}{{ 's' if kolla_enable_tls_internal | bool else '' }}://{{ kolla_internal_vip_address }}{% raw %}:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'${__from:date}',to:'${__to:date}'))&_a=(columns:!(_source),filters:!(),interval:auto,query:(language:lucene,query:'log_level:${loglevel:lucene} AND programname:(\"${__data.fields[\"programname.keyword\"]}\") AND Hostname:${host:lucene}'),sort:!())" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Count" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "gauge" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "programname.keyword" + }, + "properties": [ + { + "id": "displayName", + "value": "Program Name" + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 84 + }, + "id": 8, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "alias": "", + "bucketAggs": [ + { + "field": "programname.keyword", + "id": "2", + "settings": { + "min_doc_count": "1", + "order": "desc", + "orderBy": "_count", + "size": "20" + }, + "type": "terms" + } + ], + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "format": "table", + "metrics": [ + { + "id": "1", + "type": "count" + } + ], + "query": "log_level:$loglevel AND programname:$program_name AND Hostname:$host", + "queryType": "lucene", + "refId": "A", + "timeField": "@timestamp" + } + ], + "title": "Number of $loglevel per service", + "type": "table" + }, + { + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 94 + }, + "id": 100, + "links": [ + { + "targetBlank": true, + "title": "View in Opensearch", + "url": "http{% endraw %}{{ 's' if kolla_enable_tls_internal | bool else '' }}://{{ kolla_internal_vip_address }}{% raw %}:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'${__from:date}',to:'${__to:date}'))&_a=(columns:!(_source),filters:!(),interval:auto,query:(language:lucene,query:'log_level:${loglevel:lucene} AND programname:\"${program_name:lucene}\" AND Hostname:${host:lucene}'),sort:!())" + } + ], + "maxPerRow": 2, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "10.1.2", + "repeat": "program_name", + "repeatDirection": "v", + "targets": [ + { + "alias": "", + "bucketAggs": [ + { + "id": "2", + "settings": { + "min_doc_count": "0", + "order": "desc", + "orderBy": "_term", + "size": "10" + }, + "type": "terms" + } + ], + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "format": "logs", + "luceneQueryType": "Metric", + "metrics": [ + { + "id": "1", + "type": "logs" + } + ], + "query": "log_level:$loglevel AND programname:$program_name AND Hostname:$host", + "queryType": "lucene", + "refId": "A", + "timeField": "@timestamp" + } + ], + "title": "Logs - $loglevel - $program_name", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": { + "@timestamp": 0, + "Hostname": 2, + "Payload": 1, + "_id": 3, + "_index": 4, + "_source": 5, + "_type": 6, + "level": 10, + "log_level": 7, + "payload": 9, + "programname": 8 + }, + "renameByName": {} + } + } + ], + "type": "logs" } ], "refresh": false, @@ -2493,6 +2860,112 @@ "refresh": 2, "skipUrlSync": false, "type": "interval" + }, + { + "current": { + "selected": true, + "text": [ + "ERROR" + ], + "value": [ + "ERROR" + ] + }, + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "definition": "{\"find\": \"terms\", \"query\": \"Hostname: ${host:lucene}\", \"field\": \"log_level.keyword\", \"size\": 1000}", + "hide": 0, + "includeAll": true, + "label": "Log Level", + "multi": true, + "name": "loglevel", + "options": [], + "query": "{\"find\": \"terms\", \"query\": \"Hostname: ${host:lucene}\", \"field\": \"log_level.keyword\", \"size\": 1000}", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "${os_datasource}" + }, + "definition": "{\"find\": \"terms\", \"query\": \"log_level: $loglevel AND Hostname: $host\", \"field\": \"programname.keyword\", \"size\": 1000}", + "hide": 0, + "includeAll": true, + "label": "Program Name", + "multi": true, + "name": "program_name", + "options": [], + "query": "{\"find\": \"terms\", \"query\": \"log_level: $loglevel AND Hostname: $host\", \"field\": \"programname.keyword\", \"size\": 1000}", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(node_uname_info,nodename)", + "hide": 0, + "includeAll": true, + "label": "Host", + "multi": true, + "name": "host", + "options": [], + "query": { + "query": "label_values(node_uname_info,nodename)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "opensearch", + "value": "fdfos0ns7hce8f" + }, + "description": "Opensearch", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "os_datasource", + "options": [], + "query": "grafana-opensearch-datasource", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" } ] }, diff --git a/releasenotes/notes/logs-in-openstack-dashboard-6e345ff7f16c0658.yaml b/releasenotes/notes/logs-in-openstack-dashboard-6e345ff7f16c0658.yaml new file mode 100644 index 000000000..0176ac636 --- /dev/null +++ b/releasenotes/notes/logs-in-openstack-dashboard-6e345ff7f16c0658.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The Openstack Dashboard in Grafana now includes logs from Openstack + services.