-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Deploy to Azure Button for Alerts
- Loading branch information
1 parent
200bf33
commit 707abd5
Showing
20 changed files
with
2,170 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.hugo_build.lock | ||
public | ||
services/amba-alerts* | ||
artifacts/*/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# WARNING | ||
|
||
The files in this directory are generated thru automation. Any direct changes will be overwritten. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Local python packages | ||
.python_packages/ | ||
|
||
# Python Environments | ||
.env | ||
.venv/ | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Visual Studio Code | ||
.vscode | ||
|
95 changes: 95 additions & 0 deletions
95
tooling/generate-templates/arm/activity-administrative.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"alertName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Unique name (within the Resource Group) for the Activity log alert." | ||
} | ||
}, | ||
"alertDescription": { | ||
"type": "string", | ||
"defaultValue": "##DESCRIPTION##", | ||
"metadata": { | ||
"description": "Description of alert" | ||
} | ||
}, | ||
"isEnabled": { | ||
"type": "bool", | ||
"defaultValue": true, | ||
"metadata": { | ||
"description": "Indicates whether or not the alert is enabled." | ||
} | ||
}, | ||
"currentDateTimeUtcNow": { | ||
"type": "string", | ||
"defaultValue": "[utcNow()]", | ||
"metadata": { | ||
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness" | ||
} | ||
}, | ||
"telemetryOptOut": { | ||
"type": "string", | ||
"defaultValue": "No", | ||
"allowedValues": [ | ||
"Yes", | ||
"No" | ||
], | ||
"metadata": { | ||
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Insights/activityLogAlerts", | ||
"apiVersion": "2017-04-01", | ||
"name": "[parameters('alertName')]", | ||
"location": "Global", | ||
"tags": { | ||
"_deployed_by_amba": true | ||
}, | ||
"properties": { | ||
"description": "[parameters('alertDescription')]", | ||
"scopes": [ | ||
"[subscription().id]" | ||
], | ||
"enabled": "[parameters('isEnabled')]", | ||
"condition": { | ||
"allOf": [ | ||
{ | ||
"field": "category", | ||
"equals": "Administrative" | ||
}, | ||
{ | ||
"field": "operationName", | ||
"equals": "##OPERATION_NAME##" | ||
}, | ||
{ | ||
"field": "status", | ||
"containsAny": ##STATUS## | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "[equals(parameters('telemetryOptOut'), 'No')]", | ||
"apiVersion": "2020-06-01", | ||
"name": "[variables('pidDeploymentName')]", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"mode": "Incremental", | ||
"template": { | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [] | ||
} | ||
} | ||
} | ||
] | ||
} |
95 changes: 95 additions & 0 deletions
95
tooling/generate-templates/arm/activity-resourcehealth.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"alertName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Unique name (within the Resource Group) for the Activity log alert." | ||
} | ||
}, | ||
"alertDescription": { | ||
"type": "string", | ||
"defaultValue": "##DESCRIPTION##", | ||
"metadata": { | ||
"description": "Description of alert" | ||
} | ||
}, | ||
"isEnabled": { | ||
"type": "bool", | ||
"defaultValue": true, | ||
"metadata": { | ||
"description": "Indicates whether or not the alert is enabled." | ||
} | ||
}, | ||
"currentDateTimeUtcNow": { | ||
"type": "string", | ||
"defaultValue": "[utcNow()]", | ||
"metadata": { | ||
"description": "The current date and time using the utcNow function. Used for deployment name uniqueness" | ||
} | ||
}, | ||
"telemetryOptOut": { | ||
"type": "string", | ||
"defaultValue": "No", | ||
"allowedValues": [ | ||
"Yes", | ||
"No" | ||
], | ||
"metadata": { | ||
"description": "The customer usage identifier used for telemetry purposes. The default value of False enables telemetry. The value of True disables telemetry." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"pidDeploymentName": "[take(concat('##TELEMETRY_PID##-', uniqueString(resourceGroup().id, parameters('alertName'), parameters('currentDateTimeUtcNow'))), 64)]" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Insights/activityLogAlerts", | ||
"apiVersion": "2017-04-01", | ||
"name": "[parameters('alertName')]", | ||
"location": "Global", | ||
"tags": { | ||
"_deployed_by_amba": true | ||
}, | ||
"properties": { | ||
"description": "[parameters('alertDescription')]", | ||
"scopes": [ | ||
"[subscription().id]" | ||
], | ||
"enabled": "[parameters('isEnabled')]", | ||
"condition": { | ||
"allOf": [ | ||
{ | ||
"field": "category", | ||
"equals": "ResourceHealth" | ||
}, | ||
{ | ||
"anyOf": [##CAUSES## | ||
] | ||
}, | ||
{ | ||
"anyOf": [##CURRENT_HEALTH_STATUS## | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "[equals(parameters('telemetryOptOut'), 'No')]", | ||
"apiVersion": "2020-06-01", | ||
"name": "[variables('pidDeploymentName')]", | ||
"type": "Microsoft.Resources/deployments", | ||
"properties": { | ||
"mode": "Incremental", | ||
"template": { | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [] | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.