Install and configure the Microsoft Azure app
Observe Azure Collection Setup
Registering Resource Providers
In order for the collection to work and install properly, you must ensure that the following resource providers are registered for your subscription:
Microsoft.InsightsMicrosoft.KeyVaultMicrosoft.EventHubMicrosoft.Web
Verify that the following resource providers are also registered, as these are accessed by the timer_resources_func function for sending resource metadata to Observe.
Microsoft.ComputeMicrosoft.StorageMicrosoft.NetworkMicrosoft.SqlMicrosoft.ContainerServiceMicrosoft.Resources
Microsoft Documentation provides guidance on how to register resource providers using the Azure Portal, Azure CLI, and Azure PowerShell.
User Principal Access
The setup below shows how to install the collection by authenticating as a user principal via az login
The collection will create resources, such as an application registration and its associated service principal, which will require elevated privileges.
Ensure your user principal has the following subscription scoped roles at minimum:
Contributor(Privileged administrator role)User Access AdministratororApplication Administrator(Privileged administrator role)
See Azure documentation for more information on how to assign roles.
NoteYou may see an error similar to below during install if you do not have the required roles set correctly:
ApplicationsClient.BaseClient.Post(): unexpected status 403 with OData error: Authorization_RequestDenied: Insufficient privileges to complete the operation
Location
NoteThe collection must be deployed to each region in each subscription.
When you create an Azure data collection using Terraform or Azure Resource Manager, you need to specify an Azure location. Find the location of your Azure services by looking at the Resource groups page or each Azure service page, such as Azure Virtual Machines. Use the following Azure CLI command to find the right naming convention for your Azure services:
$ az account list-locations --output table
DisplayName Name Regional Display Name
------------ ---- ---------------------
East US eastus (US) East US
East US 2 eastus2 (US) East US 2
South Central US southcentralus (US) South Central US
For example, if you have a Virtual Machine (VM) located in the East US, use location = "eastus" in the Terraform configuration, or --location eastus in Azure Resource Manager.
Install the Microsoft Azure app
You can install the Microsoft Azure app from the Applications page, using Terraform, or from Azure Resource Manager.
Microsoft Azure app
You can install the Microsoft Azure app from the Applications page.
- From the left navigation rail, select Data & integrations > Applications.
- Click the Install new tab.
- Find and click the Microsoft Azure panel.
- Click Install and follow the on-screen instructions to complete the installation.
- After the app is installed, click Configuration and select the Azure integrations to install using the app.
- Select Connections.
- Click Create connection. This creates an ingest token to use with the data stream.
- Follow the instructions to create the ingest token.
Terraform
Before you begin, you should, at a minimum, have a Datastream available to send Azure data, including an ingest token to be employed by the Data Collection Module terraform-azure-collection.
-
Install the Azure CLI and Azure's Functions Core Tools
-
Be sure the Azure CLI installs correctly by logging into Azure.
az login- The token from your browser looks like this:
[
{
"cloudName": "AzureCloud",
"homeTenantId": "########-####-####-####-############",
"id": "########-####-####-####-############",
"isDefault": true,
"managedByTenants": [],
"name": "Acme Inc",
"state": "Enabled",
"tenantId": "########-####-####-####-############",
"user": {
"name": "[email protected]",
"type": "user"
}
}
]- If you have multiple subscription / tenant, then use below command to set correct subscription/tenant where you would like to deploy Observe Azure collection stack -
az account set --subscription "My Demos"OR
az login --tenant <tenant>For details on Azure subscription/tenant follow here.
- Clone the Observe Terraform Collection Module repository locally.
git clone [email protected]:observeinc/terraform-azure-collection.git- Assign the Application Variables.
Inside the root of the terraform-azure-collection, create a file called azure.auto.tfvars. The file contains the following content:
observe_customer = "{OBSERVE_CUSTOMER_ID}"
observe_token = "{DATASTREAM_INGEST_TOKEN}"
observe_domain = "{OBSERVE_DOMAIN}" #i.e. observeinc.com
timer_resources_func_schedule = "{TIMER_TRIGGER_FUNCTION_SCHEDULE}"
timer_vm_metrics_func_schedule = "{TIMER_TRIGGER_FUNCTION_SCHEDULE}"
location = "{AZURE_REGIONAL_NAME}"- Your Observe Customer ID is the 12 digit number at the beginning of the URL that you access Observe with, such as
https://**123456789012**.observeinc.com. - Some Observe instances may optionally use a name instead of Customer ID; if this is the case for your instance, contact your Observe Data Engineer to discuss implementation. A stem name will work as is, but a DNS redirect name may require special configuration.
NoteThe Azure app assigns these default values:
timer_resources_func_scheduleis the schedule used to collect data from your Azure resources.timer_vm_metrics_func_schedule- is the schedule used to collect metrics on your Virtual Machines.Both values based on NCRONTAB.
The location value sets the Azure Regional Name to eastus by default.
- Deploy the Azure collection module.
Inside the root directory of the terraform-azure-collection module, run the following commands:
terraform init
terraform apply -auto-approveData collection should begin shortly.
NoteTo capture logs and metrics of most resources, you must add diagnostic settings. Resource metadata collection is done automatically although data can take up to 20 minutes to show up in Observe. Check the Microsoft Azure function logs to ensure desired results.
- Collecting data from multiple locations - To collect data from multiple locations, re-deploy the Observe Azure Collection with the updated location you want to collect data.
Azure Resource Manager
- Create an App Registration by searching for App Registrations in the Search bar, and then clicking New registration. Create for the Registration.
- Create a Client Secret by clicking “Add a certificate or secret”.
- Record the following 3 values:
- Secret Value (K3j8… in the above screenshot)
- Application ID (58339 in the first screenshot)
- Object ID (31a56… in the first screenshot)
- Search for Enterprise Applications in the top search bar.
- Record the Enterprise App Object ID (3aca… in the above screenshot)
- Initialize Azure Cloud Shell or another shell environment.
az login
- If you have multiple subscription / tenant, then use below command to set correct subscription/tenant where you would like to deploy Observe Azure collection stack -
az account set --subscription "My Demos"OR
az login --tenant <tenant>For details on Azure subscription/tenant follow here.
- Download the Observe Azure Resource Manager template.
Using Bash
curl -Lo resourcemanager-latest.json https://observeinc.s3.us-west-2.amazonaws.com/azure/resourcemanager-latest.json
Using PowerShell
Invoke-WebRequest -Uri https://observeinc.s3.us-west-2.amazonaws.com/azure/resourcemanager-latest.json -OutFile resourcemanager-latest.json
- Enter the following text in the shell. Run the command to create the resource.
az deployment sub create \
--name observe \
--location <THE_AZURE_LOCATION_TO_MONITOR> \
--template-file resourcemanager-latest.json \
--parameters \
observe_customer=<YOUR_CUSTOMER_ID> \
observe_token=<YOUR_DATASTREAM_TOKEN> \
objectId=31a56... \
applicationId=58339... \
clientSecretValue=K3j8... \
enterpriseAppObjectId=3aca8...
- After a few minutes, the command generates the subscription.
Data collection should begin shortly.
NoteTo capture logs and metrics of most resources, you must add diagnostic settings as shown below. Resource metadata collection is done automatically although data can take up to 20 minutes to show up in Observe.
- To collect data from multiple locations, re-deploy the Observe Azure Collection with the updated location you want to collect data.
Updated about 1 month ago