Skip to content

Latest commit

 

History

History
81 lines (66 loc) · 6.6 KB

File metadata and controls

81 lines (66 loc) · 6.6 KB
page_type languages products urlFragment
sample
python
azure
azure-cognitive-services
metricsadvisor-samples

Samples for Azure Metrics Advisor client library for Python

These code samples show common scenario operations with the Azure Metrics Advisor client library. The async versions of the samples require Python 3.6 or later.

File Name Description
sample_alert_configuration.py and sample_alert_configuration_async.py Create, list, get, update, and delete anomaly alert configurations. Also list alerts and anomalies for a specific alert configuration.
sample_authentication.py and sample_authentication_async.py Authenticate the clients
sample_data_feeds.py and sample_data_feeds_async.py Create, list, get, update, and delete data feeds
sample_datasource_credentials.py and sample_datasource_credentials_async.py Create, list, get, update, and delete datasource credentials
sample_detection_configuration.py and sample_detection_configuration_async.py Create, list, get, update, and delete anomaly detection configurations
sample_feedback.py and sample_feedback_async.py Add, get, and list feedback for the anomaly detection result
sample_hooks.py and sample_hooks_async.py Create, list, get, update, and delete notification hooks
sample_incidents.py and sample_incidents_async.py List incidents and root causes
sample_ingestion.py and sample_ingestion_async.py Check on the data feed ingestion progress, list ingestion statuses, and refresh data feed ingestion
sample_queries.py and sample_queries_async.py Query dimensions/data/status/etc.

Prerequisites

Setup

  1. Install the Azure Metrics Advisor client library for Python with pip:
pip install azure-ai-metricsadvisor --pre
  1. Clone or download this sample repository
  2. Open the sample folder in Visual Studio Code or your IDE of choice.

Running the samples

  1. Open a terminal window and cd to the directory that the samples are saved in.
  2. Set the environment variables specified in the sample file you wish to run.
  3. Follow the usage described in the file, e.g. python sample_data_feeds.py

Next steps

Check out the reference documentation to learn more about what you can do with the Azure Metrics Advisor client library.