Defining Azure Observer jobs

Using the Azure Observer, you can define a full load job that will read data from Azure cloud services through its REST APIs and generate a topology.

Before you begin

Important: The Azure Observer supports the cloud/SaaS Azure version.
Tip: To configure access to Azure resources, see the following information: Create an Azure Active Directory application and service principal that can access resources

Ensure you have the Azure details to hand, such as the Tenant ID, Client ID, and client password before running the observer job.

Remember: Swagger documentation for the observer is available at the following default location: https://<your host>/1.0/azure-observer/swagger

The observer is installed as part of the core installation procedure.

About this task

The Azure Observer retrieves topology data from Azure cloud services via REST APIs exposed by the Azure API server. In addition to the standard resources, the following resources are now also supported::
  • Load Balancers
  • Virtual Machine Scale Set
  • Virtual Network Gateway (including VPN Gateway and Express Route Gateway)
  • ExpressRoute
azure_observer_common.sh
The configuration file you use to customize Azure Observer settings.
The parameters defined here are then used by the azure_observer_load_start.sh script to trigger the Azure Observer jobs.
Tip: Alternatively, you can set the appropriate environment variables. If an environment variable is set, it takes precedence over the configuration file settings.
You define and start the following job. You must edit the parameters in the configuration file before running this job.
Full Topology Upload job
A transient (one-off) job that loads all requested topology data.
This job is started by the azure_observer_load_start.sh script and loads all supported resources.

Procedure

To edit the parameters in the configuration file

  1. Open the azure_observer_common.sh configuration file and edit (at least) the following parameters:
    data_center
    The data center running the Azure server
    tenant_id
    The tenant id associated with tenant
    client_id
    The client/application id Azure generated when the application was registered
    client_secret
    The client/application password associated with the client id in encrypted form
    Encryption requirement:
    The Load job requires the client_secret in the configuration file in encrypted form. To encrypt, run the encrypt_password.sh script in the ASM_HOME/bin directory:
    ./bin/encrypt_password.sh 
    Enter and then confirm the client_secret. The encryption utility will return an encrypted version.

To start the Load job

  1. To start the Azure Observer Full Topology Upload job, use the following command:
    $ASM_HOME/bin/azure_observer_load_start.sh

Results

This job loads all requested topology data, and runs only once. Run this job whenever you need the Azure topology data refreshed.

What to do next

You can also use the following scripts:
azure_observer_load_stop.sh
Stops the Load job
azure_observer_job_list.sh
Lists the status of current jobs
azure_observer_log_level.sh
Sets the log level
Remember: As an alternative to being configured using the Observer Configuration UI, observer jobs have scripts to start and stop all available jobs, to list the status of a current job, and to set its logging levels. These scripts can be run with -h or --help to display help information, and with -v or --verbose to print out the details of the actions performed by the script, including the full cURL command. For the on-prem version of Agile Service Manager, observer scripts are configured for specific jobs by editing the script configuration files.