{ "uid": "pd-guard", "title": "Модуль безопасности персональных данных", "description": "Бизнес-показатели защиты данных и техническое наблюдение за модулем.", "tags": [ "pd-guard", "пдн", "безопасность" ], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "5s", "time": { "from": "now-15m", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m" ] }, "editable": true, "panels": [ { "type": "row", "title": "Защита данных — что происходит с точки зрения бизнеса", "id": 1, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "collapsed": false }, { "type": "stat", "title": "Обращений в секунду", "id": 2, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_process_seconds_count[$__rate_interval]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": {}, "decimals": 1, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Все обращения к контракту: и маскирование, и обратное преобразование.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Защищено фрагментов ПД за период", "id": 3, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 4, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_pd_detected_total[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Сколько персональных данных не ушло в языковую модель за выбранный период.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Фрагментов ПД на запрос", "id": 4, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 9, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_pd_detected_total[$__rate_interval])) / clamp_min(sum(rate(pdguard_process_seconds_count{direction=\"mask\"}[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 2, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Насколько насыщен трафик персональными данными.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Токенов в секунду", "id": 5, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 13, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_tokens_processed_total[$__rate_interval]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Оценка TPS: объём текста, прошедшего через модуль.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Систем-потребителей в работе", "id": 6, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 3, "x": 17, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "count(count by (system) (rate(pdguard_process_seconds_count[$__rate_interval]) > 0))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Размер хранилища соответствий", "id": 7, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 20, "y": 1 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(pdguard_store_chars)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "none", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Знаков в памяти узла. Записи живут ограниченное время и вытесняются по объёму.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "timeseries", "title": "Типы персональных данных в секунду", "id": 8, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 9, "w": 14, "x": 0, "y": 6 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (type) (rate(pdguard_pd_detected_total[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{type}}" } ], "fieldConfig": { "defaults": { "unit": "short", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Что именно находит модуль. Провал по типу при живом трафике — повод смотреть правила.", "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "bargauge", "title": "Топ типов ПД за период", "id": 9, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 9, "w": 10, "x": 14, "y": 6 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "topk(18, sum by (type) (increase(pdguard_pd_detected_total[$__range])))", "refId": "A", "instant": false, "legendFormat": "{{type}}" } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "displayMode": "gradient", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false } } }, { "type": "timeseries", "title": "Обращения по системам-потребителям", "id": 10, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 14, "x": 0, "y": 15 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (system) (rate(pdguard_process_seconds_count[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{system}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "piechart", "title": "Доля систем за период", "id": 11, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 10, "x": 14, "y": 15 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (system) (increase(pdguard_process_seconds_count[$__range]))", "refId": "A", "instant": false, "legendFormat": "{{system}}" } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "right", "values": [ "percent" ], "showLegend": true }, "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false } } }, { "type": "row", "title": "Задержка и SLA", "id": 12, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 }, "collapsed": false }, { "type": "stat", "title": "p95 маскирования", "id": 13, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(pdguard_process_seconds_bucket{direction=\"mask\"}[$__rate_interval])))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 4, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 0.25 }, { "color": "red", "value": 0.5 } ] } }, "overrides": [] }, "description": "Ориентир критериев — 0,5 с. Жёлтый с 0,25 с, красный с 0,5 с.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Доля в пределах 0,5 с", "id": 14, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_process_seconds_bucket{le=\"0.5\"}[$__rate_interval])) / clamp_min(sum(rate(pdguard_process_seconds_count[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "percentunit", "custom": {}, "decimals": 3, "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "orange", "value": 0.99 }, { "color": "green", "value": 0.999 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Среднее время маскирования", "id": 15, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 8, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_process_seconds_sum{direction=\"mask\"}[$__rate_interval])) / clamp_min(sum(rate(pdguard_process_seconds_count{direction=\"mask\"}[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 5, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Худший запрос за период", "id": 16, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 12, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "max(pdguard_process_seconds_max)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 4, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 0.25 }, { "color": "red", "value": 0.5 } ] } }, "overrides": [] }, "description": "Одиночный выброс. Смотреть вместе с p95: единичный всплеск на него не влияет.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Предел одновременных запросов", "id": 17, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 16, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "max(pdguard_concurrency_limit)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Подстраивается сам под задержку. Резкое падение — признак перегрузки.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Запросов в работе", "id": 18, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 20, "y": 24 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(pdguard_concurrency_in_flight)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "timeseries", "title": "Перцентили маскирования", "id": 19, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 29 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.50, sum by (le) (rate(pdguard_process_seconds_bucket{direction=\"mask\"}[$__rate_interval])))", "refId": "A", "instant": false, "legendFormat": "p50" }, { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(pdguard_process_seconds_bucket{direction=\"mask\"}[$__rate_interval])))", "refId": "B", "instant": false, "legendFormat": "p95" }, { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.99, sum by (le) (rate(pdguard_process_seconds_bucket{direction=\"mask\"}[$__rate_interval])))", "refId": "C", "instant": false, "legendFormat": "p99" } ], "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "p95 по системам", "id": 20, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 29 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le, system) (rate(pdguard_process_seconds_bucket{direction=\"mask\"}[$__rate_interval])))", "refId": "A", "instant": false, "legendFormat": "{{system}}" } ], "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Какой потребитель приносит самые тяжёлые запросы.", "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Запросы по направлениям", "id": 21, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 38 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (direction) (rate(pdguard_process_seconds_count[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{direction}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Маскирование и обратное преобразование должны идти примерно поровну: контракт проверяется парами.", "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Предел и фактическая загрузка", "id": 22, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 38 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "max(pdguard_concurrency_limit)", "refId": "A", "instant": false, "legendFormat": "предел" }, { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(pdguard_concurrency_in_flight)", "refId": "B", "instant": false, "legendFormat": "в работе" } ], "fieldConfig": { "defaults": { "unit": "short", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "row", "title": "Отказы и устойчивость", "id": 23, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 46 }, "collapsed": false }, { "type": "stat", "title": "Доля успешных ответов", "id": 24, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 47 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(http_server_requests_seconds_count{status=\"200\"}[$__rate_interval])) / clamp_min(sum(rate(http_server_requests_seconds_count[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "percentunit", "custom": {}, "decimals": 4, "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "orange", "value": 0.98 }, { "color": "green", "value": 0.999 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Отказов по перегрузке за период", "id": 25, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 4, "y": 47 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_requests_rejected_total{reason=\"overload\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 1 } ] } }, "overrides": [] }, "description": "Ответы 429. Допустимы под нагрузкой, но устойчивый рост означает нехватку мощности.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Внутренних сбоев за период", "id": 26, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 9, "y": 47 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_requests_rejected_total{reason=\"internal_error\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "description": "При сбое отдаётся безопасный ответ без данных запроса. Любое ненулевое значение — повод смотреть логи.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Отказано системам за период", "id": 27, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 14, "y": 47 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_requests_rejected_total{reason=~\"system_disabled|forbidden\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Выключенная система или неверный ключ.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Битых запросов за период", "id": 28, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 19, "y": 47 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_requests_rejected_total{reason=\"malformed\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "timeseries", "title": "Отказы по причинам", "id": 29, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 52 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (reason) (rate(pdguard_requests_rejected_total[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{reason}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Ответы по кодам", "id": 30, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 52 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (status) (rate(http_server_requests_seconds_count{uri!=\"/metrics\"}[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{status}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "row", "title": "Вторая ступень распознавания", "id": 31, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 60 }, "collapsed": false }, { "type": "stat", "title": "Доля обращений, дошедших до модели", "id": 32, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 0, "y": 61 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_ner_requests_total{outcome=\"engaged\"}[$__rate_interval])) / clamp_min(sum(rate(pdguard_process_seconds_count{direction=\"mask\"}[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "percentunit", "custom": {}, "decimals": 3, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "От неё зависит, посильна ли тяжёлая модель: вызов стоит на два порядка дороже правил.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Участков на обращение", "id": 33, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 5, "y": 61 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(rate(pdguard_ner_candidates_total[$__rate_interval])) / clamp_min(sum(rate(pdguard_ner_requests_total{outcome=\"engaged\"}[$__rate_interval])), 0.001)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 2, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "p95 второй ступени", "id": 34, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 10, "y": 61 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(pdguard_ner_duration_seconds_bucket[$__rate_interval])))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 4, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Пул был занят за период", "id": 35, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 15, "y": 61 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_ner_requests_total{outcome=\"busy\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 1 } ] } }, "overrides": [] }, "description": "Запрос обошёлся правилами, не дожидаясь модели. Рост означает нехватку распознавателей.", "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Разобрано правилами за период", "id": 36, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 5, "x": 19, "y": 61 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(increase(pdguard_ner_requests_total{outcome=\"no_candidates\"}[$__range]))", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "timeseries", "title": "Исходы обращений ко второй ступени", "id": 37, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 66 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (outcome) (rate(pdguard_ner_requests_total[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{outcome}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Время второй ступени", "id": 38, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 66 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.50, sum by (le) (rate(pdguard_ner_duration_seconds_bucket[$__rate_interval])))", "refId": "A", "instant": false, "legendFormat": "p50" }, { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(pdguard_ner_duration_seconds_bucket[$__rate_interval])))", "refId": "B", "instant": false, "legendFormat": "p95" } ], "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Обращения к моделям", "id": 49, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 74 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (model) (rate(pdguard_ner_model_requests_total[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{model}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 45, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "normal" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Время моделей", "id": 50, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 74 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "histogram_quantile(0.95, sum by (le, model) (rate(pdguard_ner_model_duration_seconds_bucket[$__rate_interval])))", "refId": "A", "instant": false, "legendFormat": "{{model}} p95" } ], "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "row", "title": "Ресурсы узла", "id": 39, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 90 }, "collapsed": false }, { "type": "stat", "title": "Процессор", "id": 40, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "process_cpu_usage", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "percentunit", "custom": {}, "decimals": 3, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 0.7 }, { "color": "red", "value": 0.9 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Куча занята", "id": 41, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum(jvm_memory_used_bytes{area=\"heap\"})", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "bytes", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Потоков", "id": 42, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 8, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "jvm_threads_live_threads", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Пауза сборщика, максимум", "id": 43, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 12, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "max(jvm_gc_pause_seconds_max)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 4, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 0.1 }, { "color": "red", "value": 0.5 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Время работы узла", "id": 44, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 16, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "max(process_uptime_seconds)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "s", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "stat", "title": "Узлов на связи", "id": 45, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 5, "w": 4, "x": 20, "y": 91 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "count(up{job=~\"pd-guard.*\"} == 1)", "refId": "A", "instant": false } ], "fieldConfig": { "defaults": { "unit": "short", "custom": {}, "decimals": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "green", "value": 1 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto", "colorMode": "value", "graphMode": "area" } }, { "type": "timeseries", "title": "Память по областям", "id": 46, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 96 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (area) (jvm_memory_used_bytes)", "refId": "A", "instant": false, "legendFormat": "{{area}}" } ], "fieldConfig": { "defaults": { "unit": "bytes", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "type": "timeseries", "title": "Паузы сборщика мусора", "id": 47, "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 96 }, "targets": [ { "datasource": { "type": "prometheus", "uid": "PDGUARD_PROM" }, "expr": "sum by (cause) (rate(jvm_gc_pause_seconds_sum[$__rate_interval]))", "refId": "A", "instant": false, "legendFormat": "{{cause}}" } ], "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 12, "lineWidth": 2, "showPoints": "never", "stacking": { "mode": "none" } }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "description": "Доля времени, проведённого в паузах. Растёт вместе с задержкой ответа.", "options": { "legend": { "displayMode": "table", "placement": "bottom", "calcs": [ "mean", "max" ], "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } } } ] }