{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 100,
      "panels": [],
      "title": "1. Подписки",
      "type": "row"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Количество запусков подписок, завершившихся ошибкой за выбранный период. Считается по ExecutionLog3: записи с RequestType='Subscription' и статусом, отличным от rsSuccess. Ненулевое значение (красный фон) означает, что часть запланированных рассылок не доставлена — требуется разбор. Реагирует на временной диапазон дашборда.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 0,
        "y": 1
      },
      "id": 101,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) AS failed\nFROM ReportServer.dbo.Subscriptions_utc s\nWHERE s.LastRunTimeUtc BETWEEN $__timeFrom() AND $__timeTo()\n  AND EXISTS (\n        SELECT 1\n        FROM ReportServer.dbo.SubscriptionHistory_utc sh\n        WHERE sh.SubscriptionID = s.SubscriptionID\n          AND sh.Status > 0\n          AND sh.StartTimeUtc BETWEEN $__timeFrom() AND $__timeTo()\n  );",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Сбои подписок (за период)",
      "type": "stat"
    },
    {
      "datasource": {
        "uid": "${DS_MSSQL}",
        "type": "mssql"
      },
      "description": "Количество ошибочных выполнений отчётов (не подписок) за выбранный период. Источник — ExecutionLog3: RequestType <> 'Subscription' и Status <> 'rsSuccess'. Ненулевое значение (красный фон) — интерактивные/фоновые запуски отчётов завершались ошибкой. Реагирует на диапазон времени дашборда.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 5,
        "y": 1
      },
      "id": 108,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "dataset": "DBA",
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) AS failed_reports\r\nFROM ReportServer.dbo.ExecutionLog3_utc\r\nWHERE RequestType = 'Interactive'\r\n  AND Format NOT IN ('PBIX', 'DataModel')\r\n  AND Format IS NOT NULL\r\n  AND Status <> 'rsSuccess'\r\n  AND $__timeFilter(TimeStartUtc);",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Сбои отчётов (за период)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Число подписок, чей владелец (OwnerID) не находится в таблице Users. Возникает, когда учётная запись владельца удалена из AD/системы, а подписка осталась. Такие подписки обычно перестают исполняться или исполняются от несуществующего контекста. Оранжевый фон при значении ≥ 1 — нужно переназначить владельца или удалить подписку.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 10,
        "y": 1
      },
      "id": 102,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) AS orphaned\nFROM ReportServer.dbo.Subscriptions s\nLEFT JOIN ReportServer.dbo.Users u ON u.UserID = s.OwnerID \nWHERE u.UserID IS NULL OR u.UserName IS NULL and s.inactiveFlags=0 and s.EventType<>'DataModelRefresh';",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Подписки без владельца",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Подписки, у которых последний запуск (LastRunTime) был более 336 часов назад. Порог рассчитан на 2х недельные рассылки: если подписка не запускалась  стоит обратить внимание на расписание или задание SQL Agent не отработало. ",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "orange",
                "value": 1
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 15,
        "y": 1
      },
      "id": 103,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) AS stale\nFROM ReportServer.dbo.Subscriptions s\nWHERE s.LastRunTime < DATEADD(hour, -336, GETDATE()) and s.inactiveFlags=0 and s.EventType<>'DataModelRefresh';",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Зависшие подписки (>2х недель без запуска)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Общее количество подписок в системе (все строки таблицы Subscriptions). Справочный показатель для оценки масштаба и отслеживания резких изменений — например, массового удаления или появления подписок.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "blue",
            "mode": "palette-classic"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 19,
        "y": 1
      },
      "id": 104,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT Count (deliveryExtension) as [Общее количество] FROM ReportServer.dbo.Subscriptions where deliveryExtension is not null",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        },
        {
          "dataset": "DBA",
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT distinct deliveryExtension, Count (deliveryExtension) FROM ReportServer.dbo.Subscriptions group by deliveryExtension having deliveryExtension is not null",
          "refId": "B",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Всего подписок",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Динамика числа неуспешных запусков подписок и отчетов, сгруппированная по часам. \n\nСтолбики показывают, когда именно происходили сбои , каков характер и их количество .\nИсточник тот же: ExecutionLog3.\n\nЗеленый столбик - это сбой при инициацими подписки и рассылки по расписанию\n\nЖелтый столбик - сбой при открытии отчета RDL (стандартного отчета SSRS)\n\nСиний столбик - сбой при открытии в вэб интерфейсе отчета PBIX (PowerBI)\n\nОранжевый столбик - сбой при обновлении данных при получении отчета PBIX или при рассылке если рассылка на основе отчета PBIX (поэтому часто можно увидеть зеленые и оранжевые столбики одновременно)\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "type": "linear"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 6
      },
      "id": 105,
      "options": {
        "barRadius": 0,
        "barWidth": 1,
        "fullHighlight": false,
        "groupWidth": 0.81,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "orientation": "auto",
        "showValue": "auto",
        "stacking": "none",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "time_series",
          "rawQuery": true,
          "rawSql": "SELECT\n    $__timeGroup(ts, '$__interval') AS time,\n    SUM(CASE WHEN cls = 'sub'       THEN 1 ELSE 0 END) AS [Подписки],\n    SUM(CASE WHEN cls = 'rdl'       THEN 1 ELSE 0 END) AS [Отчёты .rdl],\n    SUM(CASE WHEN cls = 'pbix_open' THEN 1 ELSE 0 END) AS [Открытия .pbix],\n    SUM(CASE WHEN cls = 'refresh'   THEN 1 ELSE 0 END) AS [Обновления данных .pbix]\nFROM (\n    -- Подписки: из SubscriptionHistory_utc, время уже UTC\n    SELECT sh.StartTimeUtc AS ts, 'sub' AS cls\n    FROM ReportServer.dbo.SubscriptionHistory_utc sh\n    WHERE sh.Status > 0\n      AND $__timeFilter(sh.StartTimeUtc)\n\n    UNION ALL\n\n    SELECT e.TimeStartUtc AS ts, 'rdl' AS cls\n    FROM ReportServer.dbo.ExecutionLog3_utc e\n    WHERE e.Status <> 'rsSuccess'\n      AND e.RequestType = 'Interactive'\n      AND e.Format NOT IN ('PBIX','DataModel')\n      AND e.Format IS NOT NULL\n      AND $__timeFilter(e.TimeStartUtc)\n\n    UNION ALL\n\n    SELECT e.TimeStartUtc AS ts, 'pbix_open' AS cls\n    FROM ReportServer.dbo.ExecutionLog3_utc e\n    WHERE e.Status <> 'rsSuccess'\n      AND e.Format = 'PBIX'\n      AND e.ItemAction = 'ConceptualSchema'\n      AND $__timeFilter(e.TimeStartUtc)\n\n    UNION ALL\n\n    SELECT e.TimeStartUtc AS ts, 'refresh' AS cls\n    FROM ReportServer.dbo.ExecutionLog3_utc e\n    WHERE e.Status <> 'rsSuccess'\n      AND e.RequestType = 'Refresh Cache'\n      AND $__timeFilter(e.TimeStartUtc)\n) x\nGROUP BY $__timeGroup(ts, '$__interval')\nORDER BY 1;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Сбои подписок и отчетов по времени",
      "type": "barchart"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Число выполнений отчётов по интервалам времени (все записи ExecutionLog3 за период). Показывает нагрузку на PBIRS и пиковые часы. В сочетании с графиком фаз помогает отличить «медленно из-за самого отчёта» от «медленно из-за высокой одновременной нагрузки». Фильтруется переменной «Путь отчёта».",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "bars",
            "fillOpacity": 46,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Объём записи моделей PBIX"
            },
            "properties": [
              {
                "id": "custom.lineInterpolation",
                "value": "linear"
              },
              {
                "id": "custom.axisPlacement",
                "value": "right"
              },
              {
                "id": "custom.axisLabel",
                "value": "Объём записи моделей PBIX"
              },
              {
                "id": "unit",
                "value": "kbytes"
              },
              {
                "id": "custom.drawStyle",
                "value": "line"
              },
              {
                "id": "custom.lineInterpolation",
                "value": "smooth"
              },
              {
                "id": "custom.fillOpacity",
                "value": 7
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 6
      },
      "id": 202,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "time_series",
          "rawQuery": true,
          "rawSql": "SELECT\n    $__timeGroup(TimeStartUtc, '$__interval') AS time,\n    SUM(CASE WHEN RequestType IN ('Interactive','Subscription')\n                  AND Format NOT IN ('PBIX','DataModel')\n                  AND Format IS NOT NULL\n             THEN 1 ELSE 0 END) AS [Отчёты .rdl],\n    SUM(CASE WHEN Format = 'PBIX' AND ItemAction = 'ConceptualSchema'\n             THEN 1 ELSE 0 END) AS [Открытия отчетов .pbix]\nFROM ReportServer.dbo.ExecutionLog3_utc \nWHERE $__timeFilter(TimeStartUtc)\n  AND ('$report' = '__ALL__' OR ItemPath = '$report')\nGROUP BY $__timeGroup(TimeStartUtc, '$__interval')\nORDER BY 1;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        },
        {
          "dataset": "DBA",
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT\r\n    $__timeGroup(TimeStartUtc, '$__interval', 0) AS time,\r\n    SUM(CAST(ByteCount AS BIGINT)) AS [Объём записи моделей PBIX]\r\nFROM ReportServer.dbo.ExecutionLog3_utc\r\nWHERE RequestType = 'Refresh Cache'\r\n  AND Status = 'rsSuccess'\r\n  AND ItemAction = 'SaveToCatalog'\r\n  AND $__timeFilter(TimeStartUtc)\r\nGROUP BY $__timeGroup(TimeStartUtc, '$__interval', 0)\r\nORDER BY 1;",
          "refId": "B",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Количество выполнений",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Отчёты (не подписки), у которых за выбранный период были ошибочные выполнения. Источник — ExecutionLog3, RequestType <> 'Subscription'. Сгруппировано по отчёту. Поля: Путь отчёта; Ошибок — число ошибочных выполнений за период; Выполнений — всего запусков; Последняя ошибка — время последнего сбоя; Типы ошибок — перечень кодов Status. Сортировка по числу ошибок убыванию.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": true,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Ошибок"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "orange",
                      "value": 0
                    },
                    {
                      "color": "red",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 90
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Путь отчёта"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 396
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Выполнений"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 73
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Описание"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 89
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 12,
        "x": 0,
        "y": 14
      },
      "id": 109,
      "options": {
        "cellHeight": "sm",
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Выполнений"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT\n    c.Path           AS ReportPath,\n    uc.UserName      AS Owner,\n    um.UserName      AS ModifiedBy,\n    c.Description,\n    agg.Errors,\n    agg.Executions,\n    agg.LastError,\n    lu.LastErrorUser,\n    agg.ErrorTypes\nFROM ReportServer.dbo.[Catalog] c\nINNER JOIN (\n    SELECT\n        e.ItemPath,\n        SUM(CASE WHEN e.Status <> 'rsSuccess' THEN 1 ELSE 0 END) AS Errors,\n        COUNT(*) AS Executions,\n        MAX(CASE WHEN e.Status <> 'rsSuccess' THEN e.TimeStartUtc END) AS LastError,\n        STRING_AGG(CASE WHEN e.Status <> 'rsSuccess' THEN e.Status END, ', ') AS ErrorTypes\n    FROM ReportServer.dbo.ExecutionLog3_utc e\n    WHERE e.RequestType = 'Interactive'\n      AND e.Format NOT IN ('PBIX', 'DataModel')\n      AND e.Format IS NOT NULL\n      AND e.TimeStartUtc BETWEEN $__timeFrom() AND $__timeTo()\n      AND ('$report' = '__ALL__' OR e.ItemPath = '$report')\n    GROUP BY e.ItemPath\n    HAVING SUM(CASE WHEN e.Status <> 'rsSuccess' THEN 1 ELSE 0 END) > 0\n) agg ON agg.ItemPath = c.Path\nCROSS APPLY (\n    SELECT TOP 1 le.UserName AS LastErrorUser\n    FROM ReportServer.dbo.ExecutionLog3_utc le\n    WHERE le.ItemPath = agg.ItemPath\n      AND le.Status <> 'rsSuccess'\n      AND le.RequestType = 'Interactive'\n      AND le.Format NOT IN ('PBIX', 'DataModel')\n      AND le.Format IS NOT NULL\n      AND le.TimeStartUtc BETWEEN $__timeFrom() AND $__timeTo()\n    ORDER BY le.TimeStartUtc DESC\n) lu\nLEFT JOIN ReportServer.dbo.Users uc ON uc.UserID = c.CreatedByID\nLEFT JOIN ReportServer.dbo.Users um ON um.UserID = c.ModifiedByID\nORDER BY agg.Errors DESC;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Зафейленные отчёты",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "includeByName": {},
            "indexByName": {},
            "renameByName": {
              "Description": "Описание",
              "ErrorTypes": "Типы ошибок",
              "Errors": "Ошибок",
              "Executions": "Выполнений",
              "LastError": "Последняя ошибка",
              "LastErrorUser": "Пользователь",
              "ModifiedBy": "Изменил",
              "Owner": "Владелец",
              "ReportPath": "Путь отчёта"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Подписки, у которых за выбранный период были ошибки доставки. Источник — Subscriptions + агрегаты из SubscriptionHistory. Поля: Путь отчёта, Владелец, Изменил, Описание, Последний статус, Последний запуск, Тип события, Ошибок (период) — число ошибок за выбранный диапазон дашборда, Ошибок (всего) — за всю историю подписки. Клик по любой ячейке открывает в новой вкладке историю этой подписки. Период берётся из выбранного диапазона времени дашборда.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": true,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "links": [
            {
              "targetBlank": true,
              "title": "Открыть историю подписки",
              "url": "/d/pbirs-sub-history/istoriia-podpiski?var-sub_id=${__data.fields.SubscriptionID}&var-sub_name=${__data.fields.ReportPath}&${__url_time_range}"
            }
          ],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "SubscriptionID"
            },
            "properties": [
              {
                "id": "custom.hideFrom.viz",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Ошибок (всего)"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "orange",
                      "value": 0
                    },
                    {
                      "color": "red",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Ошибок (период)"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background"
                }
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "orange",
                      "value": 0
                    },
                    {
                      "color": "red",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 99
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Тип события"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 111
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Путь отчёта"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 390
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Описание"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 139
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Изменил"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 189
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Владелец"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 152
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 24,
        "w": 12,
        "x": 12,
        "y": 14
      },
      "id": 106,
      "options": {
        "cellHeight": "sm",
        "showHeader": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT\n    s.SubscriptionID,\n    c.Path AS ReportPath,\n    u.UserName AS Owner,\n    u1.UserName AS ModifiedBy,\n    s.Description,\n    s.LastStatus,\n    s.LastRunTimeUtc AS LastRunTime,   -- отдаём UTC, Grafana переведёт в МСК для показа\n    s.EventType,\n    she.ErrorsInPeriod,\n    she.ErrorsTotal\nFROM ReportServer.dbo.Subscriptions_utc s\nJOIN ReportServer.dbo.[Catalog] c ON c.ItemID = s.Report_OID\nLEFT JOIN ReportServer.dbo.Users u  ON u.UserID = s.OwnerID\nLEFT JOIN ReportServer.dbo.Users u1 ON u1.UserID = s.ModifiedByID\nINNER JOIN (\n    SELECT\n        sh.SubscriptionID,\n        SUM(CASE WHEN sh.Status > 0 AND sh.StartTimeUtc BETWEEN $__timeFrom() AND $__timeTo() THEN 1 ELSE 0 END) AS ErrorsInPeriod,\n        SUM(CASE WHEN sh.Status > 0 THEN 1 ELSE 0 END) AS ErrorsTotal\n    FROM ReportServer.dbo.SubscriptionHistory_utc sh\n    GROUP BY sh.SubscriptionID\n) she ON she.SubscriptionID = s.SubscriptionID\nWHERE s.LastRunTimeUtc BETWEEN $__timeFrom() AND $__timeTo()\n  AND she.ErrorsInPeriod > 0\nORDER BY s.LastRunTimeUtc DESC;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Зафейленные подписки",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Description": "Описание",
              "ErrorsInPeriod": "Ошибок (период)",
              "ErrorsTotal": "Ошибок (всего)",
              "EventType": "Тип события",
              "LastRunTime": "Последний запуск",
              "LastStatus": "Последний статус",
              "ModifiedBy": "Изменил",
              "Owner": "Владелец",
              "ReportPath": "Путь отчёта"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Сводная таблица проблемных подписок двух типов. Колонка Проблема: ORPHAN_OWNER — владелец не существует (в Детали указан осиротевший OwnerID); STALE — давно не запускалась (в Детали — сколько часов прошло). Объединяет результаты двух проверок в один список для оперативного разбора. Пересекается с аудитом orphan-подписок в Jira.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": true,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Проблема"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "color-background"
                }
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "ORPHAN_OWNER": {
                        "color": "orange",
                        "index": 0
                      },
                      "STALE": {
                        "color": "red",
                        "index": 1
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Путь отчёта"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 461
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 25
      },
      "id": 107,
      "options": {
        "cellHeight": "sm",
        "showHeader": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT\n    'ORPHAN_OWNER' AS Issue,\n    c.Path AS ReportPath,\n    s.Description,\n    CAST(s.OwnerID AS NVARCHAR(50)) AS Detail,\n    s.LastRunTimeUtc AS LastRunTime,\n    u.UserName  AS Owner,\n    u1.UserName AS ModifiedBy,\n    s.LastStatus\nFROM ReportServer.dbo.Subscriptions_utc s\nJOIN ReportServer.dbo.[Catalog] c ON c.ItemID = s.Report_OID\nLEFT JOIN ReportServer.dbo.Users u  ON u.UserID = s.OwnerID\nLEFT JOIN ReportServer.dbo.Users u1 ON u1.UserID = s.ModifiedByID\nWHERE (u.UserID IS NULL OR u.UserName IS NULL)\n  AND s.InactiveFlags = 0\n  AND s.EventType <> 'DataModelRefresh'\n\nUNION ALL\n\nSELECT\n    'STALE' AS Issue,\n    c.Path AS ReportPath,\n    s.Description,\n    CONCAT(DATEDIFF(hour, s.LastRunTime, GETDATE()), 'h since run') AS Detail,\n    s.LastRunTimeUtc AS LastRunTime,\n    u.UserName  AS Owner,\n    u1.UserName AS ModifiedBy,\n    s.LastStatus\nFROM ReportServer.dbo.Subscriptions_utc s\nJOIN ReportServer.dbo.[Catalog] c ON c.ItemID = s.Report_OID\nLEFT JOIN ReportServer.dbo.Users u  ON u.UserID = s.OwnerID\nLEFT JOIN ReportServer.dbo.Users u1 ON u1.UserID = s.ModifiedByID\nWHERE s.LastRunTime < DATEADD(hour, -336, GETDATE())\n  AND s.InactiveFlags = 0\n  AND s.EventType <> 'DataModelRefresh'\nORDER BY Issue, LastRunTime;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Без владельца и зависшие подписки",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Description": "Описание",
              "Detail": "Детали",
              "Issue": "Проблема",
              "LastRunTime": "Последний запуск",
              "ReportPath": "Путь отчёта"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 38
      },
      "id": 200,
      "panels": [],
      "title": "2. Производительность отчётов",
      "type": "row"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Главный диагностический график производительности. Каждое выполнение отчёта делится на три фазы (мс): Data retrieval — получение данных из источника (включая Oracle через ODP.NET); Processing — обработка движком; Rendering — формирование итогового формата (PDF/Excel/HTML). График стековый, усреднён по интервалам. Рост Data retrieval — узкое место в источнике данных; рост Rendering — в самом отчёте или объёме выгрузки. Учитываются только живые выполнения (Source='Live'), кэш и снапшоты исключены. Фильтруется переменной «Путь отчёта».",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 30,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 39
      },
      "id": 201,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "time_series",
          "rawQuery": true,
          "rawSql": "SELECT\n    $__timeGroup(TimeStartUtc, '10m', 0) AS time,\n    AVG(TimeDataRetrieval) AS [Data retrieval],\n    AVG(TimeProcessing)    AS [Processing],\n    AVG(TimeRendering)     AS [Rendering]\nFROM ReportServer.dbo.ExecutionLog3_utc\nWHERE $__timeFilter(TimeStartUtc)\n  AND Source = 'Live'\n  AND Format NOT IN ('PBIX', 'DataModel')\n  AND Format IS NOT NULL\nGROUP BY $__timeGroup(TimeStartUtc, '10m', 0)\nORDER BY 1;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Среднее время выполнения по фазам (мс)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Рейтинг отчётов по среднему полному времени выполнения за период. \n\nПоля: \nПуть отчёта; \nВыполнений — сколько раз запускался; \nСред. общее (мс) — среднее суммарное время трёх фаз; \nМакс. общее (мс) — худший случай; \nСред. извлечение (мс) — средняя фаза получения данных (для выявления тяжёлых источников);\nСред. КБ — средний размер результата; \nСред. строк — среднее число строк. Только живые выполнения . \nСортировка по среднему времени убыванию — верхние строки первые кандидаты на оптимизацию.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": true,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Сред. общее (мс)"
            },
            "properties": [
              {
                "id": "unit",
                "value": "dtdurationms"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Макс. общее (мс)"
            },
            "properties": [
              {
                "id": "unit",
                "value": "dtdurationms"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Сред. извлечение (мс)"
            },
            "properties": [
              {
                "id": "unit",
                "value": "dtdurationms"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Сред. КБ"
            },
            "properties": [
              {
                "id": "unit",
                "value": "deckbytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Кол-во выполнений"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 126
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 49
      },
      "id": 203,
      "options": {
        "cellHeight": "sm",
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Макс. общее (мс)"
          }
        ]
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT TOP 20\n    agg.ItemPath        AS ReportPath,\n    uc.UserName         AS Owner,\n    um.UserName         AS ModifiedBy,\n    agg.Executions,\n    agg.AvgTotalMs,\n    agg.MaxTotalMs,\n    agg.AvgDataMs,\n    agg.AvgKB,\n    agg.AvgRows\nFROM (\n    SELECT\n        ItemPath,\n        COUNT(*) AS Executions,\n        AVG(TimeDataRetrieval + TimeProcessing + TimeRendering) AS AvgTotalMs,\n        MAX(TimeDataRetrieval + TimeProcessing + TimeRendering) AS MaxTotalMs,\n        AVG(TimeDataRetrieval) AS AvgDataMs,\n        AVG(ByteCount) / 1024 AS AvgKB,\n        AVG(CAST([RowCount] AS BIGINT)) AS AvgRows\n    FROM ReportServer.dbo.ExecutionLog3_utc\n    WHERE $__timeFilter(TimeStartUtc)\n      AND Source = 'Live'\n      AND Format NOT IN ('PBIX', 'DataModel')\n      AND Format IS NOT NULL\n      AND ('$report' = '__ALL__' OR ItemPath = '$report')\n    GROUP BY ItemPath\n) agg\nLEFT JOIN ReportServer.dbo.[Catalog] c  ON c.Path = agg.ItemPath\nLEFT JOIN ReportServer.dbo.Users uc     ON uc.UserID = c.CreatedByID\nLEFT JOIN ReportServer.dbo.Users um     ON um.UserID = c.ModifiedByID\nORDER BY agg.AvgTotalMs DESC;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Топ-20 самых медленных отчётов",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "includeByName": {},
            "indexByName": {},
            "renameByName": {
              "AvgDataMs": "Сред. извлечение (мс)",
              "AvgKB": "Сред. КБ",
              "AvgRows": "Сред. строк",
              "AvgTotalMs": "Сред. общее (мс)",
              "Executions": "Кол-во выполнений",
              "MaxTotalMs": "Макс. общее (мс)",
              "ModifiedBy": "Модифицировал",
              "Owner": "Создатель",
              "ReportPath": "Путь отчёта/Название"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 58
      },
      "id": 300,
      "panels": [],
      "title": "3. Доступность / scale-out",
      "type": "row"
    },
    {
      "datasource": {
        "type": "mssql",
        "uid": "${DS_MSSQL}"
      },
      "description": "Количество серверов в ферме PBIRS scale-out по таблице Keys (серверные ключи, Client=0). Ожидаемое значение — 2 (зелёный); меньше — узел выпал из фермы или не зарегистрирован, что нарушает балансировку и отказоустойчивость. Это состояние из базы конфигурации, а не доступность веб-сервиса — для проверки «жив ли HTTP» нужен отдельный endpoint healthz.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "green",
                "value": 2
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 59
      },
      "id": 301,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "percentChangeColorMode": "standard",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showPercentChange": false,
        "textMode": "auto",
        "wideLayout": true
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "mssql",
            "uid": "${DS_MSSQL}"
          },
          "editorMode": "code",
          "format": "table",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(*) AS scaleout_nodes\nFROM ReportServer.dbo.Keys\nWHERE MachineName IS NOT NULL;",
          "refId": "A",
          "sql": {
            "columns": [
              {
                "parameters": [],
                "type": "function"
              }
            ],
            "groupBy": [
              {
                "property": {
                  "type": "string"
                },
                "type": "groupBy"
              }
            ],
            "limit": 50
          }
        }
      ],
      "title": "Узлы фермы scale-out",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Метрика up из windows_exporter по двум RS-нодам (srv-rs-01/02). Значение 1 — экспортёр на узле отвечает, метрики собираются; 0 — узел или экспортёр недоступен. Косвенный, но быстрый индикатор живости серверов. Не отражает состояние службы PBIRS отдельно — только то, что хост и агент мониторинга на связи.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "stepAfter",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 7,
        "x": 6,
        "y": 59
      },
      "id": 302,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "up{instance=~\"$rs_instance\"}",
          "format": "time_series",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Доступность узлов RS (windows_exporter)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "RAM"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              },
              {
                "id": "custom.width",
                "value": 105
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Uptime"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              },
              {
                "id": "custom.width",
                "value": 162
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 254
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "hostname"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 258
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "instance"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 294
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "product"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 275
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "version"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 139
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "CPU"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 69
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 11,
        "x": 13,
        "y": 59
      },
      "id": 407,
      "options": {
        "cellHeight": "sm",
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "exemplar": false,
          "expr": "last_over_time(windows_os_info{instance=~\"$rs_instance\"}[1h])",
          "format": "table",
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "last_over_time(windows_cs_logical_processors{instance=~\"$rs_instance\"}[1h])",
          "format": "table",
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "last_over_time(windows_cs_physical_memory_bytes{instance=~\"$rs_instance\"}[1h])",
          "format": "table",
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "C"
        },
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "time() - last_over_time(windows_system_boot_time_timestamp_seconds{instance=~\"$rs_instance\"}[1h])",
          "format": "table",
          "instant": true,
          "legendFormat": "__auto",
          "range": false,
          "refId": "D"
        }
      ],
      "title": "Пасопрт нод",
      "transformations": [
        {
          "id": "joinByField",
          "options": {
            "byField": "instance",
            "mode": "outerTabular"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time 1": true,
              "Time 2": true,
              "Time 3": true,
              "Time 4": true,
              "Value #A": true,
              "__name__ 1": true,
              "__name__ 2": true,
              "__name__ 3": true,
              "build_number": true,
              "env 1": true,
              "env 2": true,
              "env 3": true,
              "env 4": true,
              "hostname 1": false,
              "hostname 2": true,
              "hostname 3": true,
              "hostname 4": true,
              "job 1": true,
              "job 2": true,
              "job 3": true,
              "job 4": true,
              "major_version": true,
              "minor_version": true,
              "project 1": true,
              "project 2": true,
              "project 3": true,
              "project 4": true,
              "revision": true,
              "servicename 1": true,
              "servicename 2": true,
              "servicename 3": true,
              "servicename 4": true,
              "tags 1": true,
              "tags 2": true,
              "tags 3": true,
              "tags 4": true
            },
            "includeByName": {},
            "indexByName": {},
            "orderBy": [
              {
                "desc": true,
                "type": "name"
              }
            ],
            "orderByMode": "manual",
            "renameByName": {
              "Time 3": "",
              "Value #B": "CPU",
              "Value #C": "RAM",
              "Value #D": "Uptime",
              "hostname 1": "Хост",
              "instance": "Инстанс",
              "product": "Операционная система",
              "project 1": "",
              "tags 1": "",
              "tags 3": "",
              "tags 4": "",
              "version": "Версия ОС"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 64
      },
      "id": 400,
      "panels": [],
      "title": "4. Ресурсы узлов RS",
      "type": "row"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Процент загрузки процессора на RS-нодах: 100 минус доля времени простоя (idle) по windows_cpu_time_total, усреднение по всем ядрам узла. Помогает увидеть, упирается ли генерация отчётов и подписок в процессор. Фильтруется переменной «Узел RS».",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 9,
        "x": 0,
        "y": 65
      },
      "id": 401,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(1 - avg by (instance) (rate(windows_cpu_time_total{mode=\"idle\", instance=~\"$rs_instance\"}[$__rate_interval]))) * 100",
          "format": "time_series",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Загрузка CPU %",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Доля занятой физической памяти на RS-нодах: (всего − свободно) / всего × 100, по метрикам windows_cs_physical_memory_bytes и windows_os_physical_memory_free_bytes. Высокие устойчивые значения указывают на дефицит RAM, критичный для рендеринга крупных отчётов. Фильтруется переменной «Узел RS».",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 9,
        "y": 65
      },
      "id": 402,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "(windows_cs_physical_memory_bytes{instance=~\"$rs_instance\"} - windows_os_physical_memory_free_bytes{instance=~\"$rs_instance\"}) / windows_cs_physical_memory_bytes{instance=~\"$rs_instance\"} * 100",
          "format": "time_series",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Использование памяти %",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Средняя задержка одной дисковой операции (чтение и запись суммарно) на локальных томах серверов отчётов (RS-ноды). \n\nРастёт при тяжёлом рендеринге крупных .rdl-отчётов, активной работе с temp-каталогом и кэшем, а также при фоновом обновлении моделей. \n\nНормальные значения для SSD — единицы миллисекунд; десятки и сотни мс означают, что диск ноды перегружен или деградирует, что замедляет генерацию отчётов. \n\nОтражает только локальные диски RS-нод (где работает служба PBIRS), но не диски сервера БД ReportServer — это отдельная машина. \n\nМетрика по каждому тому и каждой ноде отображена отдельно.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 65
      },
      "id": 406,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "rate(windows_logical_disk_read_write_latency_seconds_total{instance=~\"$rs_instance\", volume=~\"[A-Z]:\"}[$__rate_interval])\r\n/\r\nclamp_min(\r\n  rate(windows_logical_disk_reads_total{instance=~\"$rs_instance\", volume=~\"[A-Z]:\"}[$__rate_interval])\r\n  +\r\n  rate(windows_logical_disk_writes_total{instance=~\"$rs_instance\", volume=~\"[A-Z]:\"}[$__rate_interval]),\r\n  1\r\n)",
          "format": "time_series",
          "legendFormat": "{{instance}} {{volume}} read/write",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Задержка диска (ms), RS-ноды",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "В основе движка PBIX отчетов лежит Analysis service MSAS встроенный (под капотом) PBIRS. \n\nДанный график показывает потребление памяти в процессе работы пользователей с отчетами PBIX. Этот движок держит в памяти табличные модели данных Power BI отчётов (.pbix). \n\nПамять растёт при открытии .pbix пользователями и при фоновом обновлении моделей (refresh). Рост коррелирует с активностью обновления — всплески совпадают с записью моделей в каталог (SaveToCatalog). Устойчиво высокие значения у потолка RAM ноды означают, что модели .pbix давят на память, что может замедлять открытие отчётов и обновление данных. Метрика по каждой ноде scale-out отдельно. \n\nПрактический смысл, зачем она на дашборде: это единственная метрика, показывающая «вес» Power BI части PBIRS в памяти. ReportingServicesService отвечает за .rdl, а msmdsrv — за .pbix модели, и именно он обычно главный потребитель RAM на нодах, где много Power BI отчётов.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": ""
            },
            "properties": []
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 72
      },
      "id": 404,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "windows_process_working_set_bytes{process=\"msmdsrv\", instance=~\"$rs_instance\"}",
          "format": "time_series",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Потребление RAM движком .pbix",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Процессорное время, потребляемое процессом msmdsrv — встроенным в PBIRS движком Analysis Services, который обрабатывает модели данных Power BI отчётов (.pbix). \n\nЗначение выражено в процентах одного ядра: 100% = одно полностью загруженное ядро. \nПоскольку msmdsrv обрабатывает модели в несколько потоков параллельно, значения регулярно превышают 100% — например, 300% означает работу на трёх ядрах одновременно. \n\nПики обычно совпадают с фоновым обновлением моделей (refresh) и активным использованием Power BI отчётов. Метрика по каждой ноде scale-out отдельно.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 9,
        "x": 6,
        "y": 72
      },
      "id": 405,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "editorMode": "code",
          "expr": "sum by (instance) (rate(windows_process_cpu_time_total{process=\"msmdsrv\", instance=~\"$rs_instance\"}[$__rate_interval])) *100",
          "format": "time_series",
          "legendFormat": "__auto",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "CPU Analysis Services (PBIX), % ядра",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "victoriametrics-metrics-datasource",
        "uid": "${DS_VICTORIAMETRICS}"
      },
      "description": "Объём оперативной памяти (рабочий набор), занятый процессом ReportingServicesService — основным процессом службы PBIRS. \n\nЭто ядро сервера отчётов: веб-портал, движок рендеринга пагинированных отчётов (.rdl), обработка подписок и рассылок, а также приём и оркестрация запросов к Power BI отчётам (.pbix). \nТяжёлую работу с моделями данных .pbix этот процесс делегирует движку Analysis Services (msmdsrv) — поэтому память моделей Power BI здесь не учитывается, её показывает отдельная метрика по PBIX. \nРост рабочего набора здесь отражает нагрузку на генерацию .rdl-отчётов, формирование подписок и общую активность портала. Метрика отображается по каждой ноде scale-out отдельно.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 20,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "noValue": "process collector not enabled — see panel description",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 9,
        "x": 15,
        "y": 72
      },
      "id": 403,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "12.4.2",
      "targets": [
        {
          "datasource": {
            "type": "victoriametrics-metrics-datasource",
            "uid": "${DS_VICTORIAMETRICS}"
          },
          "editorMode": "code",
          "expr": "windows_process_working_set_bytes{process=~\"ReportingServicesService.*\", instance=~\"$rs_instance\"}",
          "format": "time_series",
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Память процесса PBIRS (общая без PBIX Analysis Services)",
      "type": "timeseries"
    }
  ],
  "preload": false,
  "refresh": "5m",
  "schemaVersion": 42,
  "tags": [
    "pbirs",
    "ssrs",
    "reporting-services"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "includeAll": false,
        "label": "База ReportServer",
        "name": "DS_MSSQL",
        "options": [],
        "query": "mssql",
        "refresh": 1,
        "regex": "",
        "type": "datasource"
      },
      {
        "current": {
          "text": "srv-rs-0[12].*",
          "value": "srv-rs-0[12].*"
        },
        "hide": 0,
        "label": "Фильтр хостов RS (regex)",
        "name": "host_filter",
        "query": "srv-rs-0[12].*",
        "type": "textbox",
        "options": [
          {
            "selected": true,
            "text": "srv-rs-0[12].*",
            "value": "srv-rs-0[12].*"
          }
        ]
      },
      {
        "allValue": "$host_filter",
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "victoriametrics-metrics-datasource",
          "uid": "${DS_VICTORIAMETRICS}"
        },
        "definition": "label_values(windows_os_hostname{hostname=~\"$host_filter\"},instance)",
        "includeAll": true,
        "label": "Узел RS",
        "multi": true,
        "name": "rs_instance",
        "options": [],
        "query": {
          "query": "label_values(windows_os_hostname{hostname=~\"$host_filter\"},instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": "__ALL__",
        "current": {
          "text": "All",
          "value": "$__all"
        },
        "datasource": {
          "type": "mssql",
          "uid": "${DS_MSSQL}"
        },
        "definition": "SELECT DISTINCT c.Path FROM ReportServer.dbo.[Catalog] c JOIN ReportServer.dbo.ExecutionLog3 e ON e.ItemPath = c.Path",
        "includeAll": true,
        "label": "Путь отчёта",
        "name": "report",
        "options": [],
        "query": "SELECT DISTINCT c.Path FROM ReportServer.dbo.[Catalog] c JOIN ReportServer.dbo.ExecutionLog3 e ON e.ItemPath = c.Path",
        "refresh": 2,
        "regex": "",
        "regexApplyTo": "value",
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "text": "__ALL__",
          "value": "__ALL__"
        },
        "description": "",
        "hide": 2,
        "includeAll": false,
        "label": "fail_class",
        "name": "fail_class",
        "options": [],
        "query": "__ALL__,rdl,pbix_open,refresh",
        "type": "custom",
        "valuesFormat": "csv"
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "Мониторинг PBIRS / SSRS",
  "uid": "pbirs-monitoring",
  "version": 71,
  "weekStart": "monday",
  "__inputs": [
    {
      "name": "DS_MSSQL",
      "label": "База ReportServer (MSSQL)",
      "description": "Datasource MSSQL, указывающий на базу ReportServer",
      "type": "datasource",
      "pluginId": "mssql",
      "pluginName": "Microsoft SQL Server"
    },
    {
      "name": "DS_VICTORIAMETRICS",
      "label": "VictoriaMetrics / Prometheus",
      "description": "Источник метрик windows_exporter",
      "type": "datasource",
      "pluginId": "victoriametrics-metrics-datasource",
      "pluginName": "VictoriaMetrics"
    }
  ],
  "id": null
}