Skip to main content
The /analysis/azure/analyze resource is used to collect Microsoft Azure infrastructure data and initiate optimization analysis with the collected data. The following processes occur when the first /analysis/azure/analyze request is triggered:
  1. Set up and initiate data collection of the specified Azure subscription and schedule it to run automatically on a nightly basis.
  2. Initiate analysis on the data collected using the default policy.
    • Subsequent analysis is scheduled to run on a nightly basis after the completion of data collection.
    • Optionally, you can configure the results to be sent to a webhook URI upon analysis completion. See Add webhook to an analysis for details.
  3. Once data collection succeeds and an analysisId is created for the subscription, you can track progress with /analysis/cloud/azure/<analysisId>/status or wait for the results to be published to an optional webhook URI. Subscriptions that have not produced an analysisId (for example, unsupported resources or insufficient data) cannot use the status endpoint until an analysis run begins.
  4. The reporting database update is scheduled to run automatically on a nightly basis after the completion of the analysis. This process produces reports for each instance recommendation, which is useful for analysts or application owners. These reports are only created after the scheduled analysis is completed, and may therefore only be available on the following day for a new analysis. Exact timing depends on the size of your environment.
When onboarding a subscription using the /analysis/cloud/azure/analyze endpoint, receiving a 200 status code signals that the onboarding was successful.
The /analysis/cloud/azure resource is also used to return a list of Microsoft Azure optimization analyses currently in Kubex.

Analysis Update

You can make an ad-hoc request to refresh an existing analysis, outside of the scheduled nightly run using /analysis/cloud/<aws|azure|gcp>/analyze. This manual, ad hoc analysis request does not perform data collection or reporting database updates. It only runs the analysis on the existing data collected with the following behavior:
  • The analysis uses the policy that is configured for the analysis. Contact support@kubex.ai to change the configured policy.
  • If a new webhook is provided, the analysis will send results to the new webhook URI. If no webhook is provided, the analysis will send results to the existing webhook, if configured.
  • If the same analysis is already running, the request does not proceed and an appropriate message is returned.
  • If the specified analysis has data collection scheduled within 30 minutes, the request does not proceed and an appropriate message is returned. For example, if data collection is scheduled to run at 12:05 AM, and you initiate a manual, ad hoc analyze request at 11:45 PM, then the analysis will not proceed and an error message is returned.

Prerequisite Configuration

Before you can collect Azure cloud infrastructure data in Kubex, you need to create a service principle and configure a secret key. See Microsoft Azure Data Collection Prerequisites for a Service Principal for details on creating and configuring the service principle.
When using the Kubex API only the Azure “Service Principal” can be used to connect to your Azure subscriptions.
If you are using the API, data collection and analysis are created and then refreshed daily on a per subscription basis (1-to-1). You can associate many subscriptions with a service principle, but when using the API to initiate data collection, you must specify a subscription ID and the audit and analysis are created for each subscription, separately. When using the Connection Wizard in the Kubex UI, you do not need the subscription ID, as all subscriptions that are associated with the service principle are collected and listed once the connection has been verified. You can then select one or more of the subscriptions that you want to analyze (1-to-Many). When using the Connection Wizard, data collection and analysis are created and then refreshed daily for all of the subscriptions that you selected when you created the connection.
When using the Kubex API only one subscription will be processed per API request. This is the case, even if more than one subscription is associated with the service principle.

Changing Credentials

When you need to change the credentials for the subscription or the service principle, you need to delete the data collection audit and recreate it. When you delete the audit, only the audit and all associated scheduler entries are removed, so you can recreate the audit with the new credentials and continue without any loss of data.

Resource

/analysis/cloud/azure/analyze
/analysis/cloud/azure

Endpoints

Analyze Azure

Get Azure Analyses Status

List Azure Analyses