You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This custom Terraform based `app-monitoring` module is recommended for monitoring Azure Resources externally servicing an App service (ex. App Service Plan, App Gateway, VM, etc.). For monitoring the `metrics` emitted at the App Service level, Azure Monitor relies on application insights. The `app-insights` module can be found here.
4
-
5
-
This module can be used by Cobalt Templates in order to map configurable `alert criteria` to individual Azure Resources offered by the Azure Monitor Service for monitoring. Monitored `alert criteria` comes in two forms, `metrics` and `logs`. This module introduces monitoring for `metrics` only. As a result, this module offers configurable `metric alert criteria`. How `metric alert criteria` is configured depends on the type of predefined metrics offered by the particular Azure Resource being referenced for monitoring. (ex. The App Service Plan Resource offers 'CpuMonitoring' as a configurable `metric`.)
3
+
This Terraform based `app-monitoring` module grants templates the ability to define and assign `alert criteria` to "Azure Resources" using Microsoft's _**Azure Monitor**_ service. `alert criteria` is conditional logic that targets a list of one or more "Azure Resources" for the purposes of monitoring their behavior. `alert criteria` comes in two forms, `metrics` and `logs`. This module introduces `metrics` based monitoring only. As a result, `alert criteria` in the context of this module is refered to as `metric alert criteria`. The way `metric alert criteria` is configured depends entirely on the `metrics` options offered by the "Azure Resources" selected for monitoring. (ex. The App Service Plan resource offers 'CpuMonitoring' as a configurable `metric`.)
6
4
7
5
In addition to the `metric alert criteria`, this module introduces a configurable `action group` that when paired with `metric alert criteria` can be configured to trigger events like e-mail notifications.
8
6
9
-
#### More on Azure Monitoring
7
+
#### _More on Azure Monitoring_
10
8
11
-
"Azure Monitor maximizes the availability and performance of your applications by delivering a comprehensive solution for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments. ..All data collected by Azure Monitor fits into one of two fundamental types, metrics and logs. Metrics are numerical values that describe some aspect of a system at a particular point in time. They are lightweight and capable of supporting near real-time scenarios. Logs contain different kinds of data organized into records with different sets of properties for each type." - Source: [Azure Monitor Overview](https://docs.microsoft.com/en-us/azure/azure-monitor/overview)
9
+
> "Azure Monitor maximizes the availability and performance of your applications by delivering a comprehensive solution for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments.
10
+
> All data collected by Azure Monitor fits into one of two fundamental types, metrics and logs. Metrics are numerical values that describe some aspect of a system at a particular point in time. They are lightweight and capable of supporting near real-time scenarios. Logs contain different kinds of data organized into records with different sets of properties for each type." - Source: Microsoft's [Azure Monitor Service Overview](https://docs.microsoft.com/en-us/azure/azure-monitor/overview)
12
11
13
-
The list of `metrics` available for configuration entirely depends on the Azure Resource chosen to be monitored. Please visit [Supported Metrics](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported) for a complete list of metrics supported by the Azure Monitor service.
12
+
This module deploys the _**Azure Monitor**_ service in order to offer visibility into the behavior of your deployed "Azure Resources". This module is recommended for `metrics` based monitoring of any "Azure Resource" deployed alongside App Services (ex. App Service Plan, App Gateway, VM, etc.). The list of `metrics` available for configuration depends entirely on the Azure Resource chosen to be monitored. For more information on how `metrics` work, please visit Microsoft's [alerts-metric-overview](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-overview) documentation.
14
13
15
-
#### More on Terraform Resources
14
+
For monitoring of an App Service, the [app-insights](../app-insights) module is instead recommended. The [app-insights](../app-insights) module leverages an _**Azure Monitor**_ service called [application insights](https://www.terraform.io/docs/providers/azurerm/r/application_insights.html).
16
15
17
-
Terraform resources used to define the `app-monitoring` module include the following:
The `metric alert criteria` is configured to deploy "CPU Resource Monitoring" for an App Service Plan Resource that emits alerts at configurable CPU thresholds. The `action group` is configured to send e-mails upon every alert. If a template does not provide an e-mail, this module deploys nothing.
58
+
Terraform resources used to define the `app-monitoring`module include the following:
Once the deployments are completed successfully, the output for the current module will be in the format mentioned below:
101
+
Please visit _**Azure Monitor's**_[monitoring at scale](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-overview#monitoring-at-scale-using-metric-alerts-in-azure-monitor.) page for more information on choosing multiple "Azure Resources".
75
102
76
-
```
77
-
Outputs:
103
+
- Resource IDs can either be a list of VM IDs or a single Azure Resource ID.
104
+
105
+
#### Configuring `metric alert criteria`
106
+
107
+
Please visit _**Azure Monitor's**_[Supported Metrics](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported) page for a complete list of supported metrics per "Azure Resource".
108
+
109
+
1. View the list of 'metrics' offered by the namespace of your chosen "Azure Resource".
110
+
2. Choose a metric.
111
+
3. Define the metric's criteria (i.e. Conditional logic being applied to an "Azure Resource".)
112
+
4. Apply that criteria to your chosen or newly created template.
113
+
114
+
#### Configuring `action group`
115
+
116
+
Please visit _**Azure Monitor's**_[action-groups](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/action-groups) page for more information on e-mail action groups.
117
+
118
+
1. Choose an appropriate e-mail address to receive alert notifications.
119
+
2. Choose an appropriate name for the 'action group' that will hold the e-mail address. (ex. "E-mail Alert Group")
120
+
3. Apply the e-mail address and name to your chosen or newly created template.
121
+
122
+
## Argument Reference
123
+
124
+
Supported arguments for this module are available in [variables.tf](variables.tf).
0 commit comments