DEV Community

Cover image for How to Configure monitoring for compute services
SUBAIR NURUDEEN ADEWALE
SUBAIR NURUDEEN ADEWALE

Posted on

How to Configure monitoring for compute services

Introduction

Monitoring compute services is a critical aspect of ensuring the performance, availability, and reliability of cloud-based infrastructure. As organizations increasingly rely on virtual machines and cloud applications, proactive monitoring provides valuable insights into system health, detects anomalies, and minimizes downtime. This project focuses on configuring monitoring for compute services by setting up data collection and analysis mechanisms to enhance visibility and streamline troubleshooting.

The objectives of this project include:

  • Create a data collection endpoint.
  • Create a data collection rule.
  • Add an IIS log collection to an existing data collection rule.
  • Configure Network Connection Monitor for a Linux IaaS virtual machine. By completing these tasks, we aim to establish a structured monitoring framework that supports better decision-making and system optimization.

Step 1 Create a data collection endpoint.

What it does:
It’s like building a mailbox where all your monitoring data will be delivered.

Real-life example:
Imagine you have multiple VMs running. If one crashes or throws an error, the system logs the event. Without an endpoint, those logs just stay inside the VM. With the endpoint, they are sent to a central place (Azure Monitor/Log Analytics) where you can actually see them.

Example: A Windows VM suddenly restarts due to a system crash. You can only detect this in time because the logs were sent through the data collection endpoint.

  • In the Azure Portal Search Bar, enter Monitor and select Monitor from the list of results.

  • In the Monitor page, under Settings, choose Data Collection Endpoints.
  • On the Data Collection Endpoints page, choose Create.

  • On the Create Data Collection Endpoint page, provide the following settings and then choose Review + Create.
  • Property Value
  • Endpoint name IaaSVMCollectionEndpoint
  • Subscription Your subscription
  • Resource Group SankidsRG
  • Region Canada Central

  • Review the settings and choose Create.

** Step 2 Create a data collection rule**

What it does:
The rule decides what kind of data should be collected and where it should go.

Real-life example:
You configure a rule to collect Windows Event Logs from your VMs. These logs capture:

Failed login attempts (security threats )

Service crashes (like SQL Server suddenly stopping)

System warnings (like low memory alerts)

Example: If someone tries to brute-force passwords on your VM, the Windows Security log will show repeated failed login attempts. With a collection rule in place, you’ll spot this early and block the attacker.

  • In the Azure Portal Search Bar, enter Monitor and select Monitor from the list of results.

  • In the Monitor page, under Settings, choose Data Collection Rules.
  • On the Data Collection Rules page, choose Create.

  • On the Create Data Collection Rule page, configure the following settings and choose Next.

Property Value
Rule name WinVMDCR
Subscription Your subscription
Resource Group SankidsRG
Region Canada Central
Platform type Windows
Data collection endpoint IaaSVMCollectionEndpoint

  • On the Resources page, choose Add Resources.
  • On the Select a scope page, enable the SankidsVM checkbox and choose Apply.

  • On the Create Data Collection Rule page, choose Next.
  • On the Collect and Deliver page, choose Add data source.
  • On the Add data source page, select Windows Event Logs.
  • In the Application category enable the Critical and Error categories.
  • In the Security category, choose the Audit Failure category.
  • In the System category, enable the Critical and Error categories.
  • Choose Next.

  • On the Destination page, configure the following settings:

Property Value
Destination type Azure Monitor Logs
Subscription Your subscription
Account or namespace SanLogworkspace
Choose Add data source.
Choose Review + Create and then choose Create.

  • Data Collection rules is created successfully

step 3 Add an IIS log collection to an existing data collection rule

What it does:
Captures web server activity logs (IIS).
Real-life example:
Your web app hosted on IIS starts running slow. By looking at IIS logs, you can see:

  • Which pages are taking too long to load
  • If users are getting “500 Internal Server Error"
  • If there’s unusual traffic (like a sudden spike that might be a DDoS attack)
    Example: IIS logs reveal that a particular API endpoint /login is throwing 500 errors frequently. This helps developers fix the bug quickly.

  • In the Azure Portal Search Bar, enter Monitor and select Monitor from the list of results.

  • In the Monitor page, under Settings, choose Data Collection Rules.
  • Choose the WinVMDRC rule in SankidsRG.

  • Under Configuration, choose Data Sources.
  • On the Data Sources page, choose Add.
  • On the Add Data Source page, select IIS Logs.
  • Choose Next.

On the Destination page, configure the following settings:

  • Property Value
  • Destination type Azure Monitor Logs
  • Subscription Your subscription
  • Account or namespace SanLogwoekspace
  • Choose Add data source.

  • IIS log as been added to the data collection rule.

Step 4 Configure Network Connection Monitor for a Linux IaaS virtual machine

What it does:
Checks if your VM’s network connections are healthy and reliable.

Real-life example:
If your Linux VM hosts a database, applications must always reach it quickly. The monitor will alert you if:

  • The connection is dropping packets
  • Latency (delay) is too high
  • The VM is unreachable from certain regions

Example: A user in Europe complains your app is slow. Network Connection Monitor shows high latency between your Linux VM (in West US) and Europe, confirming it’s a network issue, not the app itself.

  • In the Azure Portal Search Bar, enter Network Watcher and select Network Watcher from the list of results.

  • Under Monitoring, choose Connection Monitor.
  • On the Connection Monitor page, choose Create.

  • On the Basics page of the Create Connection Monitor wizard, provide the following information and choose Next.

  • Property Value

  • Connection Monitor name SankidNetMonitor

  • Subscription Your subscription

  • Region Canada Central

  • Workspace SanLogworkspace

  • On the Add test group details page, enter the name LinuxIPTest and choose Add sources.

  • On the Add Sources page, select Azure Endpoints and set the type to Virtual machines. Select Subnet and then enable the SankidsLinuxVm checkbox. Choose Add Endpoints.

  • Choose Add Test Configuration.

  • On the Add Test Configuration page, enter the name DefaultHTTP and then choose Add Test Configuration.

  • Choose Add Destinations.

  • Select Azure Endpoints and set the type to Virtual machines. Select Subnet and then enable the sankidsLinuxVm checkbox. Select Add Endpoints.

  • Choose Add Test Group.

  • Choose Review and Create then choose Create.

  • Then choose Create.

  • Connection Monitor is created successfully

Conclusion

In conclusion, this project demonstrates how to implement monitoring for compute services using structured data collection and analysis techniques. By successfully creating a data collection endpoint and rules, integrating IIS log collection, and configuring a Network Connection Monitor for Linux IaaS, we have built a reliable monitoring solution that improves operational visibility. These measures not only provide administrators with real-time insights into performance and security but also ensure timely detection of issues, leading to enhanced system stability and user satisfaction. Ultimately, this project highlights the importance of monitoring as a proactive approach to managing compute services effectively in modern cloud environments.

Top comments (0)