top of page

Automatic on-boarding of Azure Resources to Monitoring

nmsguru

Updated: Feb 22

Ever wanted to run your Azure resources on-boarding to monitoring in a fully automated fashion? Now you can !

The Azure Sensor Pack has a built-in capability to automatically on-board any new Azure resource your IT team has added.

Automatic Azure on-boarding to monitoring
Automatic Azure on-boarding to monitoring

How it Works ?

The Azure Sensor pack service reads the Scheduler.csv file every 10 minutes and acts according the configuration lines. It utilizes the Azure Sensor Pack API to run auto-discovery commands followed by monitoring automation API calls.

It allows users to configure different schedules for discovering their Azure estate


Configuration

The configuration of the automatic scheduler is located at:

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\AutoMonX\Azure\Scheduler\Scheduler.csv


You can configure the scheduler to auto-discover and add to monitoring:

  • The entire Azure Tenant

  • A specific subscription

  • All the tenants and their subscriptions


Parameters you can use for initiating auto-discovery:

Parameter

Required

Description

tenant_id

The internal tenant ID as written in AzureConnProfiles.INI file

sub=subscription

 

The Azure subscription name

thorough

 

Run a thorough discovery, default behavior

outmode

 

When passed will generate a log file.

resources

 

Quick discovery of resources.

metrics

 

Quick discovery of metrics.

new_resources

 

Discovers only new resources

filtered

 

Filtered discovery according to the configured include_mon.csv and exclude_mon.csv files.

resource_id

 

Add the resource URL to PRTG comments

add_comments

 

Add the resource URL to PRTG comments for existing sensors


Examples

The line below would initiate a daily discovery at 19:00 of tenant labeled as AcmeTenant with our internal id of 1. It will use whitelists and exclude lists (include_mon.csv, exclude_mon.csv), discover Azure Resource IDs and discover new resources only. At the end of discovery, new resources would be added to monitoring in PRTG

Daily19:00,Discovery,AcmeTenant,tenant_id=1&resource_id&outmode&whitelist&group_name=AcmeTenant&new_resources

You can add more configuration lines to schedule additional discovery actions as seen in the example file below:

AutoMonX Scheduler.INI file

Discover only new resources of a Tenant called "BerlinTenant"

Daily21:00,Discovery,BerlinTenant,tenant_id=2&resource_id&outmode&whitelist&group_name=BerlinTenant&resource_id&new_resources

Discover a single subscription called "microsoft partner"

Daily09:00,Discovery,AcmeTenant,tenant_id=1&sub=microsoft%20partner&outmode&whitelist&group_name=Azure_Acme


Discover all tenants and subscriptions

Sat 19:00,Discovery,all,resource_id&outmode&whitelist&add_comments&new_resources


Adding PRTG passhash to the Scheduler settings is not mandatory, as long as you have it configured in the automation INI file


Important:

  • The Azure Sensor Pack automatically limit the scheduler activity to run a single discovery command at any given time to avoid system overload

  • The command is basically a shorthand for an API call, so any special chars and white spaces in subscription or Tenant names must be properly encoded.


Comments


bottom of page