Skip to main content

Azure Observability in VNET Environments

TL;DR
  • Your agent manages VNET resources through ARM control plane APIs — resource discovery, metrics, Activity Logs, and management operations always work
  • Log queries (KQL on Log Analytics, Application Insights) work when observability services allow public network access (the default)
  • When observability data is behind private endpoints, deploy an Azure Function inside your VNET as a query proxy — your agent calls the Function, and the Function queries private workspaces through the Private Endpoint
  • No additional configuration is needed beyond standard RBAC for the default scenario

The problem: "will it work with my VNET?"

Most enterprise Azure environments deploy workloads inside Virtual Networks for network isolation. Container Apps, App Services, AKS clusters, and VMs run in VNET-isolated subnets with NSGs controlling traffic flow. Some organizations go further and place their observability data behind Azure Monitor Private Link Scope (AMPLS) with public query access disabled.

When evaluating SRE Agent, the first question is: "Can the agent investigate resources inside our VNETs?" The answer depends on two things:

  1. Whether your agent needs to query control plane data (always works) or data plane endpoints (depends on private link settings)
  2. Whether your Log Analytics and Application Insights resources allow public queries (default) or deny them (private link only)
Most users: Scenario 1 is all you need

If you haven't restricted public access on your Log Analytics or Application Insights resources, everything works with no changes. Jump to Scenario 1 — most enterprise deployments fall into this category.

How your agent accesses Azure resources

Your agent runs on managed infrastructure outside your VNET. It communicates with Azure through two distinct API surfaces.

Control plane (ARM) — always accessible

The Azure Resource Manager (ARM) control plane at management.azure.com is a public service accessible to any authenticated client. VNET isolation applies to the data plane of your resources, not to the ARM control plane.

Your agent uses ARM for:

OperationHow it worksVNET impact
Resource discoveryResource Graph queries across your subscriptionsNone — ARM is always accessible
Azure Monitor metricsMetrics API via ARM (/providers/microsoft.insights/metrics)None — metrics retrieved through ARM
Activity LogsARM-based event query (/providers/microsoft.insights/eventtypes)None — ARM is always accessible
Resource managementRestart, scale, read configuration, slot operationsNone — ARM operations work regardless of VNET
Container App infoList revisions, check status, view configurationNone — ARM-based
App Service detailsHealth, deployment slots, configurationNone — ARM-based
Redis diagnosticsCache info, server load, latency metricsNone — ARM SDK and Monitor metrics only
Key insight

Azure Monitor metrics, Activity Logs, Resource Graph, and most resource management operations go through ARM. These always work for VNET resources because ARM is not inside your VNET — it's Azure's public management surface.

Data plane — depends on network access settings

Data plane APIs serve log queries and service-specific connections. Unlike ARM, these endpoints can be restricted by private link configurations.

OperationEndpointWorks whenBlocked when
Log Analytics KQL queriesapi.loganalytics.ioWorkspace allows public access (default)Public access set to "Deny"
Application Insights queriesapi.applicationinsights.ioApp Insights allows public access (default)Public access set to "Deny"
AKS kubectl operationsAKS API serverAPI server has public endpointPrivate AKS cluster (private API server)
Container App deep diagnosticsContainer exec endpoint (WebSocket)Container has public ingressInternal-only Container Apps Environment
App Service CPU profilingKudu/SCM endpointSCM site is publicly accessibleAccess restrictions block SCM
PostgreSQL SQL queries*.postgres.database.azure.comServer allows public accessPrivate endpoint only
Kusto (ADX) queries*.kusto.windows.netCluster allows public accessPrivate endpoint only

What "inside a VNET" actually means for your agent

A common misconception: "my resources are in a VNET, so nothing can reach them." In practice, VNET isolation has layers:

LayerWhat it isSRE Agent access
Compute resourcesContainer Apps, AKS nodes, VMs, App Services running in VNET subnetsManaged via ARM (control plane) — always works
Observability dataLogs, traces, metrics emitted by compute resources to Log Analytics, App Insights, Azure MonitorQueried via data plane — works when public access is enabled (default)
Network-restricted servicesResources that deny public access entirely (private link only on LAW, private AKS clusters, firewall-enabled Key Vaults)Not directly accessible — use the proxy pattern below

The important distinction: your compute resources emit logs and metrics to Azure Monitor services. These observability services are separate from your VNET. They have their own network access settings. By default, they accept connections from both public and private networks.


Scenario 1: VNET resources with public observability (default)

