Skip to main content

Azure File Shares

Azure File Shares

Plugin: go.d.plugin Module: azure_monitor

Maintained by Netdata

Overview​

Monitor remaining quota for each active Azure file share in selected storage accounts.

In your Azure Monitor job, add storage_file_shares under profiles.mode_combined.entries to monitor shares alongside automatic profiles. To monitor shares alone, use profiles.mode: exact and list only storage_file_shares under profiles.mode_exact.entries.

Netdata discovers storage accounts through Azure Resource Graph and reads their share inventory and statistics through Azure Resource Manager in the configured Azure cloud. The storage_file_shares entry can narrow which accounts it uses from the job's discovery results. Each share chart follows its parent account's virtual node routing.

This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration.

The Azure identity needs Reader access for Resource Graph discovery and Microsoft.Storage/storageAccounts/fileServices/shares/read on the selected accounts. The built-in Reader role includes this action when its scope covers the accounts. See Azure permissions for Storage.

Default Behavior​

Auto-Detection​

This profile activates only when a combined or exact job lists storage_file_shares. Netdata discovers storage accounts within the configured subscriptions and discovery scope, then applies the profile entry's own filters.

Limits​

Netdata refreshes share statistics hourly and publishes the last successful measurement each update_every for up to an hour. Unavailable statistics leave a gap. A known share retains its chart until a complete list confirms its removal or its account leaves discovery. An Azure Monitor outage alone does not prevent a confirmed share removal from reaching the dashboard.

Check the collector logs when one source fails. The job keeps its normal cadence while another source supplies usable data. A complete empty share list counts as a valid result for up to an hour. When Azure Monitor is the failing source, its charts receive no samples and leave the dashboard after five such collections. They return when it recovers. When share reads fail, known shares keep their charts and show gaps. An exact job containing only the share profile keeps share charts independent of Azure Monitor.

When no source has usable results and a read failed or the last share results expired, the job reports collection failure and applies its normal retry delay. No chart receives samples or is removed until a collection succeeds.

Performance Impact​

Each successful refresh uses one Azure Resource Manager read per inventory page in each selected storage account and one statistics read per active share. An account with 100 shares on one page takes 101 reads before retries. Overlapping profiles share these reads. The stock share profile adds no Azure Monitor Metrics queries.

Metrics queries run first. Across all accounts, the job starts up to 32 serial share reads per poll and gives them up to one quarter of the interval (15 seconds at the default interval). A read starts only while at least a third of that budget is left (5 seconds at the default interval), or the request timeout if that is shorter. A request already in progress can still time out before the configured request timeout. Netdata logs the timeout and normally retries that read after five minutes. Work that has not started stays queued. Large inventories, throttling or heavy Metrics traffic can extend the refresh beyond an hour. At the default interval one job starts at most 1,920 share reads per hour, inventory pages included. Slow responses and time spent on Metrics lower that. For a larger inventory, split the storage accounts across jobs with subscription or profile filters. An exact job containing only the share profile has its own polling budget.

Setup​

You can configure the azure_monitor collector in two ways:

MethodBest forHow to
UIFast setup without editing filesGo to Nodes → Configure this node → Collectors → Jobs, search for azure_monitor, then click + to add a job.
FileIf you prefer configuring via file, or need to automate deployments (e.g., with Ansible)Edit go.d/azure_monitor.conf and add a job.
important

UI configuration requires paid Netdata Cloud plan.

Prerequisites​

Grant discovery and file share access​

Grant the Azure identity Reader access at a scope that covers the storage accounts you want to monitor. If the same job collects Azure Monitor platform metrics, also grant Monitoring Reader on each queried subscription. See Azure Monitor setup for service principal and managed identity setup.

Configuration​

Options​

The following options can be defined globally: update_every, autodetection_retry.

Profile file locations:

TypePath
Stock profiles/usr/lib/netdata/conf.d/go.d/azure_monitor.profiles/default/
User overrides/etc/netdata/go.d/azure_monitor.profiles/

User profile files with the same basename as a stock profile override it. Custom profiles extend the collector's catalog -- they do not replace the discovery mechanism.

Explicit selection

Set selection: explicit in a profile file to require an entry in combined or exact job mode. With selection: auto or the key omitted, the profile is eligible for automatic selection by resource type.

Resource properties in profiles:

Besides Azure Monitor metrics, a profile can read Azure Resource Graph properties of each resource during discovery:

