Azure File Shares
Plugin: go.d.plugin Module: azure_monitor
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:
| Method | Best for | How to |
|---|---|---|
| UI | Fast setup without editing files | Go to Nodes → Configure this node → Collectors → Jobs, search for azure_monitor, then click + to add a job. |
| File | If you prefer configuring via file, or need to automate deployments (e.g., with Ansible) | Edit go.d/azure_monitor.conf and add a job. |
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:
| Type | Path |
|---|---|
| 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 key | Purpose |
|---|---|
resource_labels | Adds 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_states | Exports 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
| Group | Option | Description | Default | Required |
|---|---|---|---|---|
| Collection | update_every | Data collection interval, in seconds. Must be at least 60. | 60 | no |
| autodetection_retry | How often to retry the initial connection when the job fails to start, in seconds. Zero disables retries. | 0 | no | |
| subscription_ids | Azure subscription IDs to monitor. They scope resource discovery. | yes | ||
| cloud | Azure cloud environment: public, government, or china. | public | no | |
| query_offset | Minimum offset subtracted from metric query windows, in seconds. Increase it if metrics appear incomplete. | 180 | no | |
| timeout | Request 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. | 30 | no | |
| Authentication | auth.mode | How Netdata authenticates to Azure: service_principal, managed_identity, or default. | yes | |
| auth.mode_service_principal.tenant_id | Entra ID tenant ID. Required for service_principal mode. | no | ||
| auth.mode_service_principal.client_id | Entra ID application (client) ID. Required for service_principal mode. | no | ||
| auth.mode_service_principal.client_secret | Entra ID client secret. Required for service_principal mode. | no | ||
| auth.mode_managed_identity.client_id | Client ID of a user-assigned managed identity. Leave empty for a system-assigned identity. | no | ||
| Discovery | discovery.refresh_every | How often to refresh resources and their states, in seconds. Zero disables rediscovery after startup and disables resource-state charts. | 300 | no |
| discovery.mode | How resources are selected: filters (structured filters) or query (custom KQL). | filters | no | |
| discovery.mode_filters.resource_groups | Azure resource groups to include. Leave empty for all. | [] | no | |
| discovery.mode_filters.regions | Azure regions to include. Leave empty for all. | [] | no | |
| discovery.mode_filters.tags | Exact-match tag filters. Keys match case-insensitively, values case-sensitively. | {} | no | |
| discovery.mode_query.kql | Azure Resource Graph query selecting the resources. It must project id, name, type, resourceGroup, and location, plus tags for tag-based virtual nodes. | no | ||
| Profiles | profiles.mode | How profiles are selected: auto (from discovered resources), exact (explicit list), or combined (both). | auto | no |
| profiles.mode_auto.entries | Per-profile overrides applied only to profiles that activate automatically at startup. | [] | no | |
| profiles.mode_exact.entries | Explicit profile entries used by exact mode. | [] | no | |
| profiles.mode_combined.entries | Explicit profile entries merged with auto-discovered profiles in combined mode. | [] | no | |
| Limits | limits.max_concurrency | Maximum concurrent batch requests to Azure Monitor. | 4 | no |
| limits.max_batch_resources | Maximum resources per Azure Monitor batch request. | 50 | no | |
| limits.max_metrics_per_query | Maximum metric names per Azure Monitor batch request. | 20 | no | |
| Virtual Node | vnode | Associates this job with a Virtual Node. | no | |
| virtual_nodes.by_resource_tag | Azure 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.
| Mode | When to use | Required options |
|---|---|---|
service_principal | Running outside Azure, or when you need explicit credentials | tenant_id, client_id, client_secret |
managed_identity | Running on Azure VMs, VMSS, or AKS with a managed identity | Optionally client_id for user-assigned identity |
default | Uses the Azure SDK default credential chain (environment variables, managed identity, Azure CLI, etc.) | None |
discovery.mode
Controls how the collector finds candidate Azure resources.
| Mode | Behavior |
|---|---|
filters | Builds an Azure Resource Graph query from the structured mode_filters.* options (resource groups, regions, tags). This is the default. |
query | Uses 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:
| Column | Description |
|---|---|
id | Full Azure resource ID (ARM format) |
name | Resource name |
type | Resource type (e.g., microsoft.sql/servers/databases) |
resourceGroup | Resource group name |
location | Azure 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.
- Returned resource
typevalues 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.
| Mode | Behavior |
|---|---|
auto | Discovers resource types in your subscriptions and enables matching profiles eligible for automatic selection. This is the default. |
exact | Discovers resources for the profiles listed under profiles.mode_exact.entries. |
combined | Merges 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 onlyresource_groupsandregions. If you need per-profile tag filtering there, encode it in the KQL.
profiles.mode_auto.entries
Each entry has:
| Field | Description |
|---|---|
name | Canonical profile basename. |
filters.resource_groups | Optional resource-group narrowing for this profile. |
filters.regions | Optional region narrowing for this profile. |
filters.tags | Optional 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:
| Field | Description |
|---|---|
name | Canonical profile basename. |
filters.resource_groups | Optional resource-group narrowing for this profile. |
filters.regions | Optional region narrowing for this profile. |
filters.tags | Optional 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:
| Field | Description |
|---|---|
name | Canonical profile basename. |
filters.resource_groups | Optional resource-group narrowing for this profile. |
filters.regions | Optional region narrowing for this profile. |
filters.tags | Optional 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_hostnamewhen 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:
- Go to Nodes.
- 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.
- The Collectors → Jobs view opens by default.
- In the Search box, type azure_monitor (or scroll the list) to locate the azure_monitor collector.
- Click the + next to the azure_monitor collector to add a new job.
- 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:
| Label | Description |
|---|---|
| file_share | The Azure file share name. |
| resource_name | The parent storage account name. |
| resource_group | The parent storage account's resource group. |
| region | The Azure region of the parent storage account. |
| resource_type | The parent storage account's Azure resource type. |
| profile | The Azure Monitor profile basename. |
| subscription_id | The Azure subscription identifier. |
| resource_uid | The unique Azure resource identifier of the parent storage account. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| azure_monitor.storage_file_shares.free_capacity | Azure File Share Free Capacity | free | bytes |
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.ddirectory, usually at/usr/libexec/netdata/plugins.d/. If that's not the case on your system, opennetdata.confand look for thepluginssetting under[directories].cd /usr/libexec/netdata/plugins.d/ -
Switch to the
netdatauser.sudo -u netdata -s -
Run the
go.d.pluginto debug the collector:./go.d.plugin -d -m azure_monitorTo 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.