Overview
Monitoring agents collect telemetry data from virtual machines and send it to centralized monitoring services. Multi-Cloud Manager supports:- Azure Monitor Agent (AMA): Modern agent for Azure VMs
- GCP Ops Agent: Unified agent for Compute Engine VMs
Azure Monitor Agent (AMA)
About AMA
Azure Monitor Agent is the next-generation monitoring agent that replaces:- Log Analytics Agent (MMA/OMS)
- Azure Diagnostics Extension
- Telegraf agent
- Data Collection Rules (DCR) for centralized configuration
- Security through managed identity
- Multi-homing to multiple workspaces
- Support for both Windows and Linux
- Enhanced security and performance
Check Agent Status
Verify if AMA is installed on a VM:- Checks VM extensions for agent presence
- Distinguishes between Windows and Linux agents
- Identifies legacy MMA installations
Install Azure Monitor Agent
Automatically install AMA on a VM:- Detects the VM’s operating system (Windows/Linux)
- Installs the appropriate AMA extension
- Configures the agent with default settings
Windows Agent Details
Extension properties:- Name:
AzureMonitorWindowsAgent - Publisher:
Microsoft.Azure.Monitor - Type:
AzureMonitorWindowsAgent - Version:
1.0(auto-upgrade enabled)
- Windows Server 2012 R2 or later
- Windows 10 or later (for client OS)
- .NET Framework 4.5 or later
- TLS 1.2 enabled
- Performance counters (CPU, memory, disk, network)
- Windows Event Logs (System, Application, Security)
- IIS logs (if IIS installed)
- Custom logs and metrics
Linux Agent Details
Extension properties:- Name:
AzureMonitorLinuxAgent - Publisher:
Microsoft.Azure.Monitor - Type:
AzureMonitorLinuxAgent - Version:
1.0(auto-upgrade enabled)
- Supported distributions: Ubuntu 16.04+, RHEL 7+, CentOS 7+, Debian 9+, SLES 12+
- systemd required
- Python 2.6+ or Python 3.5+
- Performance counters (CPU, memory, disk, network)
- Syslog messages
- Custom logs and metrics
Agent Configuration
AMA is configured via Data Collection Rules (DCR), not on the VM itself. Configuration flow:- Install AMA on VM
- Create Data Collection Rule specifying what to collect
- Associate DCR with VM
- Data flows to Log Analytics workspace
Upgrade from MMA
If the VM has legacy MMA installed:GCP Ops Agent
About Ops Agent
The Ops Agent is Google Cloud’s unified agent that combines:- Monitoring agent: Collects system and application metrics
- Logging agent: Collects and forwards logs
- Single agent installation
- Automatic updates
- Improved performance
- Better integration with Cloud Monitoring and Cloud Logging
Check Agent Status
Verify if Ops Agent is installed and reporting:- Queries the
agent.googleapis.com/agent/uptimemetric - Checks for data in the last 10 minutes
- Reports active only if agent is currently reporting
Install Ops Agent
Install Ops Agent on a Compute Engine VM:- Detects the VM’s operating system
- Generates the appropriate installation script
- Executes the script via OS Config API
Linux Installation Script
- Downloads the Ops Agent repository configuration
- Adds the repository to package manager
- Installs
google-cloud-ops-agentpackage - Starts the agent services
- Ubuntu 18.04, 20.04, 22.04
- Debian 10, 11
- CentOS 7, 8
- RHEL 7, 8, 9
- Rocky Linux 8, 9
Windows Installation Script
- Downloads the Ops Agent MSI installer
- Runs silent installation for all users
- Configures Windows services
- Starts the agent
- Windows Server 2016, 2019, 2022
- Windows 10, 11 (for client OS)
Agent Configuration
Ops Agent uses a YAML configuration file: Location:- Linux:
/etc/google-cloud-ops-agent/config.yaml - Windows:
C:\Program Files\Google\Cloud Operations\Ops Agent\config\config.yaml
- Edit the config file on the VM
- Restart the agent:
sudo service google-cloud-ops-agent restart - Or deploy via OS Config policies for fleet-wide configuration
Collected Metrics
Ops Agent automatically collects:| Metric | Description |
|---|---|
agent.googleapis.com/agent/uptime | Agent uptime in seconds |
agent.googleapis.com/cpu/utilization | CPU usage percentage |
agent.googleapis.com/memory/percent_used | Memory usage percentage |
agent.googleapis.com/disk/percent_used | Disk usage percentage |
agent.googleapis.com/network/traffic | Network bytes sent/received |
agent.googleapis.com/processes/count | Number of running processes |
Collected Logs
Ops Agent automatically collects: Linux:- Syslog messages (
/var/log/syslogor/var/log/messages) - Auth logs (
/var/log/auth.log) - Custom application logs (configurable)
- Windows Event Logs (System, Application, Security)
- IIS logs (if IIS installed)
- Custom application logs (configurable)
Permissions
Azure AMA Permissions
Required roles:Virtual Machine ContributororOwneron the VMMonitoring Contributoron the resource group
GCP Ops Agent Permissions
Required IAM roles:compute.instanceAdmin.v1(to use OS Config API)osconfig.guestPolicyAdmin(for fleet-wide deployment)
logging.logEntries.createmonitoring.timeSeries.create
Troubleshooting
Azure AMA Installation Failed
Azure AMA Installation Failed
Common causes:
- VM not running
- Insufficient permissions
- VM Agent (Azure Guest Agent) not running
- Network connectivity issues
- Verify VM is running
- Check VM Agent status in Azure Portal
- Verify network allows outbound HTTPS to Azure endpoints
- Review extension error logs in Azure Portal
GCP Ops Agent Installation Failed
GCP Ops Agent Installation Failed
Common causes:
- OS Config API not enabled
- VM doesn’t have Guest Environment installed
- Insufficient IAM permissions
- Unsupported OS version
- Enable OS Config API:
gcloud services enable osconfig.googleapis.com - Verify Guest Environment:
sudo systemctl status google-guest-agent - Check IAM permissions on the VM
- Confirm OS is supported
No Metrics After Installation
No Metrics After Installation
Azure:
- Wait 5-10 minutes for initial data
- Ensure DCR is associated with the VM
- Verify DCR is configured correctly
- Check Log Analytics workspace permissions
- Wait 3-5 minutes for initial data
- Verify agent status with
/agent/statusendpoint - Check Cloud Monitoring permissions
- Review agent logs:
journalctl -u google-cloud-ops-agent
Agent Stopped Working
Agent Stopped Working
Azure:
- Check if VM was restarted or reimaged
- Verify extension is still installed
- Review Windows Event Viewer or Linux syslog for errors
- Check agent service status:
sudo systemctl status google-cloud-ops-agent - Review agent logs:
sudo journalctl -u google-cloud-ops-agent -n 100 - Restart agent:
sudo systemctl restart google-cloud-ops-agent
Agent Comparison
| Feature | Azure Monitor Agent | GCP Ops Agent |
|---|---|---|
| Configuration | Data Collection Rules (centralized) | YAML file on VM |
| Installation | VM Extension | Package manager |
| Updates | Automatic (minor versions) | Automatic via package updates |
| Multi-workspace | Yes (via DCRs) | No (single project) |
| Custom metrics | Yes (via DCR) | Yes (via config) |
| Cost | No agent cost (data ingestion charged) | No agent cost (data ingestion charged) |
| Legacy agents | Replaces MMA/OMS | Replaces separate monitoring/logging agents |
Best Practices
Deploy During Provisioning
Install monitoring agents during VM creation to ensure complete telemetry from the start.
Use Automation
Use VM extensions (Azure) or startup scripts (GCP) to install agents automatically.
Monitor Agent Health
Set up alerts for agent failures or missing heartbeats.
Keep Agents Updated
Enable auto-upgrade for minor versions to get latest features and fixes.
Next Steps
Log Analytics
Configure Data Collection Rules for Azure VMs
Metrics Collection
View metrics collected by agents