diff --git a/charts/monitoring/Chart.yaml b/charts/monitoring/Chart.yaml index c6237f0..8814af2 100644 --- a/charts/monitoring/Chart.yaml +++ b/charts/monitoring/Chart.yaml @@ -8,4 +8,4 @@ dependencies: description: A Helm chart for Monitoring name: monitoring type: application -version: 0.1.23 +version: 0.1.24 diff --git a/charts/monitoring/templates/controlplane-applications-dashboard.yaml b/charts/monitoring/templates/controlplane-applications-dashboard.yaml new file mode 100644 index 0000000..6d7b14d --- /dev/null +++ b/charts/monitoring/templates/controlplane-applications-dashboard.yaml @@ -0,0 +1,375 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "monitoring.fullname" . }}-controlplane-applications + annotations: + meta.helm.sh/release-namespace: {{ .Release.Namespace }} + grafana_folder: "Capten" + labels: + grafana_dashboard: "1" +data: + capten.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 78, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 11, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "valueMode": "text" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT count(app_name) FROM cluster_app_config", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Count of Applications", + "type": "bargauge" + }, + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 11, + "y": 0 + }, + "id": 3, + "options": { + "displayLabels": [ + "percent" + ], + "legend": { + "displayMode": "list", + "placement": "right", + "showLegend": true, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT namespace, count(app_name) AS Apps FROM cluster_app_config\nGROUP BY namespace\n", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Counts of apps per namespace", + "type": "piechart" + }, + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "install_status" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "Installation failed": { + "color": "red", + "index": 1 + }, + "Installed": { + "color": "green", + "index": 0 + }, + "Upgraded": { + "color": "yellow", + "index": 2 + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 16, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Capten", + "uid": "Capten" + }, + "editorMode": "builder", + "format": "table", + "key": "Q-102e33bd-125e-4526-8a90-a4dc6b6b93d8-0", + "rawSql": "SELECT * FROM cluster_app_config ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "cluster_app_config" + } + ], + "title": "Cluster Applications", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "api_endpoint": true, + "default_app": true, + "description": true, + "icon": true, + "install_status": false, + "launch_ui_values": true, + "override_values": true, + "plugin_name": true, + "plugin_store_type": true, + "privileged_namespace": true, + "repo_url": true, + "template_values": true, + "ui_endpoint": true, + "ui_module_endpoint": true, + "version": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Controlplane Applications", + "uid": "b21dc765-36ff-4009-b99f-db8ecda80936", + "version": 6, + "weekStart": "" + } diff --git a/charts/monitoring/templates/postgres-datasource.yaml b/charts/monitoring/templates/postgres-datasource.yaml new file mode 100644 index 0000000..8151eef --- /dev/null +++ b/charts/monitoring/templates/postgres-datasource.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "monitoring.fullname" . }}-postgres + annotations: + meta.helm.sh/release-namespace: {{ .Release.Namespace }} + labels: + grafana_datasource: "1" +data: + datasource.yaml: |- + apiVersion: 1 + datasources: + - name: Capten + type: postgres + url: {{ .Values.datasources.postgreSQL.url }} + user: postgres + database: capten + secureJsonData: + password: "$POSTGRESQL_PASSWORD" + jsonData: + sslmode: 'disable' # disable/require/verify-ca/verify-full + + - name: Proact + type: postgres + url: {{ .Values.datasources.postgreSQL.url }} + user: postgres + database: scsctl + secureJsonData: + password: "$POSTGRESQL_PASSWORD" + jsonData: + sslmode: 'disable' # disable/require/verify-ca/verify-full + + - name: QualityTrace + type: postgres + url: {{ .Values.datasources.postgreSQL.url }} + database: qualitytrace + user: postgres + secureJsonData: + password: "$POSTGRESQL_PASSWORD" + jsonData: + sslmode: 'disable' # disable/require/verify-ca/verify-full \ No newline at end of file diff --git a/charts/monitoring/templates/proact-postgres-dashboard.yaml b/charts/monitoring/templates/proact-postgres-dashboard.yaml new file mode 100644 index 0000000..5ff8729 --- /dev/null +++ b/charts/monitoring/templates/proact-postgres-dashboard.yaml @@ -0,0 +1,688 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "monitoring.fullname" . }}-proact-postgres + annotations: + meta.helm.sh/release-namespace: {{ .Release.Namespace }} + grafana_folder: "Proact" + labels: + grafana_dashboard: "1" +data: + proactpostgres.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 77, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "schedule_status" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "paused": { + "color": "orange", + "index": 0 + }, + "running": { + "color": "green", + "index": 1 + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "editorMode": "builder", + "format": "table", + "rawSql": "SELECT * FROM scan_configs", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "scan_configs" + } + ], + "title": "Schedules", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "db_enabled": false, + "dgraph_db_host": true, + "dgraph_db_port": true, + "dgraph_enabled": true, + "docker_file_folder_path": true, + "docker_image_name": false, + "falco_enabled": true, + "falco_pod_name": true, + "falco_target_deployment_name": true, + "id": true, + "is_api": true, + "job_id": true, + "pyroscope_app_name": true, + "pyroscope_enabled": false, + "pyroscope_url": false, + "rebuild_image": true, + "renovate_enabled": true, + "renovate_repo_name": true, + "renovate_repo_token": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "editorMode": "code", + "format": "table", + "key": "Q-a1bffb55-b947-45d1-8c87-3fe4a0390c7a-0", + "rawQuery": true, + "rawSql": "SELECT * FROM schedules \nWHERE $__timeFilter(update_time) \n", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "schedules" + } + ], + "title": "Execution Details", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "end_date": true, + "start_date": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "fillOpacity": 80, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 4, + "options": { + "barRadius": 0, + "barWidth": 0.97, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "orientation": "auto", + "showValue": "never", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "editorMode": "code", + "format": "table", + "key": "Q-7675e932-ef14-4978-b9d0-8153aeb61bcd-0", + "rawQuery": true, + "rawSql": "SELECT * FROM executions \n", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "executions" + } + ], + "title": "Vulnerability Details", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "end_time": true, + "execution_id": true, + "schedule_id": false, + "start_time": true, + "status": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "barchart" + }, + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 6, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "editorMode": "builder", + "format": "table", + "rawSql": "SELECT * FROM scan_status", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "scan_status" + } + ], + "title": "Scan Details", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "batch_id": true, + "execution_id": false, + "id": true, + "job_id": true, + "rebuilded_image_name": true, + "run_type": true, + "scan_report": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 5, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "editorMode": "builder", + "format": "table", + "rawSql": "SELECT * FROM execution_jobs ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "execution_jobs" + } + ], + "title": "Jobs", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "id": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "12d25f91-a3c3-4f56-bf63-32538996aea0", + "value": "12d25f91-a3c3-4f56-bf63-32538996aea0" + }, + "datasource": { + "type": "Proact", + "uid": "Proact" + }, + "definition": "SELECT schedule_id FROM schedules ", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "schedule_id", + "options": [], + "query": "SELECT schedule_id FROM schedules ", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Proact-Dashboard", + "uid": "bc872b40-2b81-463c-8787-d0f9a59a7c43", + "version": 9, + "weekStart": "" + } diff --git a/charts/monitoring/templates/qualitytrace-dashboard.yaml b/charts/monitoring/templates/qualitytrace-dashboard.yaml new file mode 100644 index 0000000..af2a3bd --- /dev/null +++ b/charts/monitoring/templates/qualitytrace-dashboard.yaml @@ -0,0 +1,626 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "monitoring.fullname" . }}-qualitytrace + annotations: + meta.helm.sh/release-namespace: {{ .Release.Namespace }} + grafana_folder: "QualityTrace" + labels: + grafana_dashboard: "1" +data: + qualitytrace.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 75, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT count(*) FROM test_runs \nWHERE state IN ( 'FINISHED' )", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Count of Trigger Finished ", + "type": "gauge" + }, + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 5, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "editorMode": "code", + "format": "table", + "rawQuery": true, + "rawSql": "SELECT count(*) FROM test_runs \nWHERE state IN ( 'TRIGGER_FAILED' )", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Count Trigger Failed", + "type": "gauge" + }, + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "fail" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "created_at" + }, + "properties": [ + { + "id": "custom.width", + "value": 207 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trace_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 331 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "span_id" + }, + "properties": [ + { + "id": "custom.width", + "value": 284 + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 6, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "editorMode": "builder", + "format": "table", + "rawSql": "SELECT * FROM test_runs LIMIT 50 ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "test_runs" + } + ], + "title": "Count of assertion pass and fail", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "completed_at": true, + "created_at": false, + "id": true, + "last_error": true, + "linter": true, + "metadata": true, + "obtained_trace_at": true, + "outputs": true, + "required_gates_result": true, + "resolved_trigger": true, + "service_trigger_completed_at": true, + "service_triggered_at": true, + "skip_trace_collection": true, + "state": true, + "tenant_id": true, + "test_id": true, + "test_results": true, + "test_version": true, + "trace": true, + "trigger_results": true, + "variable_set": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "state" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "FINISHED": { + "color": "green", + "index": 0 + }, + "TRIGGER_FAILED": { + "color": "red", + "index": 1 + } + }, + "type": "value" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 3, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "QualityTrace", + "uid": "QualityTrace" + }, + "editorMode": "builder", + "format": "table", + "rawSql": "SELECT * FROM test_runs ", + "refId": "A", + "sql": { + "columns": [ + { + "parameters": [ + { + "name": "*", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "test_runs" + } + ], + "title": "QT Test Application API", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "completed_at": true, + "fail": true, + "id": true, + "last_error": true, + "linter": true, + "metadata": true, + "obtained_trace_at": true, + "outputs": true, + "pass": true, + "required_gates_result": true, + "resolved_trigger": false, + "service_trigger_completed_at": true, + "service_triggered_at": true, + "skip_trace_collection": true, + "tenant_id": true, + "test_id": true, + "test_results": true, + "test_version": true, + "trace": true, + "trigger_results": true, + "variable_set": true + }, + "indexByName": { + "completed_at": 7, + "created_at": 2, + "fail": 17, + "id": 0, + "last_error": 14, + "linter": 20, + "metadata": 15, + "obtained_trace_at": 6, + "outputs": 18, + "pass": 16, + "required_gates_result": 21, + "resolved_trigger": 23, + "service_trigger_completed_at": 5, + "service_triggered_at": 4, + "skip_trace_collection": 24, + "span_id": 10, + "state": 8, + "tenant_id": 22, + "test_id": 1, + "test_results": 12, + "test_version": 3, + "trace": 13, + "trace_id": 9, + "trigger_results": 11, + "variable_set": 19 + }, + "renameByName": {} + } + }, + { + "id": "extractFields", + "options": { + "source": "resolved_trigger" + } + }, + { + "id": "extractFields", + "options": { + "source": "httpRequest" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "headers": true, + "httpRequest": true, + "resolved_trigger": true + }, + "indexByName": { + "created_at": 0, + "headers": 9, + "httpRequest": 7, + "method": 8, + "resolved_trigger": 5, + "span_id": 3, + "state": 4, + "trace_id": 2, + "type": 6, + "url": 1 + }, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "QualityTrace Dashboard", + "uid": "adfcfa4d-238c-41a1-9e87-4dc5507a26de", + "version": 9, + "weekStart": "" + } diff --git a/charts/monitoring/values.yaml b/charts/monitoring/values.yaml index 7af3ac7..45519f1 100644 --- a/charts/monitoring/values.yaml +++ b/charts/monitoring/values.yaml @@ -108,6 +108,8 @@ datasources: url: http://prometheus-kube-prometheus-alertmanager:9093 jsonApi: url: http://proact-scheduler.capten.svc.cluster.local:5000/api/v1/schedule/ + postgreSQL: + url: http://postgresql.platform.svc.cluster.local:5432 nodeSelector: {}