Profile keyPurpose
resource_labelsAdds a label to every series of the resource. Each entry has name, property (a dot-separated path under properties whose segments contain only letters and digits, for example properties.hardwareProfile.vmSize), and optional value: arm_name to keep only the last segment of an ARM resource ID.
resource_statesExports one enum metric named <profile>.<id> from a property such as properties.extended.instanceView.powerState.code. Each states entry maps a name to an Azure value, matched case-insensitively. A chart dimension with selector: <id> and neither name nor name_from_label expands into one 0/1 dimension per state; the collector supplies the state label for any valid ID, including phase or power. Missing or unrecognized values produce no state observation.

In discovery.mode: query, the custom KQL must return each property as a column named nd_ followed by the property path with dots replaced by underscores (for example nd_properties_hardwareProfile_vmSize). Missing columns leave the label empty and the state unreported.

Resource-state charts refresh with discovery (every 300 seconds by default). They remain available when Azure Monitor metrics fail, provided the discovery snapshot is still valid. If a scheduled discovery refresh fails, state charts show gaps until discovery succeeds again; ordinary metrics continue using the last known resource inventory. Setting discovery.refresh_every: 0 disables resource-state output as well as rediscovery.

Config options
GroupOptionDescriptionDefaultRequired
Collectionupdate_everyData collection interval, in seconds. Must be at least 60.60no
autodetection_retryHow often to retry the initial connection when the job fails to start, in seconds. Zero disables retries.0no
subscription_idsAzure subscription IDs to monitor. They scope resource discovery.yes
cloudAzure cloud environment: public, government, or china.publicno
query_offsetMinimum offset subtracted from metric query windows, in seconds. Increase it if metrics appear incomplete.180no
timeoutRequest timeout for Azure Resource Graph, Azure Monitor and Resource Manager, in seconds. File share reads also share a per-poll budget of one quarter of the collection interval.30no
Authenticationauth.modeHow Netdata authenticates to Azure: service_principal, managed_identity, or default.yes
auth.mode_service_principal.tenant_idEntra ID tenant ID. Required for service_principal mode.no
auth.mode_service_principal.client_idEntra ID application (client) ID. Required for service_principal mode.no
auth.mode_service_principal.client_secretEntra ID client secret. Required for service_principal mode.no
auth.mode_managed_identity.client_idClient ID of a user-assigned managed identity. Leave empty for a system-assigned identity.no
Discoverydiscovery.refresh_everyHow often to refresh resources and their states, in seconds. Zero disables rediscovery after startup and disables resource-state charts.300no
discovery.modeHow resources are selected: filters (structured filters) or query (custom KQL).filtersno
discovery.mode_filters.resource_groupsAzure resource groups to include. Leave empty for all.[]no
discovery.mode_filters.regionsAzure regions to include. Leave empty for all.[]no
discovery.mode_filters.tagsExact-match tag filters. Keys match case-insensitively, values case-sensitively.{}no
discovery.mode_query.kqlAzure Resource Graph query selecting the resources. It must project id, name, type, resourceGroup, and location, plus tags for tag-based virtual nodes.no
Profilesprofiles.modeHow profiles are selected: auto (from discovered resources), exact (explicit list), or combined (both).autono
profiles.mode_auto.entriesPer-profile overrides applied only to profiles that activate automatically at startup.[]no
profiles.mode_exact.entriesExplicit profile entries used by exact mode.[]no
profiles.mode_combined.entriesExplicit profile entries merged with auto-discovered profiles in combined mode.[]no
Limitslimits.max_concurrencyMaximum concurrent batch requests to Azure Monitor.4no
limits.max_batch_resourcesMaximum resources per Azure Monitor batch request.50no
limits.max_metrics_per_queryMaximum metric names per Azure Monitor batch request.20no
Virtual NodevnodeAssociates this job with a Virtual Node.no
virtual_nodes.by_resource_tagAzure resource tag whose value becomes the virtual node for the resources carrying it. Leave empty to keep everything on this host.no
query_offset​

Azure Monitor metrics have a built-in reporting delay of 1-3 minutes. The collector subtracts this offset from the current time when building metric query windows to avoid fetching incomplete data points.

The configured query_offset acts as a minimum floor. For slower metric batches, the collector automatically uses a larger effective offset when the batch time grain is longer than the configured value.

  • Default (180s) works for most services.
  • Longer time grains (for example PT5M) automatically use at least one full time grain as the effective offset.
  • Increase to 240-300s if you still see gaps or missing data points.
  • Do not set below 60s -- metrics will likely be incomplete.
auth.mode​

Determines how the collector authenticates with Azure.

