top of page
nmsguru

Azure Sensor Pack - Fully Unattended Auto Discovery and Monitoring in PRTG

Updated: Aug 7, 2022

Many of our customers has requested the ability of running the AutoMonX Azure Sensor pack in the background and automatically handle the tedious job of discovering and adding new Azure resources to monitoring in PRTG.

We are pleased to announce, that starting with version v4.1.7, thanks to our Monitoring Automation new features, and some important improvements in our Azure auto-discovery, the AutoMonX Azure Sensor pack can function in a fully automated and unattended mode.


But first, some terms we use in this article:

  • PRTG Group - logical group(s) created in PRTG either manually or by the Azure Sensor pack

  • Resources - Azure Resources (such as SQL, WebFarm etc) that are represented in PRTG as devices

  • Sensors - PRTG Sensors, typically two main types are created by the Azure Sensor pack: Azure App Health and Azure App Metrics

  • Metrics - Azure resources monitoring metrics that are represented in PRTG as channels of the sensors created by the Azure Sensor pack

Overview:

The AutoMonX Azure Sensor pack auto-discovery (see this blog post) is capable of scanning your Azure Tenant(s) and their underlying subscriptions and discover all your Azure resources and their performance metrics.

In releases prior to v4.1.7, you had to utilize our UI to initiate Auto-discovery and based on its findings, choose which resources to add to PRTG. Recently, we have introduced several configuration files and some CLI commands that make this process fully automated.


How does the Unattended Auto Discovery and Monitoring Works ?

  1. Auto-discovery, initiated via CLI, it runs and produces a CSV file for each Azure subscription (i.e. microsoft partner networkDiscoveryData.csv)

  2. Monitoring Automation, also initiated via CLI, works as follows:

2.1 Step 1 - White list

  1. Monitoring automation considers the auto-discovery data against the rules located in the include_mon.csv file (see below):

b. If the file is empty, no filtering is applied and all the Azure resources and metrics are moved to the next step

c. If the file has settings, whitelist filtering is applied: only Groups/Device categories

and sensor types mentioned in the file are passed to the next step


2.2 Step 2 - Black list

Monitoring Automation compares the results of the previous step (white list) and

the content of exclude_mon.csv file

a. If the file is empty, no filtering is applied and all the Azure resources and metrics from

step 1 are added to PRTG


b. If the file has settings, blacklist filtering is applied - only the Azure resource types that

are not listed in exclude_mon.csv, are added to PRTG


Important: make sure to save your changes to any of the CSV files below and keep the format as CSV



3. PRTG Channels filtering: The Azure Sensor considers both of the file types mentioned above and adds only relevant Azure metrics (channels) to PRTG.


Relevant CLI commands:

  • Discover all subscriptions and resources (single Tenant)

AutoMonX_AzureSensor.exe -discovery -sub -All

  • Discover resources of a specific subscription (single Tenant)

AutoMonX_AzureSensor.exe -discovery -sub <Subscription Name>

  • Discover a specific Tenant and all its subscriptions (Multi-tenant environment, appropriate license requred)

AutoMonX_AzureSensor.exe -discovery -sub -All -tenant <tenant_id>


  • Use the PRTG Automation to add the discovered resources to PRTG in a typical structure created by our Auto-discovery

AutoMonX_PRTG_Automation.exe -file <automation>.csv -p <passhash> -group <pre-created PRTG group>



Four easy steps for setting-up fully-automated Azure Monitoring

  1. Prepare Azure credentials: Make sure to configure the Azure Sensor pack via our UI to properly communicate with Azure (as explained in our deployment guide and let it fully auto-discover your Azure estate.

  2. Prepare the filter files: Decide which Azure resources and metrics are of interest. Edit the include_mon.csv and exclude_mon.csv files accordingly

  3. Prepare PRTG credentials: Make sure to add the PRTG username to AutoMonX_PRTG_Automation.ini located at AutoMonX\Azure\Common directory and obtain its passhash (you need it for the next step)

  4. Setup a Windows scheduled task that would run Auto Discovery and Monitoring automation. Use the contributed batch file Amx_Discovery_Addition.cmd located at AutoMonX\Azure\Contrib directory

You need to supply two important parameters to the batch file:

  1. The PRTG group where the Azure sensors would be located (make sure it exists, or create one)

  2. The PRTG user passhash (not the same as password)





251 views0 comments

Recent Posts

See All

Comments


bottom of page