From 38d36f63a49eaafee2a95391af64bb3e129d729e Mon Sep 17 00:00:00 2001 From: abolfazl1381 Date: Mon, 16 Dec 2024 21:38:14 +0330 Subject: [PATCH] fix(grafana): add default values --- app/models/grafana/alert_managers_models.py | 8 ++++---- app/models/grafana/elastcsearch_models.py | 4 ++-- app/models/grafana/loki_models.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/models/grafana/alert_managers_models.py b/app/models/grafana/alert_managers_models.py index 29539ccc..595e99f6 100644 --- a/app/models/grafana/alert_managers_models.py +++ b/app/models/grafana/alert_managers_models.py @@ -7,10 +7,10 @@ class BasicAuth(BaseModel): class AlertManagerInput(BaseModel): - name:str - url:str - uid:str - implementation:str + name:str = "Alertmanager" + url:str = "http://localhost:9093" + uid:str = "alertmanager" + implementation:str handleGrafanaManagedAlerts:bool = True editable: bool = True diff --git a/app/models/grafana/elastcsearch_models.py b/app/models/grafana/elastcsearch_models.py index c0f9d589..d8273b8c 100644 --- a/app/models/grafana/elastcsearch_models.py +++ b/app/models/grafana/elastcsearch_models.py @@ -4,8 +4,8 @@ class ElasticSearchInput(BaseModel): - name:str - url:str + name:str = "elasticsearch-v7-filebeat" + url:str = "http://localhost:9200" editable: bool = True index:str = "[filebeat-]YYYY.MM.DD" interval:str = "Daily" diff --git a/app/models/grafana/loki_models.py b/app/models/grafana/loki_models.py index e56fbb91..43318c86 100644 --- a/app/models/grafana/loki_models.py +++ b/app/models/grafana/loki_models.py @@ -6,9 +6,9 @@ class BasicAuth(BaseModel): basicAuthPassword:str class LokiInput(BaseModel): - name:str - uid:str ="loki" - url:str + name:str = "Loki" + uid:str = "loki" + url:str = "http://localhost:3100" editable: bool = True timeout:int = 60 maxLines:int = 1000