page_type | languages | products | urlFragment | |||
---|---|---|---|---|---|---|
sample |
|
|
metricsadvisor-samples |
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. |
- Python 2.7, or 3.6 or later is required to use this package (3.6 or later if using asyncio)
- You must have an Azure subscription and an Azure Metrics Advisor account to run these samples.
- Install the Azure Metrics Advisor client library for Python with pip:
pip install azure-ai-metricsadvisor --pre
- Clone or download this sample repository
- Open the sample folder in Visual Studio Code or your IDE of choice.
- Open a terminal window and
cd
to the directory that the samples are saved in. - Set the environment variables specified in the sample file you wish to run.
- Follow the usage described in the file, e.g.
python sample_data_feeds.py
Check out the reference documentation to learn more about what you can do with the Azure Metrics Advisor client library.