{
  "dashboardFilters": [
    {
      "filterType": "METRIC_LABEL",
      "labelKey": "Namespace",
      "templateVariable": ""
    },
    {
      "filterType": "METRIC_LABEL",
      "labelKey": "Pipeline",
      "templateVariable": ""
    },
    {
      "filterType": "METRIC_LABEL",
      "labelKey": "ClusterName",
      "templateVariable": ""
    }
  ],
  "displayName": "Data Fusion Pipelines Overview",
  "labels": {},
  "mosaicLayout": {
    "columns": 12,
    "tiles": [
      {
        "height": 4,
        "widget": {
          "title": "Completed Pipelines",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*succeeded.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4,
        "xPos": 4
      },
      {
        "height": 4,
        "widget": {
          "title": "Failed Pipelines",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*failed.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4,
        "xPos": 8
      },
      {
        "height": 4,
        "widget": {
          "title": "All Pipeline Runs",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"RunId\"",
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*running.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4,
        "yPos": 4
      },
      {
        "height": 4,
        "widget": {
          "title": "Completed Pipeline Runs",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"RunId\"",
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*succeeded.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4,
        "xPos": 4,
        "yPos": 4
      },
      {
        "height": 4,
        "widget": {
          "title": "Failed Pipeline Runs",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"RunId\"",
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*failed.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4,
        "xPos": 8,
        "yPos": 4
      },
      {
        "height": 4,
        "widget": {
          "title": "Dataproc Clusters for Runs",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "LINE",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"ClusterName\"",
                        "metric.label.\"RunId\"",
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*(running|succeeded|failed)\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 12,
        "yPos": 8
      },
      {
        "height": 4,
        "widget": {
          "title": "All Pipelines",
          "xyChart": {
            "chartOptions": {
              "mode": "COLOR"
            },
            "dataSets": [
              {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "minAlignmentPeriod": "60s",
                "plotType": "STACKED_BAR",
                "targetAxis": "Y1",
                "timeSeriesQuery": {
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_COUNT",
                      "groupByFields": [
                        "metric.label.\"Pipeline\"",
                        "metric.label.\"Project\"",
                        "metric.label.\"Namespace\""
                      ],
                      "perSeriesAligner": "ALIGN_COUNT"
                    },
                    "filter": "metric.type=\"logging.googleapis.com/user/pipeline_logs\" resource.type=\"cloud_dataproc_cluster\" metric.label.\"Message\"=monitoring.regex.full_match(\"^Pipeline.*started.*\")"
                  }
                }
              }
            ],
            "thresholds": [],
            "timeshiftDuration": "0s",
            "yAxis": {
              "label": "y1Axis",
              "scale": "LINEAR"
            }
          }
        },
        "width": 4
      }
    ]
  }
}