ModeWhen to useRequired options
service_principalRunning outside Azure, or when you need explicit credentialstenant_id, client_id, client_secret
managed_identityRunning on Azure VMs, VMSS, or AKS with a managed identityOptionally client_id for user-assigned identity
defaultUses the Azure SDK default credential chain (environment variables, managed identity, Azure CLI, etc.)None
discovery.mode​

Controls how the collector finds candidate Azure resources.

ModeBehavior
filtersBuilds an Azure Resource Graph query from the structured mode_filters.* options (resource groups, regions, tags). This is the default.
queryUses the raw KQL you provide in discovery.mode_query.kql. The query must project id, name, type, resourceGroup, and location. Project tags too when using virtual_nodes.by_resource_tag.
discovery.mode_query.kql​

A raw Azure Resource Graph KQL query used when discovery.mode is query. See the Azure Resource Graph query language documentation for syntax and supported operators.

The query must project these five columns:

ColumnDescription
idFull Azure resource ID (ARM format)
nameResource name
typeResource type (e.g., microsoft.sql/servers/databases)
resourceGroupResource group name
locationAzure region

If virtual_nodes.by_resource_tag is set, also project tags. Missing tags or non-object-shaped tags do not fail discovery; affected resources fall back to the default job host scope and the collector logs a warning once per successful discovery refresh.

info
  • Returned resource type values should match the Azure resource types expected by the active profiles.
  • Resources with unsupported or non-matching types are ignored and do not activate profiles.
  • For the stock catalog, see built-in profiles.

Example:

resources
| where tags.env =~ "prod"
| project id, name, type, resourceGroup, location, tags
profiles.mode​

Controls how the collector decides which metric profiles to activate.

ModeBehavior
autoDiscovers resource types in your subscriptions and enables matching profiles eligible for automatic selection. This is the default.
exactDiscovers resources for the profiles listed under profiles.mode_exact.entries.
combinedMerges auto-discovered profiles with the explicit entries listed under profiles.mode_combined.entries.

Each profile entry uses name as the canonical profile basename. The basename is the profile filename without the .yaml / .yml suffix and must be lowercase.

Add storage_file_shares in combined mode to collect file share capacity alongside automatic profiles. List it alone in exact mode for share monitoring only.

Filter layering:

  • discovery.mode_filters.* defines the job-wide discovery scope.
  • profiles.mode_*.entries[].filters.* narrows resources for one profile only.
  • The effective resource set for a profile is the intersection of both filter sets.
  • Per-profile filters never widen or bypass the global discovery scope.
  • In discovery.mode: query, per-profile filters can use only resource_groups and regions. If you need per-profile tag filtering there, encode it in the KQL.
profiles.mode_auto.entries​

Each entry has:

FieldDescription
nameCanonical profile basename.
filters.resource_groupsOptional resource-group narrowing for this profile.
filters.regionsOptional region narrowing for this profile.
filters.tagsOptional tag narrowing for this profile in discovery.mode: filters.

Auto-mode entries do not activate profiles on their own. They only override filtering for profiles that were auto-selected at bootstrap. In discovery.mode: query, only filters.resource_groups and filters.regions apply.

profiles.mode_exact.entries​

Each entry has:

FieldDescription
nameCanonical profile basename.
filters.resource_groupsOptional resource-group narrowing for this profile.
filters.regionsOptional region narrowing for this profile.
filters.tagsOptional tag narrowing for this profile in discovery.mode: filters.

Per-profile filters only narrow the globally discovered resource set. They never widen it. In discovery.mode: query, only filters.resource_groups and filters.regions apply.

profiles.mode_combined.entries​

Each entry has:

FieldDescription
nameCanonical profile basename.
filters.resource_groupsOptional resource-group narrowing for this profile.
filters.regionsOptional region narrowing for this profile.
filters.tagsOptional tag narrowing for this profile in discovery.mode: filters.

If an explicit combined entry matches an auto-selected profile, the collector keeps one runtime profile and overlays the explicit entry filters onto it. In discovery.mode: query, only filters.resource_groups and filters.regions apply.

vnode​

This job-level virtual node is used for metrics written to the default host scope. If virtual_nodes.by_resource_tag is also set, resources that have a safe value for the configured tag are routed to workload virtual nodes instead. Resources without that tag, with an empty value, or with an unsafe hostname value continue to use the job-level vnode when configured.

virtual_nodes.by_resource_tag​

