Auto-Associate Azure Child Monitors with Monitor Groups

Auto-Associate Azure Child Monitors with Monitor Groups

Overview

Applications Manager's Microsoft Azure Monitor discovers child resources across multiple Azure services during each discovery cycle. When organizations use Azure Resource Groups to organize their resources, manually grouping the corresponding child monitors into Monitor Groups can be time-consuming - especially in large environments with frequent resource changes.
The Associate to Monitor Group option automates this by creating Monitor Groups. These groups mirror your Azure Resource Group structure and automatically associate discovered child monitors into the appropriate group on every discovery cycle.
Notes
Note: The Associate to Monitor Group option is supported from Applications Manager v18.21.00.

How to enable it

  1. In Applications Manager, navigate to New Monitor → Microsoft Azure, or open the Edit Monitor page for an existing Azure monitor.
  2. Enable the Advanced Settings toggle. The option is hidden unless Advanced Settings is turned on.
  3. Check the Associate to Monitor Group checkbox that appears under Advanced Settings.
  4. Save (or update) the monitor. The setting takes effect during the next child-monitor discovery cycle.
              

How it works

When the option is enabled, Applications Manager automatically creates and manages Monitor Groups during every child monitor discovery cycle.
  1. Monitor Group name

    1. The auto-created Monitor Group display name is derived from the Azure Resource Group name and the Azure parent monitor's display name:
      1. {ResourceGroupName}_{AzureParentMonitorDisplayName}
    2. The name is always converted to lowercase.
    3. If the generated name exceeds 100 characters, it is truncated so that the final name, including the ellipsis (...) does not exceed 100 characters.
  2. Monitor Group description

    1. Every auto-created Monitor Group is assigned a description prefixed with a standard label, making it easy to distinguish from manually created groups. For example:
Auto-created monitor group during Child Monitor Discovery:{ResourceGroupName}#{SubscriptionID}#{AzureParentMonitorDisplayName} 

Where:
  1. {ResourceGroupName} is the Azure Resource Group name.
  2. {SubscriptionID} is the Azure subscription ID.
  3. {AzureParentMonitorDisplayName} is the display name of the parent Azure monitor.

Behavior when the option is disabled

If the Associate to Monitor Group option is disabled after it has previously been active:
  • Existing Monitor Group associations are not removed. Child monitors that were previously auto-associated remain in their Monitor Groups.
  • No new Monitor Groups are created, and no new child-monitor associations are made during subsequent discovery cycles.
  • Auto-created Monitor Groups are not deleted automatically - they must be removed manually if no longer needed.

Advanced configuration & behavior notes

This section covers optional configuration and edge cases for the Associate to Monitor Group feature.
Global Key Configuration: Controlling re-association of existing Monitors
By default, Applications Manager re-associates all child monitors with their respective Monitor Groups during every discovery cycle. This includes monitors that were manually removed from a group. If an auto-created Monitor Group was deleted, it is also recreated.
This behavior is controlled by the global configuration key: am.associate.existing.monitors.to.mg
PropertyDetails
Default Valuetrue
Supported Valuestrue or false. Any other value is ignored, and the default (true) is applied.
When true (default)On every discovery poll, all child monitors - both newly discovered and already-existing ones that were manually dissociated - are queued for auto-association. If an auto-created Monitor Group was manually deleted, it will be
recreated. This ensures that discovered child monitors remain associated with their corresponding Monitor Groups.
When falseOnly newly discovered child monitors are queued for auto-association. Monitors that were manually removed from a Monitor Group are not re-added, and manually deleted Monitor Groups are only recreated if there are no newly discovered monitors to associate.
To change this setting, update the key directly in the AM_GLOBALCONFIG table and restart Applications Manager for the change to take effect.
Step 1 - Check if the key already exists:
SELECT * FROM AM_GLOBALCONFIG WHERE NAME = 'am.associate.existing.monitors.to.mg';
Step 2a - If the key does NOT exist, insert it:
INSERT INTO AM_GLOBALCONFIG (NAME, VALUE) VALUES ('am.associate.existing.monitors.to.mg', 'false');
Step 2b - If the key already exists, update it:
UPDATE AM_GLOBALCONFIG SET VALUE = 'false' WHERE NAME = 'am.associate.existing.monitors.to.mg';
After making the change, restart Applications Manager for it to take effect.
This setting also affects the following behaviors:
  • Manually dissociated monitors: If you manually remove a child monitor from an auto-created Monitor Group, it will be re-associated on the next discovery cycle when this key is true. Set it to false to prevent this.
  • Manually deleted Monitor Groups: If you manually delete an auto-created Monitor Group, it will be recreated on the next discovery cycle when this key is true. When set to false, the group is only recreated if there are newly discovered monitors to associate.
  • To permanently stop Applications Manager from managing a Monitor Group, disable the Associate to Monitor Group option on the parent Azure monitor.
Edge Cases & Limitations
  1. Special character handling

    1. After lowercasing the Monitor Group display name, any invalid characters are stripped. The table below shows which characters are kept and which are removed:
Action                 Characters
KeptUnicode letters (a–z, Arabic, Chinese, etc.), digits (0–9), dot ., hyphen -, underscore _, space
StrippedAll other characters - symbols (@ # $ ! ( ) / \ & *, etc.) and control characters (tabs, newlines)
Notes
Note: Applications Manager identifies each auto-created Monitor Group by an internal name derived from {ResourceGroupName}_{SubscriptionID}. If two different Resource Group names under the same Azure subscription produce an identical string after sanitization, they will be treated as the same Monitor Group - and child monitors from both groups will be associated together.
Example: Resource Groups rg(dev)1 and rg(dev)(1) both sanitize to rgdev1. Because the internal identifier also includes the Subscription ID, Resource Groups that sanitize to the same string within the same Azure subscription can result in the same internal identifier.
  1. Auto-created Monitor Groups are not deleted automatically

    1. Monitor Groups created by this feature are never deleted automatically by Applications Manager - in any of the following situations:
      1. The parent Azure monitor is deleted from Applications Manager.
      2. All child monitors under a specific Monitor Group are deleted.
      3. All Azure resources under the Resource Group are removed in the Azure portal.
      4. The Resource Group itself is deleted in the Azure portal.
    2. These Monitor Groups must be deleted manually when they are no longer needed.