Azure Serverless Monitoring
The Microsoft Azure Platform offers you various serverless services like Logic Apps, Service Bus, Functions, and Event Hubs. As you deploy them in a production environment, you will need to monitor them. In this blog post, we will discuss different options that are available in Azure Portal and a third party platform Serverless360 for Azure Serverless monitoring.
Application Insights is a monitoring service in Azure enabling developers to monitor their application on-premise and in Azure. Microsoft offers this service to developers enabling them to monitor performance and detect issues. Moreover, with Application Insights, developers can improve the robustness of their applications.
Developers can set up Application Insights inside Azure, by provisioning an instance of the service, and install a package inside their application or hook it up with an Azure Service like Functions. Note that you can also enable Application Insights without provisioning an instance of it first. Through, for example, an Azure Function App, or Web App you can integrate with application insights – an instance of the service will be provisioned for you along with the Function or Web App.
The package in your application, whether hosted, on-premise or in Azure, will send telemetry data to the intended Application Insights – like performance counters, docker logs, and diagnostic logs. Also, when you hook a Function to Application Insights, telemetry data like logs will be sent to Application Insights. In our sample solution, we hooked the Azure Function App hosted the function for converting epoch to Date Time to Application Insights.
From Application Insights, you can drill down even further to get more insights by clicking the application dashboard.
KUDU is the engine behind git deployment, WebJobs, and various other features in Azure Web Sites. It can be useful when you want to look at deployment logs, viewing configuration parameters, and individual function runs. KUDU is not a monitoring tool perse. However, it can aid in troubleshooting. Furthermore, KUDU is a tool targeted for IT-pro’s responsible for operations of Web sites, and other resources in Azure. You can access a Function App through the portal via application settings or through the following URL: https://<nameofyourfunctionapp>.scm.azurewebsites.net.
Azure Log Analytics is a monitoring service in Azure that collects and analyses log files from various Azure- and on-premise resources. Moreover, the service can collect all the data into a single workspace (OMS Workspace) and provides a query language to query the ingested data.
To collect data from VM’s through the installation of an agent, or through Azure Services (most Azure resources already are integrated with Log Analytics) you need to create a workspace in the Azure Portal. Next, you can get inside the workspace to query data that has been collected from various sources. Note that inside each Azure resource, in the Log Analytics pane, you have to specify the workspace or during the provisioning of, for instance, a Logic App point to the Workspace.
Besides using Log Analytics to search through your logs, you can leverage analytics tools like OMS, Azure Security Center, and Application Insights. Furthermore, you can import the data into Power BI to create data visualizations.
Operations Management Suite
Operations Management Suite (OMS) is a service in Azure that bundles capabilities like log analytics, IT automation, backup and recovery, and security and compliance tasks. An IT-pro can manage on-premises and cloud IT assets from one console. You can leverage OMS by setting up a workspace (also mentioned in the Log Analytics paragraph) and collect data from other Azure Resources like for instance Logic Apps. Tying an OMS Workspace with Logic Apps provides you straight away get a view on your Logic App runs.
The screenshot above shows the runs of the Logic Apps in our cloud-native composite solution.
Another monitoring solution is Azure Monitor, which provides a base-level infrastructure metrics and logs for most services in Microsoft Azure. Currently, not all Azure services have Azure Monitor, but will soon. The solution offers the following capabilities:
- Activity Log: information about all types of an event occurring within an Azure subscription – for instance, VM activities such as starting or stopping of a VM. Furthermore, the events will be stored for a max period of 90 days. You can query the events, save and pin to the Azure Dashboard. Also, you can push it to a storage account for a more extended period or to Event Hubs for real-time streaming or Log Analytics.
- Diagnostic Settings: information about events occurring inside a particular resource in an Azure subscription – for instance retrieving a secret from Key Vault. By default, these events will not be collected unless you enable them manually inside a resource (Portal), inside an ARM Template, using either PowerShell or REST API.
- Metrics: time-based metric points of your Azure resources similar to performance counters in a Windows Server. These metrics are available by default and have a retention period of 90 days. Furthermore, you can examine the performance of an Azure resource and track used or available credits. Also, you can push the metrics to Event Hubs, Stream Analytics, and retrieve and query metric data using PowerShell or REST API.
- Alerts: the alerts section, accessible in various Azure Resources, is where you can view and manage all Azure alerts. Alerts coming from the Activity Log, Metrics, Application Insights, and Log Analytics are visible here. Furthermore, you can create alert rules, which you send out via email, SMS, WebHook, or to a third party IT Service Management (TISM) application. Also, you can call an Automation Runbook if you want.
Azure Service Health
Microsoft provides a service on the Azure Platform, where they will display issues regarding their resources. Moreover, it will offer you with insights into maintenance schedules, and what problems could affect the availability of their resources. The Azure Service Health dashboard is available through Help + Support, and it offers the following views:
- Services Issues
- Planned Maintenance
- Resource Health
- Health Alerts
In the Azure Portal, you can find the Azure Advisor, a service on the platform that can support you to follow the best practices for deployment in Azure. Moreover, the service analyses the current configuration of all your Azure resources, and based on that, create recommendations about them. Address the recommendations from within the Azure Advisor service. The service offers the following categories:
- High Availability
With the third party tool Serverless360, you can manage your composite cloud-native solution at one place. The tool monitors your Azure integration services like Logic Apps, Functions, Event Hubs, Service Bus, and API endpoints. Furthermore, you can:
- In your service bus queues or topics access active messages to know more details, process the dead letter messages to repair & resubmit or merely purge them.
- Detect and be alerted about violations occurring in your composite integration solutions.
- Integrate your Azure serverless monitoring with essential notification tools like PagerDuty, Microsoft Teams, ServiceNow, Slack, SMTP, and OMS.
- Have full control over what your colleagues or consultants can see and do with the Azure resources in your environment.
- Governance and audit report provides detailed information on the four W’s—WHO accessed WHAT, WHEN, and WHY. Serverless360 collects, consolidates, and enables search filters on your account logs.
In this blog post, we discussed several Azure Serverless monitoring services and Serverless360. This tools can play a role in monitoring your Azure Serverless components.
In this blog post, we haven’t explored all the features of the Azure Serverless monitoring services nor Serverless360. Moreover, we would suggest you to further look into the Azure monitoring and Serverless360 documentation.