Skip to content

Commit

Permalink
fix(alertmanager):add fields
Browse files Browse the repository at this point in the history
  • Loading branch information
abolfazl8131 committed Dec 16, 2024
1 parent 8bbeb2f commit aa9d891
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/models/alert_managers_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ class BasicAuth(BaseModel):


class AlertManagerInput(BaseModel):
name:str
url:str
uid:str
implementation:str

handleGrafanaManagedAlerts:bool = True
editable: bool = True
basic_auth:Optional[BasicAuth]
Expand Down
12 changes: 6 additions & 6 deletions app/template_generators/grafana_data_sources/alertmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def alert_manager_template(input):
"apiVersion": 1,
"datasources": [
{
"name": "Alertmanager",
"uid": "alertmanager",
"name": input.name,
"uid": input.uid,
"type": "alertmanager",
"url": "http://localhost:9093",
"url": input.url,
"access": "proxy",
"orgId": 1,
"jsonData": {
Expand All @@ -34,10 +34,10 @@ def alert_manager_template(input):
"apiVersion": 1,
"datasources": [
{
"name": "Alertmanager",
"uid": "alertmanager",
"name": input.name,
"uid": input.uid,
"type": "alertmanager",
"url": "http://localhost:9093",
"url": input.url,
"access": "proxy",
"orgId": 1,
"jsonData": {
Expand Down

0 comments on commit aa9d891

Please sign in to comment.