Grafana dashboard: Hydrolix - Merge
Description: Monitoring merge processing of your partition into your Hydrolix Cluster

Hydrolix Monitoring dashboard for the merge services

{
  "__inputs": [
    {
      "name": "DS_GCP_- PROD TEST PROM",
      "label": "Prometheus",
      "description": "Prometheus source for Hydrolix",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "DS_GCP_- PROD TEST",
      "label": "Clickhouse",
      "description": "Clickhouse source for Hydrolix",
      "type": "datasource",
      "pluginId": "grafana-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.2.1"
    },
    {
      "type": "datasource",
      "id": "grafana-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "2.0.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Monitoring merge processing of your partition into your Hydrolix Cluster",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 17916,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "datasource": {
        "type": "grafana-clickhouse-datasource",
        "uid": "tFkwxOy7z"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 27,
      "panels": [],
      "title": "Summary",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 21,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false
        },
        "content": "# Merge\n\nMerge is done by the merge-peer.\n\nMerging is a continuous process where we take small candidate partitions and attempt to merge them together.\n\nThe merge process is done regardless of the type of sources.\n\nHere we monitor the duration of the merging process, the count of merge in progress and also the number of candidate partitions to merge.\n\nWe also monitor the successful merge and the failed one\n\nWe split the graph by table and merge-peer instances.",
        "mode": "markdown"
      },
      "pluginVersion": "9.2.1",
      "title": "Merge Description",
      "type": "text"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 12,
        "y": 1
      },
      "id": 24,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": false,
        "text": {}
      },
      "pluginVersion": "9.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "editorMode": "code",
          "exemplar": true,
          "expr": "sum(increase(merge_success{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
          "interval": "",
          "legendFormat": "",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Merge Success",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "description": "RabbitMq Infrastructure Components affecting Merge",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 15,
        "y": 1
      },
      "id": 41,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "editorMode": "code",
          "expr": "sum by (app) (up{app=\"rabbitmq\"})",
          "legendFormat": "__auto",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "RabbitMq",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "description": "Merge Head Infrastructure Components affecting Merge",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 18,
        "y": 1
      },
      "id": 39,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "editorMode": "code",
          "expr": "sum by (app) (up{app=\"merge-head\", port_name=\"indexer\"})",
          "legendFormat": "__auto",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Merge Head",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 10
              },
              {
                "color": "semi-dark-red",
                "value": 20
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 12,
        "y": 5
      },
      "id": 23,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "9.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "editorMode": "code",
          "exemplar": true,
          "expr": "sum(increase(merge_failure{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
          "interval": "",
          "legendFormat": "",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Merge Failure",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GCP_- PROD TEST PROM}"
      },
      "description": "Kinesis Infrastructure Components affecting Kinesis Streaming Ingest",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 15,
        "y": 5
      },
      "id": 43,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.2.1",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "editorMode": "code",
          "expr": "count(count by (instance) (merge_success{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}))",
          "legendFormat": "__auto",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Merge-Peers",
      "type": "stat"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 49,
      "panels": [
        {
          "datasource": {
            "type": "grafana-clickhouse-datasource",
            "uid": "${DS_GCP_- PROD TEST}"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 12,
            "w": 24,
            "x": 0,
            "y": 10
          },
          "id": 47,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "pluginVersion": "9.2.1",
          "targets": [
            {
              "datasource": {
                "type": "grafana-clickhouse-datasource",
                "uid": "${DS_GCP_- PROD TEST}"
              },
              "format": 1,
              "meta": {
                "builderOptions": {
                  "fields": [],
                  "limit": 100,
                  "mode": "list"
                }
              },
              "queryType": "sql",
              "rawSql": "SELECT  sum(queue_size) as queue_first_era, $__timeInterval(timestamp) as time\nFROM hydro.logs\nWHERE $__timeFilter_ms(timestamp) \nAND app = 'merge-head'\nAND $__conditionalAll(project_name IN (${project}), $project)\nAND $__conditionalAll(table_name IN (${table}), $table)\nAND era = 'first'\nGROUP BY time\nORDER BY time  DESC\nSETTINGS hdx_query_max_timerange_sec=604800, hdx_query_max_execution_time=60,hdx_query_admin_comment='${__user.login}'",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "grafana-clickhouse-datasource",
                "uid": "${DS_GCP_- PROD TEST}"
              },
              "format": 1,
              "hide": false,
              "meta": {
                "builderOptions": {
                  "fields": [],
                  "limit": 100,
                  "mode": "list"
                }
              },
              "queryType": "sql",
              "rawSql": "SELECT  sum(queue_size) as queue_second_era, $__timeInterval(timestamp) as time\nFROM hydro.logs\nWHERE $__timeFilter_ms(timestamp) \nAND app = 'merge-head'\nAND $__conditionalAll(project_name IN (${project}), $project)\nAND $__conditionalAll(table_name IN (${table}), $table)\nAND era = 'second'\nGROUP BY time\nORDER BY time  DESC\nSETTINGS hdx_query_max_timerange_sec=604800, hdx_query_max_execution_time=60,hdx_query_admin_comment='${__user.login}'",
              "refId": "B"
            },
            {
              "datasource": {
                "type": "grafana-clickhouse-datasource",
                "uid": "${DS_GCP_- PROD TEST}"
              },
              "format": 1,
              "hide": false,
              "meta": {
                "builderOptions": {
                  "fields": [],
                  "limit": 100,
                  "mode": "list"
                }
              },
              "queryType": "sql",
              "rawSql": "SELECT  sum(queue_size) as queue_third_era, $__timeInterval(timestamp) as time\nFROM hydro.logs\nWHERE $__timeFilter_ms(timestamp) \nAND app = 'merge-head'\nAND $__conditionalAll(project_name IN (${project}), $project)\nAND $__conditionalAll(table_name IN (${table}), $table)\nAND era = 'third'\nGROUP BY time\nORDER BY time  DESC\nSETTINGS hdx_query_max_timerange_sec=604800, hdx_query_max_execution_time=60,hdx_query_admin_comment='${__user.login}'",
              "refId": "C"
            }
          ],
          "title": "Queue Size per era",
          "type": "timeseries"
        }
      ],
      "title": "Queue Size",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": {
        "type": "prometheus",
        "uid": "RZvikJ8nk"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 9,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of successful merge per table.\nThis means we actively merged partitions successfully for the table",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 11
          },
          "hiddenSeries": false,
          "id": 11,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (table_name) (increase(merge_success{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Success Count for Table: {{table_name}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Success by Table",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3083",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3084",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of failed merge per table.\nThis means we failed to merged partitions for the table",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 11
          },
          "hiddenSeries": false,
          "id": 12,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (table_name) (increase(merge_failure{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Failure Count for Table: {{table_name}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Failure Rate by Table",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3161",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3162",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of successful merge per merge peer.\nThis means we actively merged partitions successfully for the merge peer",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 19
          },
          "hiddenSeries": false,
          "id": 13,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (instance) (increase(merge_success{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Success Count for Instance: {{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Success by Instance",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3317",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3318",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of failed merge per merge peer.\nThis means we failed to merged partitions for the merge peer",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 19
          },
          "hiddenSeries": false,
          "id": 14,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (instance) (increase(merge_failure{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Failure Count for Instance: {{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Failure by Instance",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3239",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3240",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of successful merge per merge peer.\nThis means we actively merged partitions successfully for the merge peer",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 27
          },
          "hiddenSeries": false,
          "id": 44,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (app) (increase(merge_success{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Success Count for Pool: {{app}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Success by Pool",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3317",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3318",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GCP_- PROD TEST PROM}"
          },
          "description": "Increase of failed merge per merge peer.\nThis means we failed to merged partitions for the merge peer",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 27
          },
          "hiddenSeries": false,
          "id": 45,
          "legend": {
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "9.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "${DS_GCP_- PROD TEST PROM}"
              },
              "editorMode": "code",
              "exemplar": true,
              "expr": "sum by (app) (increase(merge_failure{instance=~\"^$mergepeer.*\",project_name=~\"$project\",table_name=~\"$table\", app=~\"$pool_name.*\"}[$__rate_interval]))",
              "interval": "",
              "legendFormat": "Merge Failure Count for Pool: {{app}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Merge Failure by Pool",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:3239",
              "format": "short",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:3240",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        }
      ],
      "title": "Merge Success and Failure",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 35,
      "panels": [
        {
          "datasource": {
            "type": "grafana-clickhouse-datasource",
            "uid": "${DS_GCP_- PROD TEST}"
          },
          "gridPos": {
            "h": 14,
            "w": 24,
            "x": 0,
            "y": 12
          },
          "id": 37,
          "options": {
            "dedupStrategy": "none",
            "enableLogDetails": true,
            "prettifyLogMessage": false,
            "showCommonLabels": false,
            "showLabels": false,
            "showTime": true,
            "sortOrder": "Descending",
            "wrapLogMessage": true
          },
          "targets": [
            {
              "datasource": {
                "type": "grafana-clickhouse-datasource",
                "uid": "${DS_GCP_- PROD TEST}"
              },
              "expand": true,
              "format": 0,
              "meta": {
                "builderOptions": {
                  "fields": [],
                  "limit": 100,
                  "mode": "list"
                }
              },
              "queryType": "sql",
              "rawSql": "SELECT\r\n    timestamp as time,\r\n    message,\r\n    level,\r\n    file,\r\n    container,\r\n    app,\r\n    accurateCastOrNull(catchall,'String') as catchall,\r\n    error,\r\n    accurateCastOrNull(queue_size, 'String') as `queue_size`,\r\n    kubernetes.container_id,\r\nkubernetes.container_image,\r\nkubernetes.container_name,\r\naccurateCastOrNull(kubernetes.namespace_labels,'String') as `kubernetes.namespace_labels`,\r\naccurateCastOrNull(kubernetes.pod_annotations,'String') as `kubernetes.pod_annotations`,\r\nkubernetes.pod_ip,\r\naccurateCastOrNull(kubernetes.pod_ips,'String') as `kubernetes.pod_ips`,\r\naccurateCastOrNull(kubernetes.pod_labels,'String') as `kubernetes.pod_labels`,\r\nkubernetes.pod_name,\r\nkubernetes.pod_namespace,\r\nkubernetes.pod_node_name,\r\nkubernetes.pod_owner,\r\nkubernetes.pod_uid,\r\naccurateCastOrNull(original_timestamp,'String') as `original_timestamp`,\r\n    `project_id`,\r\n    source_type,\r\n    stream,\r\n    `table_id`\r\nFROM\r\n    hydro.logs\r\nWHERE\r\n    $__timeFilter(timestamp)\r\n    AND (\r\n  if('${search:text}' = '', true, message ILIKE '%${search}%') \r\n  OR if('${search:text}' = '', true, error ILIKE '%${search}%') \r\n  OR if('${search:text}' = '', true, exception ILIKE '%${search}%')\r\n  OR if('${search:text}' = '', true, query ILIKE '%${search}%')\r\n  )\r\n    AND app='merge-head'\r\n    AND $__conditionalAll(level IN (${level}), $level)\r\nORDER BY\r\n    time DESC\r\nLIMIT\r\n1000\r\nSETTINGS hdx_query_max_timerange_sec=604800, hdx_query_max_execution_time=60,hdx_query_admin_comment='${__user.login}'",
              "refId": "A"
            }
          ],
          "title": "Merge-Head (Logs)",
          "type": "logs"
        }
      ],
      "title": "Merge-Head (Logs)",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 12
      },
      "id": 29,
      "panels": [
        {
          "datasource": {
            "type": "grafana-clickhouse-datasource",
            "uid": "${DS_GCP_- PROD TEST}"
          },
          "gridPos": {
            "h": 14,
            "w": 24,
            "x": 0,
            "y": 13
          },
          "id": 33,
          "options": {
            "dedupStrategy": "none",
            "enableLogDetails": true,
            "prettifyLogMessage": false,
            "showCommonLabels": false,
            "showLabels": false,
            "showTime": true,
            "sortOrder": "Descending",
            "wrapLogMessage": true
          },
          "targets": [
            {
              "datasource": {
                "type": "grafana-clickhouse-datasource",
                "uid": "${DS_GCP_- PROD TEST}"
              },
              "expand": true,
              "format": 0,
              "meta": {
                "builderOptions": {
                  "fields": [],
                  "limit": 100,
                  "mode": "list"
                }
              },
              "queryType": "sql",
              "rawSql": "SELECT\r\n    timestamp as time,\r\n    message,\r\n    level,\r\n    attrs.ACL,\r\n    container,\r\n    accurateCastOrNull(original_timestamp,'String') as original_timestamp,\r\n    attrs.Bucket,\r\n    accurateCastOrNull(attrs.CRC32C, 'String') as `attrs.CRC32C`,\r\n    attrs.CacheControl,\r\n    attrs.ContentDisposition,\r\n    attrs.ContentEncoding,\r\n    attrs.ContentLanguage,\r\n    attrs.ContentType,\r\n    accurateCastOrNull(attrs.Created, 'String') as `attrs.Created`,\r\n    accurateCastOrNull(attrs.CustomTime, 'String') as `attrs.CustomTime`,\r\n    attrs.CustomerKeySHA256,\r\n    accurateCastOrNull(attrs.Deleted, 'String') as `attrs.Deleted`,\r\n    attrs.Etag,\r\n    accurateCastOrNull(attrs.EventBasedHold, 'String') as `attrs.EventBasedHold`,\r\n    accurateCastOrNull(attrs.Generation, 'String') as `attrs.Generation`,    \r\n    attrs.KMSKeyName,\r\n    attrs.MD5,\r\n    attrs.MediaLink,\r\n    attrs.Metadata,\r\n    accurateCastOrNull(attrs.Metageneration, 'String') as `attrs.Metageneration`,\r\n    attrs.Name,\r\n    attrs.Owner,\r\n    attrs.PredefinedACL,\r\n    attrs.Prefix,\r\n    accurateCastOrNull(attrs.RetentionExpirationTime, 'String') as `attrs.RetentionExpirationTime`,\r\n    accurateCastOrNull(attrs.Size, 'String') as `attrs.Size`,\r\n    attrs.StorageClass,\r\n    accurateCastOrNull(attrs.TemporaryHold, 'String') as `attrs.TemporaryHold`,\r\n    accurateCastOrNull(attrs.Updated, 'String') as `attrs.Updated`,\r\n    accurateCastOrNull(catchall, 'String') as catchall,\r\n    command.Args,\r\n    command.Dir,\r\n    command.Env,\r\n    command.ExtraFiles,\r\n    command.Path,\r\n    command.Process,\r\n    command.ProcessState,\r\n    command.Stderr,\r\n    command.Stdin,\r\n    command.Stdout,\r\n    command.SysProcAttr,\r\n    config,\r\n    `data_paths`,\r\n    destination,\r\n    error,\r\n    file,\r\n    filename,\r\n    accurateCastOrNull(files, 'String') as files,\r\n    ini,\r\n    `kubernetes.container_id`,\r\n    `kubernetes.container_image`,\r\n    `kubernetes.container_name`,\r\n    accurateCastOrNull(kubernetes.namespace_labels, 'String') as `kubernetes.namespace_labels`,\r\n    accurateCastOrNull(kubernetes.pod_annotations, 'String') as `kubernetes.pod_annotations`,\r\n    kubernetes.pod_ip,\r\n    accurateCastOrNull(kubernetes.pod_ips, 'String') as `kubernetes.pod_ips`,\r\n    accurateCastOrNull(kubernetes.pod_labels, 'String') as `kubernetes.pod_labels`,\r\n    `kubernetes.pod_name`,\r\n    `kubernetes.pod_namespace`,\r\n    `kubernetes.pod_node_name`,\r\n    `kubernetes.pod_owner`,\r\n    `kubernetes.pod_uid`,\r\n    `log.component`,\r\n    `log.level`,\r\n    `log.message`,\r\n    accurateCastOrNull(`log.timestamp`,'String') as `log.timestamp`,\r\n    `project_id`,\r\n    accurateCastOrNull(result.columns, 'String') as `result.columns`,\r\n    accurateCastOrNull(result.max_timestamp, 'String') as `max_timestamp`,\r\n    accurateCastOrNull(result.mem_size, 'String') as `mem_size`,\r\n    accurateCastOrNull(result.min_timestamp, 'String') as `min_timestamp`,\r\n    result.partition,\r\n    accurateCastOrNull(result.rows, 'String') as `result.rows`,\r\n    accurateCastOrNull(result.stack_trace, 'String') as `result.stack_trace`,\r\n    source,\r\n    accurateCastOrNull(source_size, 'String') as `source_size`,\r\n    `source_type`,\r\n    stream,\r\n    `table_id`\r\nFROM\r\n    hydro.logs\r\nWHERE\r\n    $__timeFilter(timestamp)\r\n  AND (\r\n  if('${search:text}' = '', true, message ILIKE '%${search}%') \r\n  OR if('${search:text}' = '', true, error ILIKE '%${search}%') \r\n  OR if('${search:text}' = '', true, exception ILIKE '%${search}%')\r\n  OR if('${search:text}' = '', true, query ILIKE '%${search}%')\r\n  )\r\n  AND app='merge-peer'\r\n  AND $__conditionalAll(level IN (${level}), $level)\r\n  AND $__conditionalAll(kubernetes.pod_ip IN (${mergepeer}), $mergepeer)\r\nORDER BY\r\n    time DESC\r\nLIMIT\r\n1000\r\nSETTINGS hdx_query_max_timerange_sec=604800, hdx_query_max_execution_time=60,hdx_query_admin_comment='${__user.login}'",
              "refId": "A"
            }
          ],
          "title": "Merge-Peer (Logs)",
          "type": "logs"
        }
      ],
      "title": "Merge-Peer (Logs)",
      "type": "row"
    }
  ],
  "refresh": "",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GCP_- PROD TEST PROM}"
        },
        "definition": "label_values(merge_success, app)",
        "description": "Instance running the merge service",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "pool_name",
        "options": [],
        "query": {
          "query": "label_values(merge_success, app)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GCP_- PROD TEST PROM}"
        },
        "definition": "label_values(merge_success{app=~\"$pool_name.*\"}, instance)",
        "description": "Instance running the merge service",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "mergepeer",
        "options": [],
        "query": {
          "query": "label_values(merge_success{app=~\"$pool_name.*\"}, instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "/([^:]+):.*/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GCP_- PROD TEST PROM}"
        },
        "definition": "label_values(merge_success{instance=~\"$mergepeer.*\", app=~\"$pool_name.*\"}, project_name)",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "project",
        "options": [],
        "query": {
          "query": "label_values(merge_success{instance=~\"$mergepeer.*\", app=~\"$pool_name.*\"}, project_name)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GCP_- PROD TEST PROM}"
        },
        "definition": "label_values(merge_success{instance=~\"$mergepeer.*\", project_name=~\"$project\", app=~\"$pool_name.*\"}, table_name)",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "table",
        "options": [],
        "query": {
          "query": "label_values(merge_success{instance=~\"$mergepeer.*\", project_name=~\"$project\", app=~\"$pool_name.*\"}, table_name)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "grafana-clickhouse-datasource",
          "uid": "${DS_GCP_- PROD TEST}"
        },
        "definition": "SELECT arrayJoin( ['info','warning','warn','error','debug','trace'])",
        "hide": 0,
        "includeAll": true,
        "label": "Level (Logs)",
        "multi": true,
        "name": "level",
        "options": [],
        "query": "SELECT arrayJoin( ['info','warning','warn','error','debug','trace'])",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "hide": 0,
        "label": "Search (Logs)",
        "name": "search",
        "options": [
          {
            "selected": true,
            "text": "",
            "value": ""
          }
        ],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Hydrolix - Merge",
  "uid": "d7Siayk4k",
  "version": 14,
  "weekStart": ""
}