This is the most common and recommended configuration. Your compute resources run inside VNETs for network isolation, but your observability services accept connections from public and private networks.

What works

Everything documented in Azure Observability works with VNET resources in this scenario:

  • Resource discovery and topology mapping via Resource Graph
  • Azure Monitor metrics (CPU, memory, request rates, availability)
  • Activity Logs (configuration changes, deployments, administrative actions)
  • Application Insights queries (exceptions, traces, dependencies, request performance)
  • Log Analytics KQL queries (custom logs, performance counters, diagnostic logs)
  • Resource management (restart apps, scale instances, read configuration)
  • Az CLI commands (executed via session pool — reads resource state through ARM)

Verify your configuration

Check that your observability services allow public access:

Log Analytics workspace:

  1. Azure Portal → your Log Analytics workspace → Networking
  2. Verify "Accept connections from public and private networks" is selected (this is the default)

Application Insights:

  1. Azure Portal → your Application Insights resource → Network isolation
  2. Verify public access is not disabled
No changes needed

If you haven't modified the network settings on your Log Analytics workspace or Application Insights resource, the default configuration supports SRE Agent. No firewall rules, private endpoints, or VNET peering is required.

RBAC requirements

Same permissions as standard Azure observability — no VNET-specific roles needed:

ScopeRoleWhat it enables
SubscriptionReaderResource discovery, Resource Graph, Activity Logs
SubscriptionMonitoring ContributorAzure Monitor alert management
Application InsightsMonitoring ReaderKQL queries on traces, exceptions, dependencies
Log Analytics workspaceLog Analytics ReaderKQL queries on workspace data

Scenario 2: Observability data behind private endpoints (AMPLS)

When your organization requires Log Analytics to deny public network access (publicNetworkAccessForQuery: Disabled via AMPLS), your agent cannot query that data directly — queries to api.loganalytics.io from outside the VNET are rejected.

The workaround is to deploy a VNet-integrated Azure Function as a secure query proxy. The Function queries your private workspace through the Private Endpoint, and your agent calls the Function endpoints as custom PythonTools or via an MCP connector.

Sample: Query Private Log Analytics with Azure Functions (AMPLS pattern) — deployable with azd up, includes Bicep infrastructure, Function code, SRE Agent custom agent YAML, and Easy Auth configuration.

Blog: How Azure SRE Agent Can Investigate Resources in a Private Network — full step-by-step walkthrough.


Before and after

BeforeAfter
VNET confidence"I don't know if the agent works with our VNETs"Clear understanding: control plane works, data plane depends on network access
Private LAW"My workspace is behind AMPLS — SRE Agent can't help"Deploy a Function proxy — query private workspaces through private endpoints
Debugging failuresGeneric errors with no network contextKnow exactly which operations are control plane (work) vs data plane (check network settings)
Architecture decisionsUncertain how to configure observability for agent compatibilityTwo paths: keep public access (simplest) or deploy proxy pattern (private)

Known limitations

These data plane operations are not yet supported through private endpoints. Control plane operations for these resources continue to work.

ResourceBlocked operationControl plane alternatives
Private AKS clusterskubectl operations (pod status, logs, describe)ARM-based cluster info and metrics
Firewall-enabled Key VaultCertificate and secret retrieval
Internal-only Container AppsDeep diagnostics (CPU profiling, memory dump)ARM-based revision listing, metrics, restart
App Service with SCM restrictionsCPU profiling via KuduARM-based health, metrics, Activity Logs
Private endpoint PostgreSQLSQL query executionARM-based health, Activity Logs, metrics
Private endpoint Kusto (ADX)KQL queries to clusterARM-based cluster health and metrics

Get started

For the default scenario (public observability), no additional setup is needed. Follow the standard Azure Observability permissions guide.

For private workspaces behind AMPLS, deploy the query proxy:

ResourceWhat you'll learn
Sample: Query Private Log Analytics with Azure FunctionsDeploy a query proxy for AMPLS-protected workspaces
Blog: Investigate Resources in a Private NetworkEnd-to-end walkthrough of private network access
Set Up Kusto Connector →Connect to Azure Data Explorer for custom queries

CapabilityWhat it adds
Azure Observability →Full reference of built-in Azure diagnostic tools
External Observability →Datadog, Splunk, and custom systems via MCP connectors
MCP Connectors →Connect any MCP server for additional capabilities
Root Cause Analysis →Hypothesis-driven investigation across available evidence
Was this page helpful?