From 94fa9e823f9adc31e3d6ffc7acd6ea7b081ef153 Mon Sep 17 00:00:00 2001 From: Magnus Root Date: Fri, 27 Feb 2026 16:11:53 +0300 Subject: [PATCH] New var --- dashboard_template.json | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/dashboard_template.json b/dashboard_template.json index 5407948..e88f7cf 100644 --- a/dashboard_template.json +++ b/dashboard_template.json @@ -1010,7 +1010,7 @@ }, "overview_uri_top15": { "type": "barchart", - "title": "URI от SID ${SID:raw} (top 15)", + "title": "URI от SID ${SID:raw} / app_name ${app_name:raw} / status ${response_status_code:raw} (top 15)", "description": "Топ 15 URI по выбранным SID", "transparent": true, "gridPos": { @@ -1094,14 +1094,14 @@ }, "query_mode": "bucket_logs", "query_config": { - "base_query": "log_type:access AND SID:(${SID:lucene})", + "base_query": "log_type:access AND SID:(${SID:lucene}) AND app_name:${app_name:lucene} AND response_status_code:${response_status_code:lucene}", "bucket_aggs": [ { "id": "3", "settings": { "filters": [ { - "label": "${SID:raw}", + "label": "SID:${SID:raw} app:${app_name:raw} status:${response_status_code:raw}", "query": "SID:(${SID:lucene})" } ] @@ -1334,6 +1334,31 @@ "$__all" ] } + }, + { + "name": "app_name", + "label": "App Name", + "description": "Приложение (app_name)", + "type": "query", + "datasource": { + "type": "grafana-opensearch-datasource", + "uid": "af84zsvlp9blsa" + }, + "definition": "{\"find\": \"terms\", \"field\": \"app_name.keyword\"}", + "query": "{\"find\": \"terms\", \"field\": \"app_name.keyword\"}", + "refresh": 1, + "includeAll": true, + "multi": true, + "allValue": "*", + "sort": 1, + "regex": "", + "allowCustomValue": false, + "current": { + "text": "All", + "value": [ + "$__all" + ] + } } ] }