diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a33be47220b..5ff15f04d3c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -218,6 +218,7 @@ /packages/elastic_connectors @elastic/search-extract-and-transform /packages/elastic_package_registry @elastic/ecosystem /packages/elastic_security @elastic/security-service-integrations +/packages/elastic_workflows @elastic/workflows-eng /packages/elasticsearch @elastic/stack-monitoring /packages/aws_elb_otel @elastic/obs-infraobs-integrations /packages/ece @elastic/stack-monitoring diff --git a/packages/elastic_workflows/_dev/scripts/build_dashboard.py b/packages/elastic_workflows/_dev/scripts/build_dashboard.py new file mode 100644 index 00000000000..fad1b85b63a --- /dev/null +++ b/packages/elastic_workflows/_dev/scripts/build_dashboard.py @@ -0,0 +1,566 @@ +import json +import uuid +import copy +from pathlib import Path + +_SHARED_DIR = Path(__file__).resolve().parent.parent / "shared" + +adhoc_wf = {"adhoc_wf": {"id": "adhoc_wf", "title": ".workflows-executions", "timeFieldName": "createdAt"}} +adhoc_logs = {"adhoc_logs": {"id": "adhoc_logs", "title": ".workflows-execution-data-stream-logs", "timeFieldName": "@timestamp"}} +wf_ref = [{"type": "index-pattern", "id": "adhoc_wf", "name": "indexpattern-datasource-layer-layer1"}] +logs_ref = [{"type": "index-pattern", "id": "adhoc_logs", "name": "indexpattern-datasource-layer-layer1"}] +bq = {"query": "NOT isTestRun: true", "language": "kuery"} + +STATUS_FAILED_KQL = 'status: "failed" OR status: "timed_out"' +STATUS_COMPLETED_KQL = 'status: "completed"' + + +def make_drilldown(label, url_template): + return { + "enhancements": { + "dynamicActions": { + "events": [ + { + "eventId": str(uuid.uuid4()), + "triggers": ["VALUE_CLICK_TRIGGER"], + "action": { + "factoryId": "URL_DRILLDOWN", + "name": label, + "config": { + "url": {"template": url_template}, + "openInNewTab": True, + "encodeUrl": True, + }, + }, + } + ] + } + } + } + + +def metric_panel(pid, x, y, w, h, title, columns, vis_extra=None): + layer = { + "columns": columns, + "columnOrder": list(columns.keys()), + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + } + vis = {"layerId": "layer1", "layerType": "data"} + if vis_extra: + vis.update(vis_extra) + return { + "type": "vis", + "id": pid, + "grid": {"x": x, "y": y, "w": w, "h": h}, + "config": { + "title": title, + "attributes": { + "title": title, + "visualizationType": "lnsMetric", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": layer}}}, + "visualization": vis, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, + } + + +panels = [] + +# === ROW 1: KPI STRIP === +panels.append( + metric_panel( + "total-executions", 0, 0, 12, 8, "Total Executions", + {"col1": {"operationType": "count", "sourceField": "___records___", "label": "Executions", "dataType": "number", "isBucketed": False}}, + {"metricAccessor": "col1"}, + ) +) + +panels.append( + metric_panel( + "success-rate", 12, 0, 12, 8, "Success Rate", + { + "total": {"operationType": "count", "sourceField": "___records___", "label": "Total", "dataType": "number", "isBucketed": False}, + "completed": { + "operationType": "count", "sourceField": "___records___", "label": "Completed", + "dataType": "number", "isBucketed": False, + "filter": {"query": STATUS_COMPLETED_KQL, "language": "kuery"}, + }, + "formula": { + "operationType": "formula", "label": "Success Rate", "dataType": "number", + "isBucketed": False, "references": ["formulaX0"], "customLabel": True, + "params": { + "formula": "count(kql='status: \"completed\"') / count()", + "format": {"id": "percent", "params": {"decimals": 1}}, + }, + }, + "formulaX0": { + "operationType": "math", "references": ["completed", "total"], + "label": "Part of formula", "dataType": "number", "isBucketed": False, "customLabel": True, + }, + "maxval": { + "operationType": "static_value", "label": "Static value: 1", + "dataType": "number", "isBucketed": False, "isStaticValue": True, + "scale": "ratio", "params": {"value": "1"}, "references": [], + }, + }, + { + "metricAccessor": "formula", + "maxAccessor": "maxval", + "showBar": True, + "subtitle": " ", + "palette": { + "type": "palette", "name": "status", + "params": { + "name": "status", "reverse": False, "rangeType": "percent", + "rangeMin": 0, "rangeMax": 100, "progression": "fixed", + "stops": [ + {"color": "#f66d64", "stop": 80}, + {"color": "#fcd279", "stop": 95}, + {"color": "#23be8f", "stop": 100}, + ], + "steps": 3, "colorStops": [], "continuity": "all", "maxSteps": 5, + }, + }, + }, + ) +) + +panels.append( + metric_panel( + "avg-duration", 24, 0, 12, 8, "Avg Duration", + {"col1": { + "operationType": "average", "sourceField": "duration", "label": "Avg Duration (ms)", + "dataType": "number", "isBucketed": False, + "params": {"format": {"id": "number", "params": {"decimals": 0, "suffix": " ms"}}}, + }}, + {"metricAccessor": "col1"}, + ) +) + +panels.append( + metric_panel( + "failure-count", 36, 0, 12, 8, "Failures", + {"col1": { + "operationType": "count", "sourceField": "___records___", "label": "Failures", + "dataType": "number", "isBucketed": False, + "filter": {"query": STATUS_FAILED_KQL, "language": "kuery"}, + }}, + {"metricAccessor": "col1", "color": "#BD271E"}, + ) +) + +# === ROW 2: EXECUTIONS OVER TIME + TRIGGER BREAKDOWN === +panels.append({ + "type": "vis", "id": "executions-over-time", + "grid": {"x": 0, "y": 8, "w": 32, "h": 14}, + "config": { + "title": "Executions Over Time", + "attributes": { + "title": "Executions Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "time": {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + "count": {"operationType": "count", "sourceField": "___records___", "label": "Executions", "dataType": "number", "isBucketed": False}, + "status": {"operationType": "terms", "sourceField": "status", "label": "Status", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": "count"}, "orderDirection": "desc"}}, + }, + "columnOrder": ["time", "status", "count"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "bar_stacked", "xAccessor": "time", "accessors": ["count"], "splitAccessor": "status"}], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide", + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +panels.append({ + "type": "vis", "id": "trigger-breakdown", + "grid": {"x": 32, "y": 8, "w": 16, "h": 14}, + "config": { + "title": "Trigger Breakdown", + "attributes": { + "title": "Trigger Breakdown", + "visualizationType": "lnsPie", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "trigger": {"operationType": "terms", "sourceField": "triggeredBy", "label": "Triggered By", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": "count"}, "orderDirection": "desc"}}, + "count": {"operationType": "count", "sourceField": "___records___", "label": "Count", "dataType": "number", "isBucketed": False}, + }, + "columnOrder": ["trigger", "count"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "shape": "donut", + "layers": [{"layerId": "layer1", "layerType": "data", "primaryGroups": ["trigger"], "metrics": ["count"]}], + "legend": {"isVisible": True, "position": "right"}, + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +# === ROW 3: FAILURE RATE TREND + DURATION DISTRIBUTION === +panels.append({ + "type": "vis", "id": "failure-rate-trend", + "grid": {"x": 0, "y": 22, "w": 24, "h": 14}, + "config": { + "title": "Failure Rate Trend", + "attributes": { + "title": "Failure Rate Trend", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "time": {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + "total": {"operationType": "count", "sourceField": "___records___", "label": "Total", "dataType": "number", "isBucketed": False}, + "failed": { + "operationType": "count", "sourceField": "___records___", "label": "Failed", + "dataType": "number", "isBucketed": False, + "filter": {"query": STATUS_FAILED_KQL, "language": "kuery"}, + }, + "formula": { + "operationType": "formula", "label": "Failure Rate", "dataType": "number", + "isBucketed": False, "references": ["formulaX0"], "customLabel": True, + "params": { + "formula": "count(kql='status: \"failed\" OR status: \"timed_out\"') / count()", + "format": {"id": "percent", "params": {"decimals": 1}}, + }, + }, + "formulaX0": { + "operationType": "math", "references": ["failed", "total"], + "label": "Part of formula", "dataType": "number", "isBucketed": False, "customLabel": True, + }, + }, + "columnOrder": ["time", "formula", "formulaX0", "total", "failed"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "area", "xAccessor": "time", "accessors": ["formula"], "yConfig": [{"forAccessor": "formula", "axisMode": "left", "color": "#BD271E"}]}], + "legend": {"isVisible": False}, + "preferredSeriesType": "area", + "valueLabels": "hide", + "yTitle": "Failure Rate", + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +panels.append({ + "type": "vis", "id": "duration-distribution", + "grid": {"x": 24, "y": 22, "w": 24, "h": 14}, + "config": { + "title": "Duration Distribution", + "attributes": { + "title": "Duration Distribution", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "fast": {"operationType": "count", "sourceField": "___records___", "label": "< 1s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration < 1000", "language": "kuery"}, "customLabel": True}, + "medium": {"operationType": "count", "sourceField": "___records___", "label": "1s - 5s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 1000 AND duration < 5000", "language": "kuery"}, "customLabel": True}, + "slow": {"operationType": "count", "sourceField": "___records___", "label": "5s - 30s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 5000 AND duration < 30000", "language": "kuery"}, "customLabel": True}, + "very_slow": {"operationType": "count", "sourceField": "___records___", "label": "> 30s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 30000", "language": "kuery"}, "customLabel": True}, + "time": {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + }, + "columnOrder": ["time", "fast", "medium", "slow", "very_slow"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layers": [{ + "layerId": "layer1", "layerType": "data", "seriesType": "bar_stacked", + "xAccessor": "time", "accessors": ["fast", "medium", "slow", "very_slow"], + "yConfig": [ + {"forAccessor": "fast", "color": "#23be8f"}, + {"forAccessor": "medium", "color": "#fcd279"}, + {"forAccessor": "slow", "color": "#f5a623"}, + {"forAccessor": "very_slow", "color": "#BD271E"}, + ], + }], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide", + "yTitle": "Executions", + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +# === ROW 4: DURATION OVER TIME + STATUS BREAKDOWN + SLOWEST WORKFLOWS === +panels.append({ + "type": "vis", "id": "duration-over-time", + "grid": {"x": 0, "y": 36, "w": 24, "h": 14}, + "config": { + "title": "Execution Duration Over Time", + "attributes": { + "title": "Execution Duration Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "time": {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + "avg_dur": {"operationType": "average", "sourceField": "duration", "label": "Avg (ms)", "dataType": "number", "isBucketed": False, "params": {"format": {"id": "number", "params": {"decimals": 0}}}}, + "p95_dur": {"operationType": "percentile", "sourceField": "duration", "label": "p95 (ms)", "dataType": "number", "isBucketed": False, "params": {"percentile": 95, "format": {"id": "number", "params": {"decimals": 0}}}}, + }, + "columnOrder": ["time", "avg_dur", "p95_dur"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "line", "xAccessor": "time", "accessors": ["avg_dur", "p95_dur"], "yConfig": [{"forAccessor": "avg_dur", "axisMode": "left", "color": "#0077CC"}, {"forAccessor": "p95_dur", "axisMode": "left", "color": "#f5a623"}]}], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "line", + "valueLabels": "hide", + "yTitle": "Duration (ms)", + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +panels.append({ + "type": "vis", "id": "status-breakdown", + "grid": {"x": 24, "y": 36, "w": 12, "h": 14}, + "config": { + "title": "Status Breakdown", + "attributes": { + "title": "Status Breakdown", + "visualizationType": "lnsPie", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "status": {"operationType": "terms", "sourceField": "status", "label": "Status", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": "count"}, "orderDirection": "desc"}}, + "count": {"operationType": "count", "sourceField": "___records___", "label": "Count", "dataType": "number", "isBucketed": False}, + }, + "columnOrder": ["status", "count"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "shape": "donut", + "layers": [{"layerId": "layer1", "layerType": "data", "primaryGroups": ["status"], "metrics": ["count"]}], + "legend": {"isVisible": True, "position": "right"}, + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +panels.append({ + "type": "vis", "id": "slowest-workflows", + "grid": {"x": 36, "y": 36, "w": 12, "h": 14}, + "config": { + "title": "Slowest Workflows", + "attributes": { + "title": "Slowest Workflows (p95)", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "workflow": {"operationType": "terms", "sourceField": "workflowId", "label": "Workflow", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": "p95dur"}, "orderDirection": "desc"}}, + "p95dur": {"operationType": "percentile", "sourceField": "duration", "label": "p95 (ms)", "dataType": "number", "isBucketed": False, "params": {"percentile": 95, "format": {"id": "number", "params": {"decimals": 0}}}}, + "execcount": {"operationType": "count", "sourceField": "___records___", "label": "Runs", "dataType": "number", "isBucketed": False}, + }, + "columnOrder": ["workflow", "p95dur", "execcount"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + {"columnId": "workflow"}, + {"columnId": "p95dur", "colorMode": "text", "palette": { + "type": "palette", "name": "status", + "params": {"name": "status", "reverse": True, "rangeType": "number", "rangeMin": 0, "rangeMax": None, "progression": "fixed", "stops": [{"color": "#23be8f", "stop": 1000}, {"color": "#fcd279", "stop": 5000}, {"color": "#f66d64", "stop": 30000}], "steps": 3, "continuity": "above"}, + }}, + {"columnId": "execcount"}, + ], + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, + }, +}) + +# === ROW 5: TABLES WITH DRILLDOWNS === +top_wf_drilldown = make_drilldown("View Workflow", "/app/workflows/{{event.value}}") +top_cfg = { + "title": "Top Workflows", + "attributes": { + "title": "Top Workflows", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "workflow": {"operationType": "terms", "sourceField": "workflowId", "label": "Workflow", "dataType": "string", "isBucketed": True, "params": {"size": 20, "orderBy": {"type": "column", "columnId": "executions"}, "orderDirection": "desc"}}, + "executions": {"operationType": "count", "sourceField": "___records___", "label": "Executions", "dataType": "number", "isBucketed": False}, + "avgduration": {"operationType": "average", "sourceField": "duration", "label": "Avg Duration (ms)", "dataType": "number", "isBucketed": False, "params": {"format": {"id": "number", "params": {"decimals": 0}}}}, + "failures": { + "operationType": "count", "sourceField": "___records___", "label": "Failures", + "dataType": "number", "isBucketed": False, + "filter": {"query": STATUS_FAILED_KQL, "language": "kuery"}, + }, + }, + "columnOrder": ["workflow", "executions", "avgduration", "failures"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + {"columnId": "workflow"}, + {"columnId": "executions"}, + {"columnId": "avgduration"}, + {"columnId": "failures", "colorMode": "text", "palette": { + "type": "palette", "name": "status", + "params": {"name": "status", "reverse": True, "rangeType": "number", "rangeMin": 0, "rangeMax": None, "progression": "fixed", "stops": [{"color": "#23be8f", "stop": 1}, {"color": "#fcd279", "stop": 5}, {"color": "#f66d64", "stop": 20}], "steps": 3, "continuity": "above"}, + }}, + ], + }, + "query": bq, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, +} +top_cfg.update(top_wf_drilldown) +panels.append({"type": "vis", "id": "top-workflows", "grid": {"x": 0, "y": 50, "w": 24, "h": 16}, "config": top_cfg}) + +fail_drilldown = make_drilldown("View Workflow Executions", "/app/workflows/{{event.value}}?tab=executions") +fail_cfg = { + "title": "Recent Failures", + "attributes": { + "title": "Recent Failures", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "workflow": {"operationType": "terms", "sourceField": "workflowId", "label": "Workflow", "dataType": "string", "isBucketed": True, "params": {"size": 20, "orderBy": {"type": "column", "columnId": "failures"}, "orderDirection": "desc"}}, + "failures": {"operationType": "count", "sourceField": "___records___", "label": "Failures", "dataType": "number", "isBucketed": False}, + "laststatus": {"operationType": "last_value", "sourceField": "status", "label": "Last Status", "dataType": "string", "isBucketed": False, "params": {"sortField": "createdAt"}}, + }, + "columnOrder": ["workflow", "failures", "laststatus"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf", + }}}}, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + {"columnId": "workflow"}, + {"columnId": "failures"}, + {"columnId": "laststatus"}, + ], + }, + "query": {"query": "(status: \"failed\" OR status: \"timed_out\") AND NOT isTestRun: true", "language": "kuery"}, + "filters": [], + "adHocDataViews": adhoc_wf, + }, + "references": wf_ref, + }, +} +fail_cfg.update(fail_drilldown) +panels.append({"type": "vis", "id": "recent-failures", "grid": {"x": 24, "y": 50, "w": 24, "h": 16}, "config": fail_cfg}) + +# === ROW 6: LOGS === +panels.append({ + "type": "vis", "id": "error-logs-over-time", + "grid": {"x": 0, "y": 66, "w": 48, "h": 12}, + "config": { + "title": "Error & Warning Logs Over Time", + "attributes": { + "title": "Error & Warning Logs Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": { + "time": {"operationType": "date_histogram", "sourceField": "@timestamp", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + "count": {"operationType": "count", "sourceField": "___records___", "label": "Log entries", "dataType": "number", "isBucketed": False}, + "level": {"operationType": "terms", "sourceField": "level", "label": "Level", "dataType": "string", "isBucketed": True, "params": {"size": 5, "orderBy": {"type": "column", "columnId": "count"}, "orderDirection": "desc"}}, + }, + "columnOrder": ["time", "level", "count"], + "incompleteColumns": {}, + "indexPatternId": "adhoc_logs", + }}}}, + "visualization": { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "bar_stacked", "xAccessor": "time", "accessors": ["count"], "splitAccessor": "level"}], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide", + }, + "query": {"query": "level: \"error\" OR level: \"warn\"", "language": "kuery"}, + "filters": [], + "adHocDataViews": adhoc_logs, + }, + "references": logs_ref, + }, + }, +}) + +dashboard = { + "title": "[Elastic Workflows] Execution Overview", + "description": "Comprehensive monitoring for Elastic Workflows. Click workflow IDs in tables to navigate to the workflow page.", + "time_range": {"from": "now-7d", "to": "now"}, + "refresh_interval": {"pause": False, "value": 30000}, + "panels": panels, +} + +with open(_SHARED_DIR / "create_final_dashboard.json", "w") as f: + json.dump(dashboard, f, indent=2) + +print("Total panels:", len(panels)) +for p in panels: + t = p.get("config", {}).get("attributes", {}).get("title", p.get("config", {}).get("title", "?")) + g = p["grid"] + has_dd = "enhancements" in p.get("config", {}) + dd = " [DRILLDOWN]" if has_dd else "" + print(" y:%2d w:%2d - %s%s" % (g["y"], g["w"], t, dd)) diff --git a/packages/elastic_workflows/_dev/scripts/build_so.py b/packages/elastic_workflows/_dev/scripts/build_so.py new file mode 100644 index 00000000000..2dc41a810d5 --- /dev/null +++ b/packages/elastic_workflows/_dev/scripts/build_so.py @@ -0,0 +1,683 @@ +"""Build the corrected dashboard saved object JSON for the integration package. + +All Lens column IDs use UUIDs to match the format Lens expects internally. +""" +import json +import uuid +from pathlib import Path + +_PKG_ROOT = Path(__file__).resolve().parent.parent.parent +# Saved object id must match the dashboard filename (see elastic-package lint). +DASHBOARD_OBJECT_ID = "elastic_workflows-8de4b190-2f1a-4c3b-b7a9-31b2c8d4e5f6" +_DASHBOARD_JSON = _PKG_ROOT / f"kibana/dashboard/{DASHBOARD_OBJECT_ID}.json" + +adhoc_wf = {"adhoc_wf": {"id": "adhoc_wf", "title": ".workflows-executions", "timeFieldName": "createdAt"}} +wf_ref_inner = [{"type": "index-pattern", "id": "adhoc_wf", "name": "indexpattern-datasource-layer-layer1"}] +bq = {"query": "NOT isTestRun: true", "language": "kuery"} +bq_all = {"query": "", "language": "kuery"} +STATUS_FAILED_KQL = 'status: "failed" OR status: "timed_out"' +STATUS_COMPLETED_KQL = 'status: "completed"' +KQL_PROD_ONLY = "NOT isTestRun: true" +KQL_TEST_ONLY = "isTestRun: true" +KQL_COMPLETED_PROD = 'status: "completed" AND NOT isTestRun: true' +KQL_FAILURES_PROD = f"({STATUS_FAILED_KQL}) AND NOT isTestRun: true" + + +def uid(): + return str(uuid.uuid4()) + + +def make_drilldown_config(label, url_template): + return { + "enhancements": { + "dynamicActions": { + "events": [ + { + "eventId": uid(), + "triggers": ["VALUE_CLICK_TRIGGER"], + "action": { + "factoryId": "URL_DRILLDOWN", + "name": label, + "config": { + "url": {"template": url_template}, + "openInNewTab": True, + "encodeUrl": True, + }, + }, + } + ] + } + } + } + + +def panel(pid, panel_type, x, y, w, h, ec, refs_inner): + p = { + "type": panel_type, + "embeddableConfig": ec, + "panelIndex": pid, + "gridData": {"x": x, "y": y, "w": w, "h": h, "i": pid}, + } + return p, [{"id": r["id"], "name": pid + ":" + r["name"], "type": r["type"]} for r in refs_inner] + + +def lens_ec(title, vis_type, columns, vis_config, query=None, adhoc=None, refs=None, extra_ec=None): + if query is None: + query = bq + if adhoc is None: + adhoc = adhoc_wf + if refs is None: + refs = wf_ref_inner + ec = { + "title": title, + "attributes": { + "title": title, + "visualizationType": vis_type, + "state": { + "datasourceStates": {"formBased": {"layers": {"layer1": { + "columns": columns, + "columnOrder": list(columns.keys()), + "incompleteColumns": {}, + "indexPatternId": list(adhoc.keys())[0], + }}}}, + "visualization": vis_config, + "query": query, + "filters": [], + "adHocDataViews": adhoc, + }, + "references": refs, + }, + } + if extra_ec: + ec.update(extra_ec) + return ec + + +panels_list = [] +all_refs = [] + + +def add(pid, ptype, x, y, w, h, ec, refs=None): + if refs is None: + refs = wf_ref_inner + p, r = panel(pid, ptype, x, y, w, h, ec, refs) + panels_list.append(p) + all_refs.extend(r) + + +# ============================================================ +# ROW 1 (y:0) — KPI STRIP +# ============================================================ +c1 = uid() +add("total-executions", "vis", 0, 0, 12, 8, lens_ec( + "Total Executions", "lnsMetric", + {c1: {"operationType": "count", "sourceField": "___records___", "label": "Executions", "dataType": "number", "isBucketed": False}}, + {"layerId": "layer1", "layerType": "data", "metricAccessor": c1}, +)) + +# Success Rate — math(divide) with real tinymathAst (formula+math without AST renders empty) +c_completed = uid() +c_total = uid() +c_ratio = uid() +c_maxval = uid() +add("success-rate", "vis", 12, 0, 12, 8, lens_ec( + "Success Rate", "lnsMetric", + { + c_completed: { + "operationType": "count", + "sourceField": "___records___", + "label": "Completed", + "dataType": "number", + "isBucketed": False, + "filter": {"query": STATUS_COMPLETED_KQL, "language": "kuery"}, + }, + c_total: {"operationType": "count", "sourceField": "___records___", "label": "Total", "dataType": "number", "isBucketed": False}, + c_ratio: { + "operationType": "math", + "label": "Success Rate", + "dataType": "number", + "isBucketed": False, + "references": [c_completed, c_total], + "customLabel": True, + "params": { + "tinymathAst": { + "type": "function", + "name": "divide", + "args": [c_completed, c_total], + }, + "format": {"id": "percent", "params": {"decimals": 1}}, + }, + }, + c_maxval: { + "operationType": "static_value", + "label": "Static value: 1", + "dataType": "number", + "isBucketed": False, + "isStaticValue": True, + "scale": "ratio", + "params": {"value": "1"}, + "references": [], + }, + }, + { + "layerId": "layer1", + "layerType": "data", + "metricAccessor": c_ratio, + "maxAccessor": c_maxval, + "showBar": True, + "subtitle": " ", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": False, + "rangeType": "percent", + "rangeMin": 0, + "rangeMax": 100, + "progression": "fixed", + "stops": [ + {"color": "#f66d64", "stop": 80}, + {"color": "#fcd279", "stop": 95}, + {"color": "#23be8f", "stop": 100}, + ], + "steps": 3, + "colorStops": [], + "continuity": "all", + "maxSteps": 5, + }, + }, + }, +)) + +c1 = uid() +add("avg-duration", "vis", 24, 0, 12, 8, lens_ec( + "Avg Duration", "lnsMetric", + {c1: { + "operationType": "average", "sourceField": "duration", "label": "Avg Duration (ms)", + "dataType": "number", "isBucketed": False, + "params": {"format": {"id": "number", "params": {"decimals": 0, "suffix": " ms"}}}, + }}, + {"layerId": "layer1", "layerType": "data", "metricAccessor": c1}, +)) + +c1 = uid() +add("failure-count", "vis", 36, 0, 12, 8, lens_ec( + "Failures", "lnsMetric", + {c1: { + "operationType": "count", "sourceField": "___records___", "label": "Failures", + "dataType": "number", "isBucketed": False, + "filter": {"query": STATUS_FAILED_KQL, "language": "kuery"}, + }}, + {"layerId": "layer1", "layerType": "data", "metricAccessor": c1, "color": "#BD271E"}, +)) + +# ============================================================ +# ROW 2 (y:8) — EXECUTIONS OVER TIME + TRIGGER BREAKDOWN +# ============================================================ +# Stacked bars: time on X, count on Y, one stack segment per workflow (top N by volume) +c_time, c_wf, c_count = uid(), uid(), uid() +add("executions-over-time", "vis", 0, 8, 32, 14, lens_ec( + "Executions Over Time", "lnsXY", + { + c_time: {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + c_wf: { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": True, + "params": {"size": 15, "orderBy": {"type": "column", "columnId": c_count}, "orderDirection": "desc"}, + }, + c_count: {"operationType": "count", "sourceField": "___records___", "label": "Executions", "dataType": "number", "isBucketed": False}, + }, + { + "layers": [{ + "layerId": "layer1", + "layerType": "data", + "seriesType": "bar_stacked", + "xAccessor": c_time, + "accessors": [c_count], + "splitAccessors": [c_wf], + }], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide", + "yTitle": "Count", + }, +)) + +c_trigger, c_count = uid(), uid() +add("trigger-breakdown", "vis", 32, 8, 16, 14, lens_ec( + "Trigger Breakdown", "lnsPie", + { + c_trigger: {"operationType": "terms", "sourceField": "triggeredBy", "label": "Triggered By", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": c_count}, "orderDirection": "desc"}}, + c_count: {"operationType": "count", "sourceField": "___records___", "label": "Count", "dataType": "number", "isBucketed": False}, + }, + { + "shape": "donut", + "layers": [{"layerId": "layer1", "layerType": "data", "primaryGroups": [c_trigger], "metrics": [c_count]}], + "legend": {"isVisible": True, "position": "right"}, + }, +)) + +# ============================================================ +# ROW 3 (y:22) — FAILURE RATE TREND (per Workflow) + DURATION DISTRIBUTION +# Use math(divide) + tinymathAst (formula+math without AST yields empty charts) +# ============================================================ +c_time, c_wf, c_total, c_failed, c_fr = uid(), uid(), uid(), uid(), uid() +add("failure-rate-trend", "vis", 0, 22, 24, 14, lens_ec( + "Failure Rate Trend (per Workflow)", "lnsXY", + { + c_time: {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + c_wf: {"operationType": "terms", "sourceField": "workflowId", "label": "Workflow", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": c_total}, "orderDirection": "desc"}}, + c_total: {"operationType": "count", "sourceField": "___records___", "label": "Total", "dataType": "number", "isBucketed": False, "customLabel": True}, + c_failed: { + "operationType": "count", + "sourceField": "___records___", + "label": "Failed", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": STATUS_FAILED_KQL, "language": "kuery"}, + }, + c_fr: { + "operationType": "math", + "label": "Failure rate", + "dataType": "number", + "isBucketed": False, + "references": [c_failed, c_total], + "customLabel": True, + "params": { + "tinymathAst": {"type": "function", "name": "divide", "args": [c_failed, c_total]}, + "format": {"id": "percent", "params": {"decimals": 1}}, + }, + }, + }, + { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "area", "xAccessor": c_time, "accessors": [c_fr], "splitAccessors": [c_wf], "yConfig": [{"forAccessor": c_fr, "axisMode": "left"}]}], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "area", "valueLabels": "hide", "yTitle": "Failure Rate", + }, +)) + +c_time, c_fast, c_medium, c_slow, c_vslow = uid(), uid(), uid(), uid(), uid() +add("duration-distribution", "vis", 24, 22, 24, 14, lens_ec( + "Duration Distribution", "lnsXY", + { + c_time: {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + c_fast: {"operationType": "count", "sourceField": "___records___", "label": "< 1s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration < 1000", "language": "kuery"}, "customLabel": True}, + c_medium: {"operationType": "count", "sourceField": "___records___", "label": "1s - 5s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 1000 AND duration < 5000", "language": "kuery"}, "customLabel": True}, + c_slow: {"operationType": "count", "sourceField": "___records___", "label": "5s - 30s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 5000 AND duration < 30000", "language": "kuery"}, "customLabel": True}, + c_vslow: {"operationType": "count", "sourceField": "___records___", "label": "> 30s", "dataType": "number", "isBucketed": False, "filter": {"query": "duration >= 30000", "language": "kuery"}, "customLabel": True}, + }, + { + "layers": [{ + "layerId": "layer1", "layerType": "data", "seriesType": "bar_stacked", + "xAccessor": c_time, "accessors": [c_fast, c_medium, c_slow, c_vslow], + "yConfig": [ + {"forAccessor": c_fast, "color": "#23be8f"}, + {"forAccessor": c_medium, "color": "#fcd279"}, + {"forAccessor": c_slow, "color": "#f5a623"}, + {"forAccessor": c_vslow, "color": "#BD271E"}, + ], + }], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "bar_stacked", "valueLabels": "hide", "yTitle": "Executions", + }, +)) + +# ============================================================ +# ROW 4 (y:36) — DURATION OVER TIME (per Workflow) + STATUS + SLOWEST +# ============================================================ +c_time, c_wf, c_avg = uid(), uid(), uid() +add("duration-over-time", "vis", 0, 36, 24, 14, lens_ec( + "Avg Duration Over Time (per Workflow)", "lnsXY", + { + c_time: {"operationType": "date_histogram", "sourceField": "createdAt", "label": "Time", "dataType": "date", "isBucketed": True, "params": {"interval": "auto"}}, + c_wf: {"operationType": "terms", "sourceField": "workflowId", "label": "Workflow", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": c_avg}, "orderDirection": "desc"}}, + c_avg: {"operationType": "average", "sourceField": "duration", "label": "Avg (ms)", "dataType": "number", "isBucketed": False, "params": {"format": {"id": "number", "params": {"decimals": 0}}}}, + }, + { + "layers": [{"layerId": "layer1", "layerType": "data", "seriesType": "line", "xAccessor": c_time, "accessors": [c_avg], "splitAccessors": [c_wf]}], + "legend": {"isVisible": True, "position": "right"}, + "preferredSeriesType": "line", "valueLabels": "hide", "yTitle": "Avg Duration (ms)", + }, +)) + +c_status, c_count = uid(), uid() +add("status-breakdown", "vis", 24, 36, 12, 14, lens_ec( + "Status Breakdown", "lnsPie", + { + c_status: {"operationType": "terms", "sourceField": "status", "label": "Status", "dataType": "string", "isBucketed": True, "params": {"size": 10, "orderBy": {"type": "column", "columnId": c_count}, "orderDirection": "desc"}}, + c_count: {"operationType": "count", "sourceField": "___records___", "label": "Count", "dataType": "number", "isBucketed": False}, + }, + { + "shape": "donut", + "layers": [{"layerId": "layer1", "layerType": "data", "primaryGroups": [c_status], "metrics": [c_count]}], + "legend": {"isVisible": True, "position": "right"}, + }, +)) + +c_wf, c_p95, c_runs = uid(), uid(), uid() +add("slowest-workflows", "vis", 36, 36, 12, 14, lens_ec( + "Slowest Workflows (p95)", "lnsDatatable", + { + c_wf: { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": True, + "customLabel": True, + "params": {"size": 10, "orderBy": {"type": "column", "columnId": c_p95}, "orderDirection": "desc"}, + }, + c_p95: { + "operationType": "percentile", + "sourceField": "duration", + "label": "p95 (ms)", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "params": {"percentile": 95, "format": {"id": "number", "params": {"decimals": 0}}}, + }, + c_runs: { + "operationType": "count", + "sourceField": "___records___", + "label": "Runs", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + }, + }, + { + "layerId": "layer1", "layerType": "data", + "columns": [ + {"columnId": c_wf}, + {"columnId": c_p95, "colorMode": "text", "palette": { + "type": "palette", "name": "status", + "params": {"name": "status", "reverse": True, "rangeType": "number", "rangeMin": 0, "rangeMax": None, "progression": "fixed", "stops": [{"color": "#23be8f", "stop": 1000}, {"color": "#fcd279", "stop": 5000}, {"color": "#f66d64", "stop": 30000}], "steps": 3, "continuity": "above"}, + }}, + {"columnId": c_runs}, + ], + }, +)) + +# ============================================================ +# ROW 5 (y:50) — RECENT FAILURES (full width; Top Workflows merged into Per-Workflow Summary) +# ============================================================ +c_wf, c_fail, c_last = uid(), uid(), uid() +add("recent-failures", "vis", 0, 50, 48, 16, lens_ec( + "Recent Failures", "lnsDatatable", + { + c_wf: { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": True, + "customLabel": True, + "params": {"size": 20, "orderBy": {"type": "column", "columnId": c_fail}, "orderDirection": "desc"}, + }, + c_fail: { + "operationType": "count", + "sourceField": "___records___", + "label": "Failures", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + }, + c_last: { + "operationType": "last_value", + "sourceField": "status", + "label": "Last Status", + "dataType": "string", + "isBucketed": False, + "customLabel": True, + "params": {"sortField": "createdAt"}, + }, + }, + { + "layerId": "layer1", "layerType": "data", + "columns": [ + {"columnId": c_wf}, + {"columnId": c_fail}, + {"columnId": c_last}, + ], + }, + query={"query": "(status: \"failed\" OR status: \"timed_out\") AND NOT isTestRun: true", "language": "kuery"}, + extra_ec=make_drilldown_config("View Workflow Executions", "/app/workflows/{{event.value}}?tab=executions"), +)) + +# ============================================================ +# ROW 6 (y:66) — PER-WORKFLOW SUMMARY (executions, failures, success %, test runs, durations) +# Former "Top Workflows" columns merged here. Layer query empty for test-run counts; per-column KQL filters. +# ============================================================ +c_wf = uid() +c_exec = uid() +c_failures = uid() +c_completed = uid() +c_success = uid() +c_test = uid() +c_avg = uid() +c_p95 = uid() +add( + "per-workflow-summary", + "vis", + 0, + 66, + 48, + 20, + lens_ec( + "Per-Workflow Summary", + "lnsDatatable", + { + c_wf: { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": True, + "customLabel": True, + "params": { + "size": 25, + "orderBy": {"type": "column", "columnId": c_exec}, + "orderDirection": "desc", + }, + }, + c_exec: { + "operationType": "count", + "sourceField": "___records___", + "label": "Executions", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_PROD_ONLY, "language": "kuery"}, + }, + c_failures: { + "operationType": "count", + "sourceField": "___records___", + "label": "Failures", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_FAILURES_PROD, "language": "kuery"}, + }, + c_completed: { + "operationType": "count", + "sourceField": "___records___", + "label": "Completed", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_COMPLETED_PROD, "language": "kuery"}, + }, + c_success: { + "operationType": "math", + "label": "Success %", + "dataType": "number", + "isBucketed": False, + "references": [c_completed, c_exec], + "customLabel": True, + "params": { + "tinymathAst": {"type": "function", "name": "divide", "args": [c_completed, c_exec]}, + "format": {"id": "percent", "params": {"decimals": 1}}, + }, + }, + c_test: { + "operationType": "count", + "sourceField": "___records___", + "label": "Test runs", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_TEST_ONLY, "language": "kuery"}, + }, + c_avg: { + "operationType": "average", + "sourceField": "duration", + "label": "Avg Duration (ms)", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_PROD_ONLY, "language": "kuery"}, + "params": {"format": {"id": "number", "params": {"decimals": 0}}}, + }, + c_p95: { + "operationType": "percentile", + "sourceField": "duration", + "label": "p95 (ms)", + "dataType": "number", + "isBucketed": False, + "customLabel": True, + "filter": {"query": KQL_PROD_ONLY, "language": "kuery"}, + "params": {"percentile": 95, "format": {"id": "number", "params": {"decimals": 0}}}, + }, + }, + { + "layerId": "layer1", + "layerType": "data", + "columns": [ + {"columnId": c_wf}, + {"columnId": c_exec}, + { + "columnId": c_failures, + "colorMode": "text", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": True, + "rangeType": "number", + "rangeMin": 0, + "rangeMax": None, + "progression": "fixed", + "stops": [ + {"color": "#23be8f", "stop": 1}, + {"color": "#fcd279", "stop": 5}, + {"color": "#f66d64", "stop": 20}, + ], + "steps": 3, + "continuity": "above", + }, + }, + }, + { + "columnId": c_success, + "colorMode": "text", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": False, + "rangeType": "percent", + "rangeMin": 0, + "rangeMax": 100, + "progression": "fixed", + "stops": [ + {"color": "#f66d64", "stop": 80}, + {"color": "#fcd279", "stop": 95}, + {"color": "#23be8f", "stop": 100}, + ], + "steps": 3, + "continuity": "above", + }, + }, + }, + {"columnId": c_test}, + {"columnId": c_avg}, + { + "columnId": c_p95, + "colorMode": "text", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": True, + "rangeType": "number", + "rangeMin": 0, + "rangeMax": None, + "progression": "fixed", + "stops": [ + {"color": "#23be8f", "stop": 1000}, + {"color": "#fcd279", "stop": 5000}, + {"color": "#f66d64", "stop": 30000}, + ], + "steps": 3, + "continuity": "above", + }, + }, + }, + ], + }, + query=bq_all, + extra_ec=make_drilldown_config("Open workflow", "/app/workflows/{{event.value}}"), + ), +) + +# ============================================================ +# BUILD SAVED OBJECT +# ============================================================ +so = { + "attributes": { + "description": "Comprehensive monitoring for Elastic Workflows. Per-workflow executions, failures, success rate, test runs, and durations; plus failure trends and performance analysis. Click workflow IDs in tables to open the workflow in Workflows.", + "kibanaSavedObjectMeta": {"searchSourceJSON": "{}"}, + "optionsJSON": json.dumps({ + "hidePanelTitles": False, + "hidePanelBorders": False, + "useMargins": True, + "autoApplyFilters": True, + "syncColors": False, + "syncCursor": True, + "syncTooltips": False, + }), + "panelsJSON": json.dumps(panels_list), + "pinned_panels": {"panels": {}}, + "refreshInterval": {"pause": False, "value": 30000}, + "timeFrom": "now-7d", + "timeRestore": True, + "timeTo": "now", + "title": "[Elastic Workflows] Execution Overview", + }, + "id": DASHBOARD_OBJECT_ID, + "references": all_refs, + "type": "dashboard", + "typeMigrationVersion": "10.3.0", +} + +output = _DASHBOARD_JSON +with open(output, "w") as f: + json.dump(so, f, indent=2) + +print("Wrote", output) +print("Panels:", len(panels_list)) +print("References:", len(all_refs)) +for p in panels_list: + t = p["embeddableConfig"].get("title", "?") + g = p["gridData"] + has_dd = "enhancements" in p["embeddableConfig"] + dd = " [DRILLDOWN]" if has_dd else "" + print(" y:%2d w:%2d %s - %s%s" % (g["y"], g["w"], p["panelIndex"], t, dd)) diff --git a/packages/elastic_workflows/_dev/shared/create_final_dashboard.json b/packages/elastic_workflows/_dev/shared/create_final_dashboard.json new file mode 100644 index 00000000000..b3e31740201 --- /dev/null +++ b/packages/elastic_workflows/_dev/shared/create_final_dashboard.json @@ -0,0 +1,1644 @@ +{ + "title": "[Elastic Workflows] Execution Overview", + "description": "Comprehensive monitoring for Elastic Workflows. Click workflow IDs in tables to navigate to the workflow page.", + "time_range": { + "from": "now-7d", + "to": "now" + }, + "refresh_interval": { + "pause": false, + "value": 30000 + }, + "panels": [ + { + "type": "vis", + "id": "total-executions", + "grid": { + "x": 0, + "y": 0, + "w": 12, + "h": 8 + }, + "config": { + "title": "Total Executions", + "attributes": { + "title": "Total Executions", + "visualizationType": "lnsMetric", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "col1": { + "operationType": "count", + "sourceField": "___records___", + "label": "Executions", + "dataType": "number", + "isBucketed": false + } + }, + "columnOrder": [ + "col1" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "metricAccessor": "col1" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "success-rate", + "grid": { + "x": 12, + "y": 0, + "w": 12, + "h": 8 + }, + "config": { + "title": "Success Rate", + "attributes": { + "title": "Success Rate", + "visualizationType": "lnsMetric", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "total": { + "operationType": "count", + "sourceField": "___records___", + "label": "Total", + "dataType": "number", + "isBucketed": false + }, + "completed": { + "operationType": "count", + "sourceField": "___records___", + "label": "Completed", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "status: \"completed\"", + "language": "kuery" + } + }, + "formula": { + "operationType": "formula", + "label": "Success Rate", + "dataType": "number", + "isBucketed": false, + "references": [ + "formulaX0" + ], + "customLabel": true, + "params": { + "formula": "count(kql='status: \"completed\"') / count()", + "format": { + "id": "percent", + "params": { + "decimals": 1 + } + } + } + }, + "formulaX0": { + "operationType": "math", + "references": [ + "completed", + "total" + ], + "label": "Part of formula", + "dataType": "number", + "isBucketed": false, + "customLabel": true + }, + "maxval": { + "operationType": "static_value", + "label": "Static value: 1", + "dataType": "number", + "isBucketed": false, + "isStaticValue": true, + "scale": "ratio", + "params": { + "value": "1" + }, + "references": [] + } + }, + "columnOrder": [ + "total", + "completed", + "formula", + "formulaX0", + "maxval" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "metricAccessor": "formula", + "maxAccessor": "maxval", + "showBar": true, + "subtitle": " ", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": false, + "rangeType": "percent", + "rangeMin": 0, + "rangeMax": 100, + "progression": "fixed", + "stops": [ + { + "color": "#f66d64", + "stop": 80 + }, + { + "color": "#fcd279", + "stop": 95 + }, + { + "color": "#23be8f", + "stop": 100 + } + ], + "steps": 3, + "colorStops": [], + "continuity": "all", + "maxSteps": 5 + } + } + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "avg-duration", + "grid": { + "x": 24, + "y": 0, + "w": 12, + "h": 8 + }, + "config": { + "title": "Avg Duration", + "attributes": { + "title": "Avg Duration", + "visualizationType": "lnsMetric", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "col1": { + "operationType": "average", + "sourceField": "duration", + "label": "Avg Duration (ms)", + "dataType": "number", + "isBucketed": false, + "params": { + "format": { + "id": "number", + "params": { + "decimals": 0, + "suffix": " ms" + } + } + } + } + }, + "columnOrder": [ + "col1" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "metricAccessor": "col1" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "failure-count", + "grid": { + "x": 36, + "y": 0, + "w": 12, + "h": 8 + }, + "config": { + "title": "Failures", + "attributes": { + "title": "Failures", + "visualizationType": "lnsMetric", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "col1": { + "operationType": "count", + "sourceField": "___records___", + "label": "Failures", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "status: \"failed\" OR status: \"timed_out\"", + "language": "kuery" + } + } + }, + "columnOrder": [ + "col1" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "metricAccessor": "col1", + "color": "#BD271E" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "executions-over-time", + "grid": { + "x": 0, + "y": 8, + "w": 32, + "h": 14 + }, + "config": { + "title": "Executions Over Time", + "attributes": { + "title": "Executions Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "time": { + "operationType": "date_histogram", + "sourceField": "createdAt", + "label": "Time", + "dataType": "date", + "isBucketed": true, + "params": { + "interval": "auto" + } + }, + "count": { + "operationType": "count", + "sourceField": "___records___", + "label": "Executions", + "dataType": "number", + "isBucketed": false + }, + "status": { + "operationType": "terms", + "sourceField": "status", + "label": "Status", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 10, + "orderBy": { + "type": "column", + "columnId": "count" + }, + "orderDirection": "desc" + } + } + }, + "columnOrder": [ + "time", + "status", + "count" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "seriesType": "bar_stacked", + "xAccessor": "time", + "accessors": [ + "count" + ], + "splitAccessor": "status" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "trigger-breakdown", + "grid": { + "x": 32, + "y": 8, + "w": 16, + "h": 14 + }, + "config": { + "title": "Trigger Breakdown", + "attributes": { + "title": "Trigger Breakdown", + "visualizationType": "lnsPie", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "trigger": { + "operationType": "terms", + "sourceField": "triggeredBy", + "label": "Triggered By", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 10, + "orderBy": { + "type": "column", + "columnId": "count" + }, + "orderDirection": "desc" + } + }, + "count": { + "operationType": "count", + "sourceField": "___records___", + "label": "Count", + "dataType": "number", + "isBucketed": false + } + }, + "columnOrder": [ + "trigger", + "count" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "shape": "donut", + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "primaryGroups": [ + "trigger" + ], + "metrics": [ + "count" + ] + } + ], + "legend": { + "isVisible": true, + "position": "right" + } + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "failure-rate-trend", + "grid": { + "x": 0, + "y": 22, + "w": 24, + "h": 14 + }, + "config": { + "title": "Failure Rate Trend", + "attributes": { + "title": "Failure Rate Trend", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "time": { + "operationType": "date_histogram", + "sourceField": "createdAt", + "label": "Time", + "dataType": "date", + "isBucketed": true, + "params": { + "interval": "auto" + } + }, + "total": { + "operationType": "count", + "sourceField": "___records___", + "label": "Total", + "dataType": "number", + "isBucketed": false + }, + "failed": { + "operationType": "count", + "sourceField": "___records___", + "label": "Failed", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "status: \"failed\" OR status: \"timed_out\"", + "language": "kuery" + } + }, + "formula": { + "operationType": "formula", + "label": "Failure Rate", + "dataType": "number", + "isBucketed": false, + "references": [ + "formulaX0" + ], + "customLabel": true, + "params": { + "formula": "count(kql='status: \"failed\" OR status: \"timed_out\"') / count()", + "format": { + "id": "percent", + "params": { + "decimals": 1 + } + } + } + }, + "formulaX0": { + "operationType": "math", + "references": [ + "failed", + "total" + ], + "label": "Part of formula", + "dataType": "number", + "isBucketed": false, + "customLabel": true + } + }, + "columnOrder": [ + "time", + "formula", + "formulaX0", + "total", + "failed" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "seriesType": "area", + "xAccessor": "time", + "accessors": [ + "formula" + ], + "yConfig": [ + { + "forAccessor": "formula", + "axisMode": "left", + "color": "#BD271E" + } + ] + } + ], + "legend": { + "isVisible": false + }, + "preferredSeriesType": "area", + "valueLabels": "hide", + "yTitle": "Failure Rate" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "duration-distribution", + "grid": { + "x": 24, + "y": 22, + "w": 24, + "h": 14 + }, + "config": { + "title": "Duration Distribution", + "attributes": { + "title": "Duration Distribution", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "fast": { + "operationType": "count", + "sourceField": "___records___", + "label": "< 1s", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "duration < 1000", + "language": "kuery" + }, + "customLabel": true + }, + "medium": { + "operationType": "count", + "sourceField": "___records___", + "label": "1s - 5s", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "duration >= 1000 AND duration < 5000", + "language": "kuery" + }, + "customLabel": true + }, + "slow": { + "operationType": "count", + "sourceField": "___records___", + "label": "5s - 30s", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "duration >= 5000 AND duration < 30000", + "language": "kuery" + }, + "customLabel": true + }, + "very_slow": { + "operationType": "count", + "sourceField": "___records___", + "label": "> 30s", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "duration >= 30000", + "language": "kuery" + }, + "customLabel": true + }, + "time": { + "operationType": "date_histogram", + "sourceField": "createdAt", + "label": "Time", + "dataType": "date", + "isBucketed": true, + "params": { + "interval": "auto" + } + } + }, + "columnOrder": [ + "time", + "fast", + "medium", + "slow", + "very_slow" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "seriesType": "bar_stacked", + "xAccessor": "time", + "accessors": [ + "fast", + "medium", + "slow", + "very_slow" + ], + "yConfig": [ + { + "forAccessor": "fast", + "color": "#23be8f" + }, + { + "forAccessor": "medium", + "color": "#fcd279" + }, + { + "forAccessor": "slow", + "color": "#f5a623" + }, + { + "forAccessor": "very_slow", + "color": "#BD271E" + } + ] + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide", + "yTitle": "Executions" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "duration-over-time", + "grid": { + "x": 0, + "y": 36, + "w": 24, + "h": 14 + }, + "config": { + "title": "Execution Duration Over Time", + "attributes": { + "title": "Execution Duration Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "time": { + "operationType": "date_histogram", + "sourceField": "createdAt", + "label": "Time", + "dataType": "date", + "isBucketed": true, + "params": { + "interval": "auto" + } + }, + "avg_dur": { + "operationType": "average", + "sourceField": "duration", + "label": "Avg (ms)", + "dataType": "number", + "isBucketed": false, + "params": { + "format": { + "id": "number", + "params": { + "decimals": 0 + } + } + } + }, + "p95_dur": { + "operationType": "percentile", + "sourceField": "duration", + "label": "p95 (ms)", + "dataType": "number", + "isBucketed": false, + "params": { + "percentile": 95, + "format": { + "id": "number", + "params": { + "decimals": 0 + } + } + } + } + }, + "columnOrder": [ + "time", + "avg_dur", + "p95_dur" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "seriesType": "line", + "xAccessor": "time", + "accessors": [ + "avg_dur", + "p95_dur" + ], + "yConfig": [ + { + "forAccessor": "avg_dur", + "axisMode": "left", + "color": "#0077CC" + }, + { + "forAccessor": "p95_dur", + "axisMode": "left", + "color": "#f5a623" + } + ] + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line", + "valueLabels": "hide", + "yTitle": "Duration (ms)" + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "status-breakdown", + "grid": { + "x": 24, + "y": 36, + "w": 12, + "h": 14 + }, + "config": { + "title": "Status Breakdown", + "attributes": { + "title": "Status Breakdown", + "visualizationType": "lnsPie", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "status": { + "operationType": "terms", + "sourceField": "status", + "label": "Status", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 10, + "orderBy": { + "type": "column", + "columnId": "count" + }, + "orderDirection": "desc" + } + }, + "count": { + "operationType": "count", + "sourceField": "___records___", + "label": "Count", + "dataType": "number", + "isBucketed": false + } + }, + "columnOrder": [ + "status", + "count" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "shape": "donut", + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "primaryGroups": [ + "status" + ], + "metrics": [ + "count" + ] + } + ], + "legend": { + "isVisible": true, + "position": "right" + } + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "slowest-workflows", + "grid": { + "x": 36, + "y": 36, + "w": 12, + "h": 14 + }, + "config": { + "title": "Slowest Workflows", + "attributes": { + "title": "Slowest Workflows (p95)", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "workflow": { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 10, + "orderBy": { + "type": "column", + "columnId": "p95dur" + }, + "orderDirection": "desc" + } + }, + "p95dur": { + "operationType": "percentile", + "sourceField": "duration", + "label": "p95 (ms)", + "dataType": "number", + "isBucketed": false, + "params": { + "percentile": 95, + "format": { + "id": "number", + "params": { + "decimals": 0 + } + } + } + }, + "execcount": { + "operationType": "count", + "sourceField": "___records___", + "label": "Runs", + "dataType": "number", + "isBucketed": false + } + }, + "columnOrder": [ + "workflow", + "p95dur", + "execcount" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + { + "columnId": "workflow" + }, + { + "columnId": "p95dur", + "colorMode": "text", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": true, + "rangeType": "number", + "rangeMin": 0, + "rangeMax": null, + "progression": "fixed", + "stops": [ + { + "color": "#23be8f", + "stop": 1000 + }, + { + "color": "#fcd279", + "stop": 5000 + }, + { + "color": "#f66d64", + "stop": 30000 + } + ], + "steps": 3, + "continuity": "above" + } + } + }, + { + "columnId": "execcount" + } + ] + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + }, + { + "type": "vis", + "id": "top-workflows", + "grid": { + "x": 0, + "y": 50, + "w": 24, + "h": 16 + }, + "config": { + "title": "Top Workflows", + "attributes": { + "title": "Top Workflows", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "workflow": { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 20, + "orderBy": { + "type": "column", + "columnId": "executions" + }, + "orderDirection": "desc" + } + }, + "executions": { + "operationType": "count", + "sourceField": "___records___", + "label": "Executions", + "dataType": "number", + "isBucketed": false + }, + "avgduration": { + "operationType": "average", + "sourceField": "duration", + "label": "Avg Duration (ms)", + "dataType": "number", + "isBucketed": false, + "params": { + "format": { + "id": "number", + "params": { + "decimals": 0 + } + } + } + }, + "failures": { + "operationType": "count", + "sourceField": "___records___", + "label": "Failures", + "dataType": "number", + "isBucketed": false, + "filter": { + "query": "status: \"failed\" OR status: \"timed_out\"", + "language": "kuery" + } + } + }, + "columnOrder": [ + "workflow", + "executions", + "avgduration", + "failures" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + { + "columnId": "workflow" + }, + { + "columnId": "executions" + }, + { + "columnId": "avgduration" + }, + { + "columnId": "failures", + "colorMode": "text", + "palette": { + "type": "palette", + "name": "status", + "params": { + "name": "status", + "reverse": true, + "rangeType": "number", + "rangeMin": 0, + "rangeMax": null, + "progression": "fixed", + "stops": [ + { + "color": "#23be8f", + "stop": 1 + }, + { + "color": "#fcd279", + "stop": 5 + }, + { + "color": "#f66d64", + "stop": 20 + } + ], + "steps": 3, + "continuity": "above" + } + } + } + ] + }, + "query": { + "query": "NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + }, + "enhancements": { + "dynamicActions": { + "events": [ + { + "eventId": "da9a622e-f10e-4869-87f9-1e517e8c0dc5", + "triggers": [ + "VALUE_CLICK_TRIGGER" + ], + "action": { + "factoryId": "URL_DRILLDOWN", + "name": "View Workflow", + "config": { + "url": { + "template": "/app/workflows/{{event.value}}" + }, + "openInNewTab": true, + "encodeUrl": true + } + } + } + ] + } + } + } + }, + { + "type": "vis", + "id": "recent-failures", + "grid": { + "x": 24, + "y": 50, + "w": 24, + "h": 16 + }, + "config": { + "title": "Recent Failures", + "attributes": { + "title": "Recent Failures", + "visualizationType": "lnsDatatable", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "workflow": { + "operationType": "terms", + "sourceField": "workflowId", + "label": "Workflow", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 20, + "orderBy": { + "type": "column", + "columnId": "failures" + }, + "orderDirection": "desc" + } + }, + "failures": { + "operationType": "count", + "sourceField": "___records___", + "label": "Failures", + "dataType": "number", + "isBucketed": false + }, + "laststatus": { + "operationType": "last_value", + "sourceField": "status", + "label": "Last Status", + "dataType": "string", + "isBucketed": false, + "params": { + "sortField": "createdAt" + } + } + }, + "columnOrder": [ + "workflow", + "failures", + "laststatus" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_wf" + } + } + } + }, + "visualization": { + "layerId": "layer1", + "layerType": "data", + "columns": [ + { + "columnId": "workflow" + }, + { + "columnId": "failures" + }, + { + "columnId": "laststatus" + } + ] + }, + "query": { + "query": "(status: \"failed\" OR status: \"timed_out\") AND NOT isTestRun: true", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_wf": { + "id": "adhoc_wf", + "title": ".workflows-executions", + "timeFieldName": "createdAt" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_wf", + "name": "indexpattern-datasource-layer-layer1" + } + ] + }, + "enhancements": { + "dynamicActions": { + "events": [ + { + "eventId": "120af0bf-b53a-4d65-8fdc-35e59c163bbb", + "triggers": [ + "VALUE_CLICK_TRIGGER" + ], + "action": { + "factoryId": "URL_DRILLDOWN", + "name": "View Workflow Executions", + "config": { + "url": { + "template": "/app/workflows/{{event.value}}?tab=executions" + }, + "openInNewTab": true, + "encodeUrl": true + } + } + } + ] + } + } + } + }, + { + "type": "vis", + "id": "error-logs-over-time", + "grid": { + "x": 0, + "y": 66, + "w": 48, + "h": 12 + }, + "config": { + "title": "Error & Warning Logs Over Time", + "attributes": { + "title": "Error & Warning Logs Over Time", + "visualizationType": "lnsXY", + "state": { + "datasourceStates": { + "formBased": { + "layers": { + "layer1": { + "columns": { + "time": { + "operationType": "date_histogram", + "sourceField": "@timestamp", + "label": "Time", + "dataType": "date", + "isBucketed": true, + "params": { + "interval": "auto" + } + }, + "count": { + "operationType": "count", + "sourceField": "___records___", + "label": "Log entries", + "dataType": "number", + "isBucketed": false + }, + "level": { + "operationType": "terms", + "sourceField": "level", + "label": "Level", + "dataType": "string", + "isBucketed": true, + "params": { + "size": 5, + "orderBy": { + "type": "column", + "columnId": "count" + }, + "orderDirection": "desc" + } + } + }, + "columnOrder": [ + "time", + "level", + "count" + ], + "incompleteColumns": {}, + "indexPatternId": "adhoc_logs" + } + } + } + }, + "visualization": { + "layers": [ + { + "layerId": "layer1", + "layerType": "data", + "seriesType": "bar_stacked", + "xAccessor": "time", + "accessors": [ + "count" + ], + "splitAccessor": "level" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "valueLabels": "hide" + }, + "query": { + "query": "level: \"error\" OR level: \"warn\"", + "language": "kuery" + }, + "filters": [], + "adHocDataViews": { + "adhoc_logs": { + "id": "adhoc_logs", + "title": ".workflows-execution-data-stream-logs", + "timeFieldName": "@timestamp" + } + } + }, + "references": [ + { + "type": "index-pattern", + "id": "adhoc_logs", + "name": "indexpattern-datasource-layer-layer1" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/packages/elastic_workflows/changelog.yml b/packages/elastic_workflows/changelog.yml new file mode 100644 index 00000000000..7f44aedf1e1 --- /dev/null +++ b/packages/elastic_workflows/changelog.yml @@ -0,0 +1,5 @@ +- version: 0.1.0 + changes: + - description: Initial release with workflow execution overview dashboard. + type: enhancement + link: https://github.com/elastic/security-team/issues/15773 diff --git a/packages/elastic_workflows/docs/README.md b/packages/elastic_workflows/docs/README.md new file mode 100644 index 00000000000..08313d56191 --- /dev/null +++ b/packages/elastic_workflows/docs/README.md @@ -0,0 +1,31 @@ +# Elastic Workflows + +Monitor your Elastic Workflows with out-of-the-box dashboards. + +## Dashboards + +### Workflows Execution Overview + +Provides a high-level view of workflow execution activity: + +- **Executions over time** — total workflow runs bucketed by time interval +- **Status breakdown** — proportion of completed, failed, timed out, and cancelled executions +- **Failure rate** — percentage of executions ending in error or timeout +- **Average duration** — mean execution time across all workflows +- **Top workflows by execution count** — most frequently triggered workflows +- **Top failing workflows** — workflows with the highest failure rates + +## Data sources + +This package includes dashboards that read from the following Elasticsearch indices created by the Workflows Execution Engine: + +| Index | Description | +|-------|-------------| +| `.workflows-executions` | Workflow-level execution records | +| `.workflows-step-executions` | Per-step execution records | +| `.workflows-execution-data-stream-logs` | Execution log entries | + +## Requirements + +- Kibana 9.3.0 or later (Elastic Workflows) +- Workflows must be available in your deployment diff --git a/packages/elastic_workflows/img/logo.svg b/packages/elastic_workflows/img/logo.svg new file mode 100644 index 00000000000..2ec70085869 --- /dev/null +++ b/packages/elastic_workflows/img/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/elastic_workflows/kibana/dashboard/elastic_workflows-8de4b190-2f1a-4c3b-b7a9-31b2c8d4e5f6.json b/packages/elastic_workflows/kibana/dashboard/elastic_workflows-8de4b190-2f1a-4c3b-b7a9-31b2c8d4e5f6.json new file mode 100644 index 00000000000..62b6d9e8c2f --- /dev/null +++ b/packages/elastic_workflows/kibana/dashboard/elastic_workflows-8de4b190-2f1a-4c3b-b7a9-31b2c8d4e5f6.json @@ -0,0 +1,91 @@ +{ + "attributes": { + "description": "Comprehensive monitoring for Elastic Workflows. Per-workflow executions, failures, success rate, test runs, and durations; plus failure trends and performance analysis. Click workflow IDs in tables to open the workflow in Workflows.", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{}" + }, + "optionsJSON": "{\"hidePanelTitles\": false, \"hidePanelBorders\": false, \"useMargins\": true, \"autoApplyFilters\": true, \"syncColors\": false, \"syncCursor\": true, \"syncTooltips\": false}", + "panelsJSON": "[{\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Total Executions\", \"attributes\": {\"title\": \"Total Executions\", \"visualizationType\": \"lnsMetric\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"064cc19c-8835-4e68-8b8b-91e8f99cd090\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Executions\", \"dataType\": \"number\", \"isBucketed\": false}}, \"columnOrder\": [\"064cc19c-8835-4e68-8b8b-91e8f99cd090\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"metricAccessor\": \"064cc19c-8835-4e68-8b8b-91e8f99cd090\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"total-executions\", \"gridData\": {\"x\": 0, \"y\": 0, \"w\": 12, \"h\": 8, \"i\": \"total-executions\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Success Rate\", \"attributes\": {\"title\": \"Success Rate\", \"visualizationType\": \"lnsMetric\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"93022932-d01d-4352-bb08-d240d38f7830\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Completed\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"status: \\\"completed\\\"\", \"language\": \"kuery\"}}, \"b10207a3-5657-4fd0-83f6-9e4af34d222e\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Total\", \"dataType\": \"number\", \"isBucketed\": false}, \"0826d680-a783-4802-a630-e269e8d30894\": {\"operationType\": \"math\", \"label\": \"Success Rate\", \"dataType\": \"number\", \"isBucketed\": false, \"references\": [\"93022932-d01d-4352-bb08-d240d38f7830\", \"b10207a3-5657-4fd0-83f6-9e4af34d222e\"], \"customLabel\": true, \"params\": {\"tinymathAst\": {\"type\": \"function\", \"name\": \"divide\", \"args\": [\"93022932-d01d-4352-bb08-d240d38f7830\", \"b10207a3-5657-4fd0-83f6-9e4af34d222e\"]}, \"format\": {\"id\": \"percent\", \"params\": {\"decimals\": 1}}}}, \"bb407b5b-8615-4cc1-b9bf-822d6429aa20\": {\"operationType\": \"static_value\", \"label\": \"Static value: 1\", \"dataType\": \"number\", \"isBucketed\": false, \"isStaticValue\": true, \"scale\": \"ratio\", \"params\": {\"value\": \"1\"}, \"references\": []}}, \"columnOrder\": [\"93022932-d01d-4352-bb08-d240d38f7830\", \"b10207a3-5657-4fd0-83f6-9e4af34d222e\", \"0826d680-a783-4802-a630-e269e8d30894\", \"bb407b5b-8615-4cc1-b9bf-822d6429aa20\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"metricAccessor\": \"0826d680-a783-4802-a630-e269e8d30894\", \"maxAccessor\": \"bb407b5b-8615-4cc1-b9bf-822d6429aa20\", \"showBar\": true, \"subtitle\": \" \", \"palette\": {\"type\": \"palette\", \"name\": \"status\", \"params\": {\"name\": \"status\", \"reverse\": false, \"rangeType\": \"percent\", \"rangeMin\": 0, \"rangeMax\": 100, \"progression\": \"fixed\", \"stops\": [{\"color\": \"#f66d64\", \"stop\": 80}, {\"color\": \"#fcd279\", \"stop\": 95}, {\"color\": \"#23be8f\", \"stop\": 100}], \"steps\": 3, \"colorStops\": [], \"continuity\": \"all\", \"maxSteps\": 5}}}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"success-rate\", \"gridData\": {\"x\": 12, \"y\": 0, \"w\": 12, \"h\": 8, \"i\": \"success-rate\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Avg Duration\", \"attributes\": {\"title\": \"Avg Duration\", \"visualizationType\": \"lnsMetric\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"d83a451b-6444-4545-9d5c-b9c67f33fb0d\": {\"operationType\": \"average\", \"sourceField\": \"duration\", \"label\": \"Avg Duration (ms)\", \"dataType\": \"number\", \"isBucketed\": false, \"params\": {\"format\": {\"id\": \"number\", \"params\": {\"decimals\": 0, \"suffix\": \" ms\"}}}}}, \"columnOrder\": [\"d83a451b-6444-4545-9d5c-b9c67f33fb0d\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"metricAccessor\": \"d83a451b-6444-4545-9d5c-b9c67f33fb0d\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"avg-duration\", \"gridData\": {\"x\": 24, \"y\": 0, \"w\": 12, \"h\": 8, \"i\": \"avg-duration\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Failures\", \"attributes\": {\"title\": \"Failures\", \"visualizationType\": \"lnsMetric\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"e5c9bba6-a6ea-43c6-bdf0-c12697bb4bae\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Failures\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"status: \\\"failed\\\" OR status: \\\"timed_out\\\"\", \"language\": \"kuery\"}}}, \"columnOrder\": [\"e5c9bba6-a6ea-43c6-bdf0-c12697bb4bae\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"metricAccessor\": \"e5c9bba6-a6ea-43c6-bdf0-c12697bb4bae\", \"color\": \"#BD271E\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"failure-count\", \"gridData\": {\"x\": 36, \"y\": 0, \"w\": 12, \"h\": 8, \"i\": \"failure-count\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Executions Over Time\", \"attributes\": {\"title\": \"Executions Over Time\", \"visualizationType\": \"lnsXY\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"8de6bf6a-8964-4de9-8f66-66a840ca7ba0\": {\"operationType\": \"date_histogram\", \"sourceField\": \"createdAt\", \"label\": \"Time\", \"dataType\": \"date\", \"isBucketed\": true, \"params\": {\"interval\": \"auto\"}}, \"85b09258-9715-452a-a0eb-609f6b317af6\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"params\": {\"size\": 15, \"orderBy\": {\"type\": \"column\", \"columnId\": \"e5b34007-4c1a-4f02-bde8-7356923d2949\"}, \"orderDirection\": \"desc\"}}, \"e5b34007-4c1a-4f02-bde8-7356923d2949\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Executions\", \"dataType\": \"number\", \"isBucketed\": false}}, \"columnOrder\": [\"8de6bf6a-8964-4de9-8f66-66a840ca7ba0\", \"85b09258-9715-452a-a0eb-609f6b317af6\", \"e5b34007-4c1a-4f02-bde8-7356923d2949\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"seriesType\": \"bar_stacked\", \"xAccessor\": \"8de6bf6a-8964-4de9-8f66-66a840ca7ba0\", \"accessors\": [\"e5b34007-4c1a-4f02-bde8-7356923d2949\"], \"splitAccessors\": [\"85b09258-9715-452a-a0eb-609f6b317af6\"]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}, \"preferredSeriesType\": \"bar_stacked\", \"valueLabels\": \"hide\", \"yTitle\": \"Count\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"executions-over-time\", \"gridData\": {\"x\": 0, \"y\": 8, \"w\": 32, \"h\": 14, \"i\": \"executions-over-time\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Trigger Breakdown\", \"attributes\": {\"title\": \"Trigger Breakdown\", \"visualizationType\": \"lnsPie\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"358a38bd-0c90-41bc-bbda-19edac0d227b\": {\"operationType\": \"terms\", \"sourceField\": \"triggeredBy\", \"label\": \"Triggered By\", \"dataType\": \"string\", \"isBucketed\": true, \"params\": {\"size\": 10, \"orderBy\": {\"type\": \"column\", \"columnId\": \"294fdff6-6fc4-46a3-a408-fdad9bfda509\"}, \"orderDirection\": \"desc\"}}, \"294fdff6-6fc4-46a3-a408-fdad9bfda509\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Count\", \"dataType\": \"number\", \"isBucketed\": false}}, \"columnOrder\": [\"358a38bd-0c90-41bc-bbda-19edac0d227b\", \"294fdff6-6fc4-46a3-a408-fdad9bfda509\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"shape\": \"donut\", \"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"primaryGroups\": [\"358a38bd-0c90-41bc-bbda-19edac0d227b\"], \"metrics\": [\"294fdff6-6fc4-46a3-a408-fdad9bfda509\"]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"trigger-breakdown\", \"gridData\": {\"x\": 32, \"y\": 8, \"w\": 16, \"h\": 14, \"i\": \"trigger-breakdown\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Failure Rate Trend (per Workflow)\", \"attributes\": {\"title\": \"Failure Rate Trend (per Workflow)\", \"visualizationType\": \"lnsXY\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"388b0466-4929-4390-8009-0a324181e8ea\": {\"operationType\": \"date_histogram\", \"sourceField\": \"createdAt\", \"label\": \"Time\", \"dataType\": \"date\", \"isBucketed\": true, \"params\": {\"interval\": \"auto\"}}, \"b2c90df4-c1d7-4301-99cd-5436b4fc79cd\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"params\": {\"size\": 10, \"orderBy\": {\"type\": \"column\", \"columnId\": \"03b99ed4-a0b4-4342-b61a-4664078cceec\"}, \"orderDirection\": \"desc\"}}, \"03b99ed4-a0b4-4342-b61a-4664078cceec\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Total\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true}, \"3a34e237-a90e-44a0-825f-1a1268810976\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Failed\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"status: \\\"failed\\\" OR status: \\\"timed_out\\\"\", \"language\": \"kuery\"}}, \"87bea0d5-9055-4ce5-8bff-461f7b55e7cc\": {\"operationType\": \"math\", \"label\": \"Failure rate\", \"dataType\": \"number\", \"isBucketed\": false, \"references\": [\"3a34e237-a90e-44a0-825f-1a1268810976\", \"03b99ed4-a0b4-4342-b61a-4664078cceec\"], \"customLabel\": true, \"params\": {\"tinymathAst\": {\"type\": \"function\", \"name\": \"divide\", \"args\": [\"3a34e237-a90e-44a0-825f-1a1268810976\", \"03b99ed4-a0b4-4342-b61a-4664078cceec\"]}, \"format\": {\"id\": \"percent\", \"params\": {\"decimals\": 1}}}}}, \"columnOrder\": [\"388b0466-4929-4390-8009-0a324181e8ea\", \"b2c90df4-c1d7-4301-99cd-5436b4fc79cd\", \"03b99ed4-a0b4-4342-b61a-4664078cceec\", \"3a34e237-a90e-44a0-825f-1a1268810976\", \"87bea0d5-9055-4ce5-8bff-461f7b55e7cc\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"seriesType\": \"area\", \"xAccessor\": \"388b0466-4929-4390-8009-0a324181e8ea\", \"accessors\": [\"87bea0d5-9055-4ce5-8bff-461f7b55e7cc\"], \"splitAccessors\": [\"b2c90df4-c1d7-4301-99cd-5436b4fc79cd\"], \"yConfig\": [{\"forAccessor\": \"87bea0d5-9055-4ce5-8bff-461f7b55e7cc\", \"axisMode\": \"left\"}]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}, \"preferredSeriesType\": \"area\", \"valueLabels\": \"hide\", \"yTitle\": \"Failure Rate\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"failure-rate-trend\", \"gridData\": {\"x\": 0, \"y\": 22, \"w\": 24, \"h\": 14, \"i\": \"failure-rate-trend\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Duration Distribution\", \"attributes\": {\"title\": \"Duration Distribution\", \"visualizationType\": \"lnsXY\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"0d59f934-a8cb-403a-b0f1-f5b0690885af\": {\"operationType\": \"date_histogram\", \"sourceField\": \"createdAt\", \"label\": \"Time\", \"dataType\": \"date\", \"isBucketed\": true, \"params\": {\"interval\": \"auto\"}}, \"d8a390c4-1731-4a55-bad1-8789ff5f06df\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"< 1s\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"duration < 1000\", \"language\": \"kuery\"}, \"customLabel\": true}, \"59c7db69-7e6b-4815-bd9c-23be406c0917\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"1s - 5s\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"duration >= 1000 AND duration < 5000\", \"language\": \"kuery\"}, \"customLabel\": true}, \"1b790567-5e0d-4173-9eeb-e87ec105d3aa\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"5s - 30s\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"duration >= 5000 AND duration < 30000\", \"language\": \"kuery\"}, \"customLabel\": true}, \"8c836648-51e1-48d1-a777-b6ba8c3d697c\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"> 30s\", \"dataType\": \"number\", \"isBucketed\": false, \"filter\": {\"query\": \"duration >= 30000\", \"language\": \"kuery\"}, \"customLabel\": true}}, \"columnOrder\": [\"0d59f934-a8cb-403a-b0f1-f5b0690885af\", \"d8a390c4-1731-4a55-bad1-8789ff5f06df\", \"59c7db69-7e6b-4815-bd9c-23be406c0917\", \"1b790567-5e0d-4173-9eeb-e87ec105d3aa\", \"8c836648-51e1-48d1-a777-b6ba8c3d697c\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"seriesType\": \"bar_stacked\", \"xAccessor\": \"0d59f934-a8cb-403a-b0f1-f5b0690885af\", \"accessors\": [\"d8a390c4-1731-4a55-bad1-8789ff5f06df\", \"59c7db69-7e6b-4815-bd9c-23be406c0917\", \"1b790567-5e0d-4173-9eeb-e87ec105d3aa\", \"8c836648-51e1-48d1-a777-b6ba8c3d697c\"], \"yConfig\": [{\"forAccessor\": \"d8a390c4-1731-4a55-bad1-8789ff5f06df\", \"color\": \"#23be8f\"}, {\"forAccessor\": \"59c7db69-7e6b-4815-bd9c-23be406c0917\", \"color\": \"#fcd279\"}, {\"forAccessor\": \"1b790567-5e0d-4173-9eeb-e87ec105d3aa\", \"color\": \"#f5a623\"}, {\"forAccessor\": \"8c836648-51e1-48d1-a777-b6ba8c3d697c\", \"color\": \"#BD271E\"}]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}, \"preferredSeriesType\": \"bar_stacked\", \"valueLabels\": \"hide\", \"yTitle\": \"Executions\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"duration-distribution\", \"gridData\": {\"x\": 24, \"y\": 22, \"w\": 24, \"h\": 14, \"i\": \"duration-distribution\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Avg Duration Over Time (per Workflow)\", \"attributes\": {\"title\": \"Avg Duration Over Time (per Workflow)\", \"visualizationType\": \"lnsXY\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"5699ec0b-b664-4385-aaf9-9fd72c13aff8\": {\"operationType\": \"date_histogram\", \"sourceField\": \"createdAt\", \"label\": \"Time\", \"dataType\": \"date\", \"isBucketed\": true, \"params\": {\"interval\": \"auto\"}}, \"27054d28-f936-4bea-bf40-9ddf49f90d71\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"params\": {\"size\": 10, \"orderBy\": {\"type\": \"column\", \"columnId\": \"b31b78d4-7b20-4914-9845-94167dd2842f\"}, \"orderDirection\": \"desc\"}}, \"b31b78d4-7b20-4914-9845-94167dd2842f\": {\"operationType\": \"average\", \"sourceField\": \"duration\", \"label\": \"Avg (ms)\", \"dataType\": \"number\", \"isBucketed\": false, \"params\": {\"format\": {\"id\": \"number\", \"params\": {\"decimals\": 0}}}}}, \"columnOrder\": [\"5699ec0b-b664-4385-aaf9-9fd72c13aff8\", \"27054d28-f936-4bea-bf40-9ddf49f90d71\", \"b31b78d4-7b20-4914-9845-94167dd2842f\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"seriesType\": \"line\", \"xAccessor\": \"5699ec0b-b664-4385-aaf9-9fd72c13aff8\", \"accessors\": [\"b31b78d4-7b20-4914-9845-94167dd2842f\"], \"splitAccessors\": [\"27054d28-f936-4bea-bf40-9ddf49f90d71\"]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}, \"preferredSeriesType\": \"line\", \"valueLabels\": \"hide\", \"yTitle\": \"Avg Duration (ms)\"}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"duration-over-time\", \"gridData\": {\"x\": 0, \"y\": 36, \"w\": 24, \"h\": 14, \"i\": \"duration-over-time\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Status Breakdown\", \"attributes\": {\"title\": \"Status Breakdown\", \"visualizationType\": \"lnsPie\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"765084bb-4475-411b-92c0-89eefec4c197\": {\"operationType\": \"terms\", \"sourceField\": \"status\", \"label\": \"Status\", \"dataType\": \"string\", \"isBucketed\": true, \"params\": {\"size\": 10, \"orderBy\": {\"type\": \"column\", \"columnId\": \"e7953da4-21c4-4650-a287-465d52b1d323\"}, \"orderDirection\": \"desc\"}}, \"e7953da4-21c4-4650-a287-465d52b1d323\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Count\", \"dataType\": \"number\", \"isBucketed\": false}}, \"columnOrder\": [\"765084bb-4475-411b-92c0-89eefec4c197\", \"e7953da4-21c4-4650-a287-465d52b1d323\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"shape\": \"donut\", \"layers\": [{\"layerId\": \"layer1\", \"layerType\": \"data\", \"primaryGroups\": [\"765084bb-4475-411b-92c0-89eefec4c197\"], \"metrics\": [\"e7953da4-21c4-4650-a287-465d52b1d323\"]}], \"legend\": {\"isVisible\": true, \"position\": \"right\"}}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"status-breakdown\", \"gridData\": {\"x\": 24, \"y\": 36, \"w\": 12, \"h\": 14, \"i\": \"status-breakdown\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Slowest Workflows (p95)\", \"attributes\": {\"title\": \"Slowest Workflows (p95)\", \"visualizationType\": \"lnsDatatable\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"e2649c8b-d2ef-4291-a3c4-3d5cf0aac859\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"customLabel\": true, \"params\": {\"size\": 10, \"orderBy\": {\"type\": \"column\", \"columnId\": \"0edfb756-11b1-4847-87ce-b9fd3dfba2de\"}, \"orderDirection\": \"desc\"}}, \"0edfb756-11b1-4847-87ce-b9fd3dfba2de\": {\"operationType\": \"percentile\", \"sourceField\": \"duration\", \"label\": \"p95 (ms)\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"params\": {\"percentile\": 95, \"format\": {\"id\": \"number\", \"params\": {\"decimals\": 0}}}}, \"90884a81-a417-4903-81d4-8cbbe227b067\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Runs\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true}}, \"columnOrder\": [\"e2649c8b-d2ef-4291-a3c4-3d5cf0aac859\", \"0edfb756-11b1-4847-87ce-b9fd3dfba2de\", \"90884a81-a417-4903-81d4-8cbbe227b067\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"columns\": [{\"columnId\": \"e2649c8b-d2ef-4291-a3c4-3d5cf0aac859\"}, {\"columnId\": \"0edfb756-11b1-4847-87ce-b9fd3dfba2de\", \"colorMode\": \"text\", \"palette\": {\"type\": \"palette\", \"name\": \"status\", \"params\": {\"name\": \"status\", \"reverse\": true, \"rangeType\": \"number\", \"rangeMin\": 0, \"rangeMax\": null, \"progression\": \"fixed\", \"stops\": [{\"color\": \"#23be8f\", \"stop\": 1000}, {\"color\": \"#fcd279\", \"stop\": 5000}, {\"color\": \"#f66d64\", \"stop\": 30000}], \"steps\": 3, \"continuity\": \"above\"}}}, {\"columnId\": \"90884a81-a417-4903-81d4-8cbbe227b067\"}]}, \"query\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}}, \"panelIndex\": \"slowest-workflows\", \"gridData\": {\"x\": 36, \"y\": 36, \"w\": 12, \"h\": 14, \"i\": \"slowest-workflows\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Recent Failures\", \"attributes\": {\"title\": \"Recent Failures\", \"visualizationType\": \"lnsDatatable\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"0248d80c-c33e-46b9-8964-636356a34509\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"customLabel\": true, \"params\": {\"size\": 20, \"orderBy\": {\"type\": \"column\", \"columnId\": \"ad9e4f15-e50a-44b6-b4ba-9793c237f10b\"}, \"orderDirection\": \"desc\"}}, \"ad9e4f15-e50a-44b6-b4ba-9793c237f10b\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Failures\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true}, \"c8c72210-355d-46b9-9db0-aeaaba0fd383\": {\"operationType\": \"last_value\", \"sourceField\": \"status\", \"label\": \"Last Status\", \"dataType\": \"string\", \"isBucketed\": false, \"customLabel\": true, \"params\": {\"sortField\": \"createdAt\"}}}, \"columnOrder\": [\"0248d80c-c33e-46b9-8964-636356a34509\", \"ad9e4f15-e50a-44b6-b4ba-9793c237f10b\", \"c8c72210-355d-46b9-9db0-aeaaba0fd383\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"columns\": [{\"columnId\": \"0248d80c-c33e-46b9-8964-636356a34509\"}, {\"columnId\": \"ad9e4f15-e50a-44b6-b4ba-9793c237f10b\"}, {\"columnId\": \"c8c72210-355d-46b9-9db0-aeaaba0fd383\"}]}, \"query\": {\"query\": \"(status: \\\"failed\\\" OR status: \\\"timed_out\\\") AND NOT isTestRun: true\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}, \"enhancements\": {\"dynamicActions\": {\"events\": [{\"eventId\": \"5b1b400c-2804-4168-899b-4361745ab5e7\", \"triggers\": [\"VALUE_CLICK_TRIGGER\"], \"action\": {\"factoryId\": \"URL_DRILLDOWN\", \"name\": \"View Workflow Executions\", \"config\": {\"url\": {\"template\": \"/app/workflows/{{event.value}}?tab=executions\"}, \"openInNewTab\": true, \"encodeUrl\": true}}}]}}}, \"panelIndex\": \"recent-failures\", \"gridData\": {\"x\": 0, \"y\": 50, \"w\": 48, \"h\": 16, \"i\": \"recent-failures\"}}, {\"type\": \"vis\", \"embeddableConfig\": {\"title\": \"Per-Workflow Summary\", \"attributes\": {\"title\": \"Per-Workflow Summary\", \"visualizationType\": \"lnsDatatable\", \"state\": {\"datasourceStates\": {\"formBased\": {\"layers\": {\"layer1\": {\"columns\": {\"0d6435e2-7b47-4ee1-91f0-19fe1689c3ee\": {\"operationType\": \"terms\", \"sourceField\": \"workflowId\", \"label\": \"Workflow\", \"dataType\": \"string\", \"isBucketed\": true, \"customLabel\": true, \"params\": {\"size\": 25, \"orderBy\": {\"type\": \"column\", \"columnId\": \"326abee6-43a1-4540-b2e8-ded3f8174708\"}, \"orderDirection\": \"desc\"}}, \"326abee6-43a1-4540-b2e8-ded3f8174708\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Executions\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}}, \"a3a7d3a4-4310-4310-ab5d-9802a95a7232\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Failures\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"(status: \\\"failed\\\" OR status: \\\"timed_out\\\") AND NOT isTestRun: true\", \"language\": \"kuery\"}}, \"891e1fa2-49c2-4d77-ab1f-d58a6ca10e72\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Completed\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"status: \\\"completed\\\" AND NOT isTestRun: true\", \"language\": \"kuery\"}}, \"96f3f388-6388-494a-8a99-3bf0d8031b98\": {\"operationType\": \"math\", \"label\": \"Success %\", \"dataType\": \"number\", \"isBucketed\": false, \"references\": [\"891e1fa2-49c2-4d77-ab1f-d58a6ca10e72\", \"326abee6-43a1-4540-b2e8-ded3f8174708\"], \"customLabel\": true, \"params\": {\"tinymathAst\": {\"type\": \"function\", \"name\": \"divide\", \"args\": [\"891e1fa2-49c2-4d77-ab1f-d58a6ca10e72\", \"326abee6-43a1-4540-b2e8-ded3f8174708\"]}, \"format\": {\"id\": \"percent\", \"params\": {\"decimals\": 1}}}}, \"d3278d0a-af81-48dc-a074-5fcdd62d0178\": {\"operationType\": \"count\", \"sourceField\": \"___records___\", \"label\": \"Test runs\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"isTestRun: true\", \"language\": \"kuery\"}}, \"fac0c681-4146-4298-9b6e-8cdc539aa16a\": {\"operationType\": \"average\", \"sourceField\": \"duration\", \"label\": \"Avg Duration (ms)\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"params\": {\"format\": {\"id\": \"number\", \"params\": {\"decimals\": 0}}}}, \"91919842-319a-416f-ba15-f22d3327f3d0\": {\"operationType\": \"percentile\", \"sourceField\": \"duration\", \"label\": \"p95 (ms)\", \"dataType\": \"number\", \"isBucketed\": false, \"customLabel\": true, \"filter\": {\"query\": \"NOT isTestRun: true\", \"language\": \"kuery\"}, \"params\": {\"percentile\": 95, \"format\": {\"id\": \"number\", \"params\": {\"decimals\": 0}}}}}, \"columnOrder\": [\"0d6435e2-7b47-4ee1-91f0-19fe1689c3ee\", \"326abee6-43a1-4540-b2e8-ded3f8174708\", \"a3a7d3a4-4310-4310-ab5d-9802a95a7232\", \"891e1fa2-49c2-4d77-ab1f-d58a6ca10e72\", \"96f3f388-6388-494a-8a99-3bf0d8031b98\", \"d3278d0a-af81-48dc-a074-5fcdd62d0178\", \"fac0c681-4146-4298-9b6e-8cdc539aa16a\", \"91919842-319a-416f-ba15-f22d3327f3d0\"], \"incompleteColumns\": {}, \"indexPatternId\": \"adhoc_wf\"}}}}, \"visualization\": {\"layerId\": \"layer1\", \"layerType\": \"data\", \"columns\": [{\"columnId\": \"0d6435e2-7b47-4ee1-91f0-19fe1689c3ee\"}, {\"columnId\": \"326abee6-43a1-4540-b2e8-ded3f8174708\"}, {\"columnId\": \"a3a7d3a4-4310-4310-ab5d-9802a95a7232\", \"colorMode\": \"text\", \"palette\": {\"type\": \"palette\", \"name\": \"status\", \"params\": {\"name\": \"status\", \"reverse\": true, \"rangeType\": \"number\", \"rangeMin\": 0, \"rangeMax\": null, \"progression\": \"fixed\", \"stops\": [{\"color\": \"#23be8f\", \"stop\": 1}, {\"color\": \"#fcd279\", \"stop\": 5}, {\"color\": \"#f66d64\", \"stop\": 20}], \"steps\": 3, \"continuity\": \"above\"}}}, {\"columnId\": \"96f3f388-6388-494a-8a99-3bf0d8031b98\", \"colorMode\": \"text\", \"palette\": {\"type\": \"palette\", \"name\": \"status\", \"params\": {\"name\": \"status\", \"reverse\": false, \"rangeType\": \"percent\", \"rangeMin\": 0, \"rangeMax\": 100, \"progression\": \"fixed\", \"stops\": [{\"color\": \"#f66d64\", \"stop\": 80}, {\"color\": \"#fcd279\", \"stop\": 95}, {\"color\": \"#23be8f\", \"stop\": 100}], \"steps\": 3, \"continuity\": \"above\"}}}, {\"columnId\": \"d3278d0a-af81-48dc-a074-5fcdd62d0178\"}, {\"columnId\": \"fac0c681-4146-4298-9b6e-8cdc539aa16a\"}, {\"columnId\": \"91919842-319a-416f-ba15-f22d3327f3d0\", \"colorMode\": \"text\", \"palette\": {\"type\": \"palette\", \"name\": \"status\", \"params\": {\"name\": \"status\", \"reverse\": true, \"rangeType\": \"number\", \"rangeMin\": 0, \"rangeMax\": null, \"progression\": \"fixed\", \"stops\": [{\"color\": \"#23be8f\", \"stop\": 1000}, {\"color\": \"#fcd279\", \"stop\": 5000}, {\"color\": \"#f66d64\", \"stop\": 30000}], \"steps\": 3, \"continuity\": \"above\"}}}]}, \"query\": {\"query\": \"\", \"language\": \"kuery\"}, \"filters\": [], \"adHocDataViews\": {\"adhoc_wf\": {\"id\": \"adhoc_wf\", \"title\": \".workflows-executions\", \"timeFieldName\": \"createdAt\"}}}, \"references\": [{\"type\": \"index-pattern\", \"id\": \"adhoc_wf\", \"name\": \"indexpattern-datasource-layer-layer1\"}]}, \"enhancements\": {\"dynamicActions\": {\"events\": [{\"eventId\": \"07166b13-ed73-4f22-a574-0e50c55c8385\", \"triggers\": [\"VALUE_CLICK_TRIGGER\"], \"action\": {\"factoryId\": \"URL_DRILLDOWN\", \"name\": \"Open workflow\", \"config\": {\"url\": {\"template\": \"/app/workflows/{{event.value}}\"}, \"openInNewTab\": true, \"encodeUrl\": true}}}]}}}, \"panelIndex\": \"per-workflow-summary\", \"gridData\": {\"x\": 0, \"y\": 66, \"w\": 48, \"h\": 20, \"i\": \"per-workflow-summary\"}}]", + "pinned_panels": { + "panels": {} + }, + "refreshInterval": { + "pause": false, + "value": 30000 + }, + "timeFrom": "now-7d", + "timeRestore": true, + "timeTo": "now", + "title": "[Elastic Workflows] Execution Overview" + }, + "id": "elastic_workflows-8de4b190-2f1a-4c3b-b7a9-31b2c8d4e5f6", + "references": [ + { + "id": "adhoc_wf", + "name": "total-executions:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "success-rate:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "avg-duration:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "failure-count:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "executions-over-time:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "trigger-breakdown:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "failure-rate-trend:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "duration-distribution:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "duration-over-time:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "status-breakdown:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "slowest-workflows:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "recent-failures:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + }, + { + "id": "adhoc_wf", + "name": "per-workflow-summary:indexpattern-datasource-layer-layer1", + "type": "index-pattern" + } + ], + "type": "dashboard", + "typeMigrationVersion": "10.3.0" +} \ No newline at end of file diff --git a/packages/elastic_workflows/manifest.yml b/packages/elastic_workflows/manifest.yml new file mode 100644 index 00000000000..4a233825398 --- /dev/null +++ b/packages/elastic_workflows/manifest.yml @@ -0,0 +1,25 @@ +format_version: 3.4.0 +name: elastic_workflows +title: Elastic Workflows +description: >- + Dashboards and visualizations for monitoring Elastic Workflows executions, + performance, and failure rates. +version: 0.1.0 +type: content +source: + license: "Elastic-2.0" +categories: + - productivity +conditions: + kibana: + version: "^9.3.0" + elastic: + subscription: basic +icons: + - src: /img/logo.svg + title: Elastic Workflows logo + size: 32x32 + type: image/svg+xml +owner: + github: elastic/workflows-eng + type: elastic