Set this to an Azure resource tag key, for example workload, to route resource metrics under virtual nodes named after that tag value.

  • Tag keys are matched case-insensitively; tag values keep their Azure case and are trimmed.
  • Empty or missing tag values use the default job host scope.
  • Unsafe hostname values use the default job host scope and are summarized in a warning once per successful discovery refresh.
  • The virtual node GUID is deterministic from azure_monitor: plus the trimmed tag value, so the same Azure workload value maps to the same Azure Monitor virtual node across jobs and subscriptions.
  • Virtual node metadata includes _vnode_type=azure_workload. Netdata also adds _hostname when emitting the virtual node definition.
  • Workload virtual nodes increase host and alert cardinality. Health alerts defined for Azure Monitor charts attach per workload virtual node.
  • The metrix scoped vec cache grows with observed workload scope and label cardinality during the collector runtime; keep the configured tag's cardinality bounded by operator policy.

via UI​

Configure the azure_monitor collector from the Netdata web interface:

  1. Go to Nodes.
  2. Select the node where you want the azure_monitor data-collection job to run and click the ⚙ (Configure this node). That node will run the data collection.
  3. The Collectors → Jobs view opens by default.
  4. In the Search box, type azure_monitor (or scroll the list) to locate the azure_monitor collector.
  5. Click the + next to the azure_monitor collector to add a new job.
  6. Fill in the job fields, then click Test to verify the configuration and Submit to save.
    • Test validates the provided settings and checks the collector's startup prerequisites. Successful validation does not guarantee that every metric will be available during collection.
    • If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.

via File​

The configuration file name for this integration is go.d/azure_monitor.conf.

The file format is YAML. Generally, the structure is:

update_every: 1
autodetection_retry: 0
jobs:
- name: some_name1
- name: some_name2

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config go.d/azure_monitor.conf
Examples​
Azure file shares only​

Use a managed identity and select only the storage_file_shares profile.

Config
jobs:
- name: azure-files
subscription_ids:
- "<subscription-id>"
profiles:
mode: exact
mode_exact:
entries:
- name: storage_file_shares
auth:
mode: managed_identity

Azure file shares with automatic profiles​

Add the storage_file_shares profile to monitor file shares in storage accounts in files-rg. Automatically selected profiles continue to use the job's discovery scope.

Config
jobs:
- name: azure-files
subscription_ids:
- "<subscription-id>"
profiles:
mode: combined
mode_combined:
entries:
- name: storage_file_shares
filters:
resource_groups:
- files-rg
auth:
mode: managed_identity

Alerts​

There are no alerts configured by default for this integration.

Metrics​

Metrics grouped by scope.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.

Free capacity is the share's quota minus reported usage in bytes. Zero means the reported usage meets or exceeds the quota. Azure's usage estimate can lag behind recent changes. See Azure file share statistics.

Per file share​

Each active Azure file share in the selected storage accounts has its own chart.

Labels:

LabelDescription
file_shareThe Azure file share name.
resource_nameThe parent storage account name.
resource_groupThe parent storage account's resource group.
regionThe Azure region of the parent storage account.
resource_typeThe parent storage account's Azure resource type.
profileThe Azure Monitor profile basename.
subscription_idThe Azure subscription identifier.
resource_uidThe unique Azure resource identifier of the parent storage account.

Metrics:

MetricDescriptionDimensionsUnit
azure_monitor.storage_file_shares.free_capacityAzure File Share Free Capacityfreebytes

Troubleshooting​

Diagnostics​

Debug Mode​

Important: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.

To troubleshoot issues with the azure_monitor collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m azure_monitor

    To debug a specific job:

    ./go.d.plugin -d -m azure_monitor -j jobName

Getting Logs​

If you're encountering problems with the azure_monitor collector, follow these steps to retrieve logs and identify potential issues:

  • Run the command specific to your system (systemd, non-systemd, or Docker container).
  • Examine the output for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
System with systemd​

Use the following command to view logs generated since the last Netdata service restart:

journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep azure_monitor
System without systemd​

Locate the collector log file, typically at /var/log/netdata/collector.log, and use grep to filter for collector's name:

grep azure_monitor /var/log/netdata/collector.log

Note: This method shows logs from all restarts. Focus on the latest entries for troubleshooting current issues.

Docker Container​

If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:

docker logs netdata 2>&1 | grep azure_monitor

Known Errors​

An Azure file share chart is missing or has gaps​

Cause

The profile may be inactive, the parent account may be outside its discovery scope, or the latest share statistics may be unavailable.

Fix

Check that storage_file_shares is listed in combined or exact mode and that the subscription, discovery, and profile filters include the parent storage account. Verify that the Azure identity can list and read file shares in the account. Check the virtual node where the parent account is routed if virtual nodes are configured.


Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.