[Monitor] alert-rule create exposes 'alert-rule-resource-name' and 'name'
Description
Command
az monitor alert-rules create: Creates or updates an alert rule.
Arguments
--alert-rule-resource-name [Required]: The name of the alert rule.
--condition [Required]: JSON encoded condition configuration. Use @{file} to load
from a file.
--is-enabled [Required]: The flag that indicates whether the alert rule is
enabled.
--name -n [Required]: The name of the rule.
--actions : JSON encoded array of actions that are performed when the
alert rule becomes active, and when an alert condition is
resolved. Use @{file} to load from a file.
--description : The description of the alert rule that will be included
in the alert email.
--location -l : Location. You can configure the default location using
`az configure --defaults location=<location>`. Default:
westus.
--resource-group -g : Name of resource group. You can configure the default
group using `az configure --defaults group=<name>`.
Default: tjp-vm.
--tags : Resource tags.
This exposes two required parameters: --alert-rule-resource-name and --name. Both refer to the same thing and NEITHER refer to the name or ID of the target resource (which is actually buried deep inside the condition object--FUN TIMES).
Also, in general this command is painfully unusable.
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: dev_setup.py
CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: latest master
OS Version: What OS and version are you using?
Answer here: Windows 10 CU
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: cmd.exe
Wanted to comment..
the --condition parameter is not documented in the CLI.
--condition @{condition}
the file condition: (which I had to guess how to write from looking up the REST API)
{ "odatatype": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator": "GreaterThan", "threshold": "90.0", "window_size" : "PT15M" }
And in the python code of CLI 2.0 the windowSize Key will not go thru Python to Azure cloud. window_size key will pass thru.
help on the command produces
az monitor alert-rules create --is-enabled IS_ENABLED --name JeffFallRuleTestCPU --resource-group HCM-Monitoring-RG --alert-rule-resource-name /subscriptions/my_subscription/H-Monitoring-R/providers/Microsoft.Compute/virtualMachines/my_vm --location westus --condition @{condition} --help
Arguments
--alert-rule-resource-name [Required]: The name of the alert rule.
--is-enabled [Required]: The flag that indicates whether the alert rule is
enabled.
--location -l [Required]: Location. You can configure the default location using
'az configure --defaults location=
Global Arguments --debug : Increase logging verbosity to show all debug logs. --help -h : Show this help message and exit. --output -o : Output format. Allowed values: json, jsonc, table, tsv. Default: json. --query : JMESPath query string. See http://jmespath.org/ for more information and examples. --verbose : Increase logging verbosity. Use --debug for full debug logs.
The real problem and bummer is the --condition command.
--condition : JSON encoded condition configuration. Use @{file} to load from a file.
How to construct the condition file?
{ "odatatype": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator": "GreaterThan", "threshold": "90.0", "window_size" : "PT15M" }
So you run the command to create an alert with the above condition file:
c5256381% az monitor alert-rules create --is-enabled IS_ENABLED --name JeffFallRuleTestCPU --resource-group HCM-Monitoring-RG --alert-rule-resource-name /subscriptions/my_subscription/resourceGroups/H-Monitoring-R/providers/Microsoft.Compute/virtualMachines/my_vm --location westus --condition @{condition}
And this comes back in RED
Request content is not well formed or supported.
Which is so not helpful.
REALLY NEED --help on this command spells out the JSON exactly of how to make the --condition @{file}
put from --help
A clear JSON example of what is in FILE.
This will be HELPFUL to all trying to create monitoring rules from the Azure CLI 2.0.
I have found GREAT comments in the Python code.. But should I really need to resort to reading Python code?
Been trying trial and error on this for almost two days now. And tjpresscott has been a GREAT HELP for me. Thank you!!
I have been tasked with the automation of creating alert rules on the fly. I know templates can do this too.
But we really want Azure CLI 2.0 to be able to create alert rules too for monitoring.
Would there be a way for someone to post a working command to create a monitor alert rule? I just need ONE example that will actually create a rule.
Then I can go from there.
I had no idea the --args were misnamed. I can see why that could be confusing and convoluted.
We are at V 2.0.3 on Azure CLI 2.0.
Two requests:
-
Can someone post a working command for Azure CLI V 2.0.3 with all the params in place and a conditions file to actually create an Azure Monitoring Alert.
-
When and where can I get the Azure CLI 2.0.4 ? :-)
As always, your response and feedback is GREATLY APPRECIATED from out here in the trenches.
Digging...
/azure-cli/lib/python2.7/site-packages/azure/mgmt/resource/resources/v2016_09_01/operations/resources_operations.py:
/subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
So resource-name is just the name of my VM?
So these two arguments are the paradox:
--azure-resource-name : Azure resource name.
And I see the similarity
--alert-rule-resource-name [Required]: The name of the alert rule. --is-enabled [Required]: The flag that indicates whether the alert rule is enabled. --location -l [Required]: Location. You can configure the default location using 'az configure --defaults location='. --name -n [Required]: The name of the rule.
--alert-rule-resource-name?? Name of alert rule? or name of VM or object the rule applies to? This one above is the mystery
--name Name of Rule. So this one I just name some name I make up. Which is cool.
They are BOTH the name of the rule (but the service ignores 'name'). That is the bug. Your VM ID goes inside the "condition" object.
And to be clear, this will be fixed in the near future because it is absurd.
az monitor alert-rules create --is-enabled true --name JeffFallRuleTestCPU -g HCM-Monitoring-RG --alert-rule-resource-name JeffFailRuleTestCPU --location westus --condition @{condition}
Well, and you'd probably want to add the actions with @{action}
Well finally I got a different response. I hit a nerve?
az monitor alert-rules create --is-enabled IS_ENABLED --condition @{jeffcondition} --resource-group /resourceGroups/HCM-Monitoring-RG --alert-rule-resource-name /providers/Microsoft.Compute/virtualMachines/hcm99mon01 --name JeffFallTestRule2 --location westus The api-version '2016-03-01' is invalid. The supported versions are '2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'. [ZZZM00650289A:~] c5256381%
More promising. but still blows up.
az monitor alert-rules create --is-enabled IS_ENABLED true --condition @{jeffcondition} --resource-group /resourceGroups/HCM-Monitoring-RG --alert-rule-resource-name /providers/Microsoft.Compute/virtualMachines/hcm99mon01 --name JeffFallTestRule2 --alert-rule-resource-name JeffFallTestRule2 --location westus
The ID of your VM goes inside of jeffcondition in the data source piece
az monitor alert-rules create --is-enabled true --name JeffFallRuleTestCPU -g HCM-Monitoring-RG --alert-rule-resource-name JeffFallRuleTestCPU --location westus --condition @{jeffcondition}
Request content is not well formed or supported.
{ "data_source": { "metric_name": "Percentage CPU", "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resource_uri": "/subscriptions/my_subscription/resourceGroups/HCM-Monitoring-RG/providers/Microsoft.Compute/virtualMachines/hcm99mon01" }, "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator" : "GreaterThan", "threshold": 90, "time_aggregation" : "Average", "window_size": "PT5M" }
[ZZZM00650289A:~] c5256381% az monitor alert-rules create --is-enabled IS_ENABLED --name JeffFallRuleTestCPU --resource-group HCM-Monitoring-RG --alert-rule-resource-name JeffFallRuleTestCPU --location westus --condition @{traviscondition}
Request content is not well formed or supported
more traviscondition { "odatatype": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "data_source": { "odatatype": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resource_uri": "/subscriptions/my_subscription/resourceGroups/HCM-Monitoring-RG/providers/Microsoft.Compute/virtualMachines/hcm99mon01", "metric_name": "\Processor Information(_Total)\% Processor Time" }, "operator": "GreaterThan", "threshold": 90.0, "time_aggregation": "Average", "window_size" : "0:05:00" }
This command seems to get further.
[ZZZM00650289A:~] c5256381% az monitor alert-rules create --is-enabled IS_ENABLED --condition @{jeffcondition} --resource-group /resourceGroups/HCM-Monitoring-RG --alert-rule-resource-name /providers/Microsoft.Compute/virtualMachines/hcm99mon01 --name JeffFallTestRule2 --location westus The api-version '2016-03-01' is invalid. The supported versions are '2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
Seems the API version is peppered throughout the Azure API 2.0.3. sigh....
Could I simply change the API version to one that the Azure Cloud accepts?
Wish Azure CLI 2.0.4 was ready..
Binary file ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/usage_metrics_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure_cli_acr-2.0.1.dist-info/DESCRIPTION.rst:* [ACR] Update to 2017-03-01 api-version (#2563) ./azure-cli/lib/python2.7/site-packages/azure_cli_acr-2.0.1.dist-info/METADATA:* [ACR] Update to 2017-03-01 api-version (#2563) [ZZZM00650289A:~/lib] c5256381% find . | xargs grep -s "2016-03-01" * ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.pyc matches [ZZZM00650289A:~/lib] c5256381%
Binary file ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/usage_metrics_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure_cli_acr-2.0.1.dist-info/DESCRIPTION.rst:* [ACR] Update to 2017-03-01 api-version (#2563) ./azure-cli/lib/python2.7/site-packages/azure_cli_acr-2.0.1.dist-info/METADATA:* [ACR] Update to 2017-03-01 api-version (#2563) [ZZZM00650289A:~/lib] c5256381% find . | xargs grep -s "2016-03-01" * ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rule_incidents_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/alert_rules_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/operations/log_profiles_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/certificates_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/deleted_web_apps_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.py: :ivar api_version: API Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/operations/recommendations_operations.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.py: api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/web/web_site_management_client.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.py: :ivar api_version: Client Api Version. Constant value: "2016-03-01". ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.py: self.api_version = "2016-03-01" Binary file ./azure-cli/lib/python2.7/site-packages/azure/monitor/operations/metric_definitions_operations.pyc matches [ZZZM00650289A:~/lib] c5256381%
The change will not be in 2.0.4, unfortunately. However, I just tested this and this works...
{
"dataSource": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resourceUri": "<your resource ID here>",
"metricName": "Percentage CPU"
},
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"operator": "GreaterThan",
"threshold": 90,
"windowSize": "PT5M",
"timeAggregation": "Average"
}
az monitor alert-rules create -g <your RG> --alert-rule-resource-name rule1 --name rule1 --condition @cond.json --is-enabled true
Which cloud are you trying to run against?
Hi Travis,
How can I tell what cloud I am running against?
I am logged into Azure at http://portal.azure.com
I tried to find a HELP About or a version for the Azure cloud.
NO luck.
and thank you for the new conditions file.
Thank you for taking an interest and giving me a hand with this.
On 4/28/17 12:39 PM, Travis Prescott wrote:
Which cloud are you trying to run against?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/3052#issuecomment-298088653, or mute the thread https://github.com/notifications/unsubscribe-auth/AA64_C35KyABc2cKuk5z-0omXMiL_s2Fks5r0kBagaJpZM4NKzTx.
HI Travis, Can I please ask you for a good download link of the Azure CLI 2.0.3 you are using?
I have given the commands you sent me a try..
more travistested { "dataSource": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resourceUri": "/subscriptions/my_subscription/resourceGroups/HCM-Monitoring-RG/providers/Microsoft.Compute/virtualMachines/hcm99mon01", "metricName": "Percentage CPU" }, "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator": "GreaterThan", "threshold": 90, "windowSize": "PT5M", "timeAggregation": "Average" }
az monitor alert-rules create -g HCM-Monitoring-RG --alert-rule-resource-name rule1 --name rule1 --condition @travistested --is-enabled true --location westus u'windowSize' Traceback (most recent call last): File "/Users/c5256381/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 36, in main cmd_result = APPLICATION.execute(args) File "/Users/c5256381/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/application.py", line 201, in execute result = expanded_arg.func(params) File "/Users/c5256381/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/commands/init.py", line 403, in _execute_command raise ex KeyError: u'windowSize' [ZZZM00650289A:~] c5256381%
This is where I get the CLI from:
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli#macos
curl -L https://aka.ms/InstallAzureCli | bash
And since this Azure CLI 2.0.3 loaded onto my macOS Sierra is rejecting the keywords
KeyError: u'windowSize'
I am betting you have a CLI like 2.0.3a or 2.0.3.1 or such?
Well, I'm running off of master. You probably have the latest public build. Try this:
{
"data_source": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resource_uri": "<your resource ID here>",
"metric_name": "Percentage CPU"
},
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"operator": "GreaterThan",
"threshold": 90,
"window_size": "PT5M",
"time_aggregation": "Average"
}
The case conversion will be in the next release but until then you'd need to make sure to use python_casing instead of CamelCasing.
Hi Travis, DataSource bombed. So changed it to data_source.
Can you please give me a link to pull Azure CLI 2.0.3 from master?
{ "data_source": { "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resource_uri": "/subscriptions/my_subscription/resourceGroups/HCM-Monitoring-RG/providers/Microsoft.Compute/virtualMachines/hcm99mon01", "metric_name": "Percentage CPU" }, "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator": "GreaterThan", "threshold": 90, "window_size": "PT5M", "time_aggregation": "Average" }
[ZZZM00650289A:~] c5256381% az monitor alert-rules create -g HCM-Monitoring-RG --alert-rule-resource-name rule1 --name rule1 --condition @travistested2 --is-enabled true --location westus Request content is not well formed or supported.
Probably my Azure CLI 2.0.3 is just not compatible from the public source.
Thanks to your kind help I think I will get this finally working today. Which will be a great way to end a Friday.
azure-cli-monitor 0.0.3 was just released so you might give that a try and see if it unblocks your scenario.
Hi Travis,
Found nightly and trying that..
pip3 install --pre azure-cli --extra-index-url https://azureclinightly.blob.core.windows.net/packages
Is there a link for:
azure-cli-monitor 0.0.3???
https://www.google.com/search?q=azure-cli-monitor&rlz=1C5CHFA_enUS734US734&oq=azure-cli-monitor&aqs=chrome..69i57j0l5.9616j0j8&sourceid=chrome&ie=UTF-8#q=azure-cli-monitor+0.0.3+download
Is azure-cli-monitor a subset of Azure CLI 2.0?
Or a standalone package?
Been on Azure for about 5 days so sorry if a bit noob.
On 4/28/17 2:31 PM, Travis Prescott wrote:
azure-cli-monitor 0.0.3
Users/c5256381/azure-nightly sh-3.2# pip3 install --pre azure-cli --extra-index-url https://azureclinightly.blob.core.windows.net/packages Collecting azure-cli Downloading azure_cli-2.0.4-py2.py3-none-any.whl Collecting azure-cli-storage (from azure-cli) Downloading azure_cli_storage-2.0.4-py2.py3-none-any.whl (45kB) 100% |████████████████████████████████| 51kB 300kB/s Collecting azure-cli-batch (from azure-cli) Downloading azure_cli_batch-2.0.2-py2.py3-none-any.whl Collecting azure-cli-documentdb (from azure-cli) Downloading azure_cli_documentdb-0.1.4-py2.py3-none-any.whl Collecting azure-cli-network (from azure-cli) Downloading azure_cli_network-2.0.4-py2.py3-none-any.whl (72kB) 100% |████████████████████████████████| 81kB 1.9MB/s Collecting azure-cli-appservice (from azure-cli) Downloading azure_cli_appservice-0.1.4-py2.py3-none-any.whl Collecting azure-cli-keyvault (from azure-cli) Downloading azure_cli_keyvault-2.0.2-py2.py3-none-any.whl Collecting azure-cli-profile (from azure-cli) Downloading azure_cli_profile-2.0.4-py2.py3-none-any.whl Collecting azure-cli-feedback (from azure-cli) Downloading azure_cli_feedback-2.0.2-py2.py3-none-any.whl Collecting azure-cli-lab (from azure-cli) Downloading azure_cli_lab-0.0.3-py2.py3-none-any.whl Collecting azure-cli-acs (from azure-cli) Downloading azure_cli_acs-2.0.4-py2.py3-none-any.whl Collecting azure-cli-configure (from azure-cli) Downloading azure_cli_configure-2.0.4-py2.py3-none-any.whl Collecting azure-cli-vm (from azure-cli) Downloading azure_cli_vm-2.0.4-py2.py3-none-any.whl (64kB) 100% |████████████████████████████████| 71kB 2.0MB/s Collecting azure-cli-container (from azure-cli) Downloading azure_cli_container-0.1.4-py2.py3-none-any.whl Collecting azure-cli-nspkg>=2.0.0 (from azure-cli) Downloading https://azureclinightly.blob.core.windows.net/packages/azure-cli-nspkg/azure_cli_nspkg-3.0.0+1.dev20170427-py2.py3-none-any.whl Collecting azure-cli-core (from azure-cli) Downloading azure_cli_core-2.0.4-py2.py3-none-any.whl (82kB) 100% |████████████████████████████████| 92kB 2.1MB/s Collecting azure-cli-sql (from azure-cli) Downloading azure_cli_sql-2.0.2-py2.py3-none-any.whl Collecting azure-cli-iot (from azure-cli) Downloading azure_cli_iot-0.1.4-py2.py3-none-any.whl Collecting azure-cli-monitor (from azure-cli) Downloading azure_cli_monitor-0.0.3-py2.py3-none-any.whl Collecting azure-cli-component (from azure-cli) Downloading azure_cli_component-2.0.2-py2.py3-none-any.whl Collecting azure-cli-role (from azure-cli) Downloading azure_cli_role-2.0.3-py2.py3-none-any.whl Collecting azure-cli-cloud (from azure-cli) Downloading azure_cli_cloud-2.0.2-py2.py3-none-any.whl Collecting azure-cli-resource (from azure-cli) Downloading azure_cli_resource-2.0.4-py2.py3-none-any.whl Collecting azure-cli-redis (from azure-cli) Downloading azure_cli_redis-0.2.1-py2.py3-none-any.whl Collecting azure-cli-acr (from azure-cli) Downloading azure_cli_acr-2.0.2-py2.py3-none-any.whl Collecting azure-cli-find (from azure-cli) Downloading azure_cli_find-0.2.1-py2.py3-none-any.whl Collecting azure-multiapi-storage==0.1.0 (from azure-cli-storage->azure-cli) Downloading azure_multiapi_storage-0.1.0-py2.py3-none-any.whl (333kB) 100% |████████████████████████████████| 337kB 1.3MB/s Collecting azure-cli-command-modules-nspkg>=2.0.0 (from azure-cli-storage->azure-cli) Downloading https://azureclinightly.blob.core.windows.net/packages/azure-cli-command-modules-nspkg/azure_cli_command_modules_nspkg-2.0.0+1.dev20170427-py2.py3-none-any.whl Collecting azure-mgmt-storage==1.0.0rc1 (from azure-cli-storage->azure-cli) Downloading azure_mgmt_storage-1.0.0rc1-py2.py3-none-any.whl (61kB) 100% |████████████████████████████████| 61kB 3.4MB/s Collecting azure-mgmt-keyvault==0.31.0 (from azure-cli-batch->azure-cli) Downloading azure_mgmt_keyvault-0.31.0-py2.py3-none-any.whl Collecting azure-batch==2.0.1 (from azure-cli-batch->azure-cli) Downloading azure_batch-2.0.1-py2.py3-none-any.whl (272kB) 100% |████████████████████████████████| 276kB 1.2MB/s Collecting azure-mgmt-batch==3.0.1 (from azure-cli-batch->azure-cli) Downloading azure_mgmt_batch-3.0.1-py2.py3-none-any.whl Collecting azure-mgmt-documentdb==0.1.2 (from azure-cli-documentdb->azure-cli) Downloading azure_mgmt_documentdb-0.1.2-py2.py3-none-any.whl Collecting azure-mgmt-trafficmanager==0.30.0rc6 (from azure-cli-network->azure-cli) Downloading azure_mgmt_trafficmanager-0.30.0rc6-py2.py3-none-any.whl Collecting azure-mgmt-resource==1.0.0rc1 (from azure-cli-network->azure-cli) Downloading azure_mgmt_resource-1.0.0rc1-py2.py3-none-any.whl (203kB) 100% |████████████████████████████████| 204kB 180kB/s Collecting azure-mgmt-dns==1.0.1 (from azure-cli-network->azure-cli) Downloading azure_mgmt_dns-1.0.1-py2.py3-none-any.whl Collecting azure-mgmt-network==1.0.0rc2 (from azure-cli-network->azure-cli) Downloading azure_mgmt_network-1.0.0rc2-py2.py3-none-any.whl (804kB) 100% |████████████████████████████████| 808kB 936kB/s Collecting azure-mgmt-web==0.31.1 (from azure-cli-appservice->azure-cli) Downloading azure_mgmt_web-0.31.1-py2.py3-none-any.whl (243kB) 100% |████████████████████████████████| 245kB 1.8MB/s Collecting pyOpenSSL (from azure-cli-appservice->azure-cli) Downloading pyOpenSSL-17.0.0-py2.py3-none-any.whl (51kB) 100% |████████████████████████████████| 61kB 4.4MB/s Collecting urllib3[secure]==1.16 (from azure-cli-appservice->azure-cli) Downloading urllib3-1.16-py2.py3-none-any.whl (98kB) 100% |████████████████████████████████| 102kB 2.3MB/s Collecting xmltodict (from azure-cli-appservice->azure-cli) Downloading xmltodict-0.11.0-py2.py3-none-any.whl Collecting azure-keyvault==0.2.0 (from azure-cli-keyvault->azure-cli) Downloading azure_keyvault-0.2.0-py2.py3-none-any.whl (67kB) 100% |████████████████████████████████| 71kB 2.9MB/s Collecting adal>=0.4.3 (from azure-cli-profile->azure-cli) Downloading adal-0.4.5-py2.py3-none-any.whl (49kB) 100% |████████████████████████████████| 51kB 4.6MB/s Collecting applicationinsights (from azure-cli-feedback->azure-cli) Downloading applicationinsights-0.10.0.tar.gz Collecting azure-graphrbac==0.30.0rc6 (from azure-cli-lab->azure-cli) Downloading azure_graphrbac-0.30.0rc6-py2.py3-none-any.whl (43kB) 100% |████████████████████████████████| 51kB 4.5MB/s Collecting azure-mgmt-devtestlabs==2.0.0 (from azure-cli-lab->azure-cli) Downloading azure_mgmt_devtestlabs-2.0.0-py2.py3-none-any.whl (182kB) 100% |████████████████████████████████| 184kB 2.1MB/s Collecting azure-mgmt-authorization==0.30.0rc6 (from azure-cli-acs->azure-cli) Downloading azure_mgmt_authorization-0.30.0rc6-py2.py3-none-any.whl Collecting scp (from azure-cli-acs->azure-cli) Downloading scp-0.10.2-py2.py3-none-any.whl Collecting paramiko (from azure-cli-acs->azure-cli) Downloading paramiko-2.1.2-py2.py3-none-any.whl (172kB) 100% |████████████████████████████████| 174kB 1.2MB/s Collecting azure-mgmt-compute==1.0.0rc1 (from azure-cli-acs->azure-cli) Downloading azure_mgmt_compute-1.0.0rc1-py2.py3-none-any.whl (269kB) 100% |████████████████████████████████| 276kB 1.5MB/s Collecting sshtunnel (from azure-cli-acs->azure-cli) Downloading sshtunnel-0.1.2.tar.gz Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-cli-acs->azure-cli) Collecting pyyaml (from azure-cli-acs->azure-cli) Downloading PyYAML-3.12.tar.gz (253kB) 100% |████████████████████████████████| 256kB 1.6MB/s Requirement already satisfied: azure-nspkg>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-cli-nspkg>=2.0.0->azure-cli) Collecting msrest>=0.4.4 (from azure-cli-core->azure-cli) Downloading msrest-0.4.7-py2.py3-none-any.whl Collecting colorama (from azure-cli-core->azure-cli) Downloading colorama-0.3.9-py2.py3-none-any.whl Collecting argcomplete>=1.8.0 (from azure-cli-core->azure-cli) Downloading argcomplete-1.8.2-py2.py3-none-any.whl Collecting pygments (from azure-cli-core->azure-cli) Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB) 100% |████████████████████████████████| 849kB 261kB/s Collecting jmespath (from azure-cli-core->azure-cli) Downloading jmespath-0.9.2-py2.py3-none-any.whl Collecting msrestazure>=0.4.7 (from azure-cli-core->azure-cli) Downloading msrestazure-0.4.7-py2.py3-none-any.whl Collecting tabulate (from azure-cli-core->azure-cli) Downloading tabulate-0.7.7-py2.py3-none-any.whl Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-cli-core->azure-cli) Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-cli-core->azure-cli) Collecting azure-mgmt-sql==0.4.0 (from azure-cli-sql->azure-cli) Downloading azure_mgmt_sql-0.4.0-py2.py3-none-any.whl (80kB) 100% |████████████████████████████████| 81kB 1.6MB/s Collecting azure-mgmt-iothub==0.2.2 (from azure-cli-iot->azure-cli) Downloading azure_mgmt_iothub-0.2.2-py2.py3-none-any.whl Collecting azure-monitor==0.3.0 (from azure-cli-monitor->azure-cli) Downloading azure_monitor-0.3.0-py2.py3-none-any.whl Collecting azure-mgmt-monitor==0.2.1 (from azure-cli-monitor->azure-cli) Downloading azure_mgmt_monitor-0.2.1-py2.py3-none-any.whl (62kB) 100% |████████████████████████████████| 71kB 4.3MB/s Collecting azure-mgmt-redis==1.0.0 (from azure-cli-redis->azure-cli) Downloading azure_mgmt_redis-1.0.0-py2.py3-none-any.whl Collecting azure-mgmt-containerregistry==0.2.1 (from azure-cli-acr->azure-cli) Downloading azure_mgmt_containerregistry-0.2.1-py2.py3-none-any.whl Collecting whoosh (from azure-cli-find->azure-cli) Downloading Whoosh-2.7.4-py2.py3-none-any.whl (468kB) 100% |████████████████████████████████| 471kB 902kB/s Collecting cryptography (from azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading cryptography-1.8.1-cp36-cp36m-macosx_10_10_x86_64.whl (1.5MB) 100% |████████████████████████████████| 1.5MB 712kB/s Collecting futures (from azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading futures-3.1.1.tar.gz Requirement already satisfied: azure-common in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Requirement already satisfied: python-dateutil in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Requirement already satisfied: azure-mgmt-nspkg>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from azure-mgmt-storage==1.0.0rc1->azure-cli-storage->azure-cli) Requirement already satisfied: certifi; extra == "secure" in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from urllib3[secure]==1.16->azure-cli-appservice->azure-cli) Collecting PyJWT>=1.0.0 (from adal>=0.4.3->azure-cli-profile->azure-cli) Downloading PyJWT-1.5.0-py2.py3-none-any.whl Collecting pyasn1>=0.1.7 (from paramiko->azure-cli-acs->azure-cli) Downloading pyasn1-0.2.3-py2.py3-none-any.whl (53kB) 100% |████████████████████████████████| 61kB 2.9MB/s Collecting requests-oauthlib>=0.5.0 (from msrest>=0.4.4->azure-cli-core->azure-cli) Downloading requests_oauthlib-0.8.0-py2.py3-none-any.whl Collecting isodate>=0.5.4 (from msrest>=0.4.4->azure-cli-core->azure-cli) Downloading isodate-0.5.4.tar.gz Collecting keyring>=5.6 (from msrestazure>=0.4.7->azure-cli-core->azure-cli) Downloading keyring-10.3.2-py2.py3-none-any.whl Requirement already satisfied: setuptools>=11.3 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Collecting idna>=2.1 (from cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading idna-2.5-py2.py3-none-any.whl (55kB) 100% |████████████████████████████████| 61kB 2.5MB/s Collecting cffi>=1.4.1 (from cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading cffi-1.10.0-cp36-cp36m-macosx_10_6_intel.whl (227kB) 100% |████████████████████████████████| 235kB 2.0MB/s Collecting packaging (from cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading packaging-16.8-py2.py3-none-any.whl Collecting asn1crypto>=0.21.0 (from cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB) 100% |████████████████████████████████| 102kB 2.3MB/s Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.5.0->msrest>=0.4.4->azure-cli-core->azure-cli) Downloading oauthlib-2.0.2.tar.gz (125kB) 100% |████████████████████████████████| 133kB 2.3MB/s Collecting pycparser (from cffi>=1.4.1->cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading pycparser-2.17.tar.gz (231kB) 100% |████████████████████████████████| 235kB 1.2MB/s Collecting pyparsing (from packaging->cryptography->azure-multiapi-storage==0.1.0->azure-cli-storage->azure-cli) Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 3.6MB/s Installing collected packages: idna, pycparser, cffi, pyparsing, packaging, asn1crypto, cryptography, futures, azure-multiapi-storage, azure-cli-nspkg, azure-cli-command-modules-nspkg, oauthlib, requests-oauthlib, isodate, msrest, pyyaml, applicationinsights, colorama, argcomplete, pygments, jmespath, pyOpenSSL, PyJWT, adal, keyring, msrestazure, tabulate, azure-cli-core, azure-mgmt-storage, azure-cli-storage, azure-mgmt-keyvault, azure-batch, azure-mgmt-batch, azure-cli-batch, azure-mgmt-documentdb, azure-cli-documentdb, azure-mgmt-trafficmanager, azure-mgmt-resource, azure-mgmt-dns, azure-mgmt-network, azure-cli-network, azure-mgmt-web, urllib3, xmltodict, azure-cli-appservice, azure-keyvault, azure-cli-keyvault, azure-cli-profile, azure-cli-feedback, azure-graphrbac, azure-mgmt-devtestlabs, azure-cli-lab, azure-mgmt-authorization, pyasn1, paramiko, scp, azure-mgmt-compute, sshtunnel, azure-cli-acs, azure-cli-configure, azure-cli-vm, azure-cli-container, azure-mgmt-sql, azure-cli-sql, azure-mgmt-iothub, azure-cli-iot, azure-monitor, azure-mgmt-monitor, azure-cli-monitor, azure-cli-component, azure-cli-role, azure-cli-cloud, azure-cli-resource, azure-mgmt-redis, azure-cli-redis, azure-mgmt-containerregistry, azure-cli-acr, whoosh, azure-cli-find, azure-cli Running setup.py install for pycparser ... done Running setup.py install for futures ... done Running setup.py install for oauthlib ... done Running setup.py install for isodate ... done Running setup.py install for pyyaml ... done Running setup.py install for applicationinsights ... done Found existing installation: azure-mgmt-storage 0.20.0 Uninstalling azure-mgmt-storage-0.20.0: Successfully uninstalled azure-mgmt-storage-0.20.0 Found existing installation: azure-mgmt-resource 0.20.1 Uninstalling azure-mgmt-resource-0.20.1: Successfully uninstalled azure-mgmt-resource-0.20.1 Found existing installation: azure-mgmt-network 0.20.1 Uninstalling azure-mgmt-network-0.20.1: Successfully uninstalled azure-mgmt-network-0.20.1 Found existing installation: azure-mgmt-compute 0.20.1 Uninstalling azure-mgmt-compute-0.20.1: Successfully uninstalled azure-mgmt-compute-0.20.1 Running setup.py install for sshtunnel ... done Successfully installed PyJWT-1.5.0 adal-0.4.5 applicationinsights-0.10.0 argcomplete-1.8.2 asn1crypto-0.22.0 azure-batch-2.0.1 azure-cli-2.0.4 azure-cli-acr-2.0.2 azure-cli-acs-2.0.4 azure-cli-appservice-0.1.4 azure-cli-batch-2.0.2 azure-cli-cloud-2.0.2 azure-cli-command-modules-nspkg-2.0.0+1.dev20170427 azure-cli-component-2.0.2 azure-cli-configure-2.0.4 azure-cli-container-0.1.4 azure-cli-core-2.0.4 azure-cli-documentdb-0.1.4 azure-cli-feedback-2.0.2 azure-cli-find-0.2.1 azure-cli-iot-0.1.4 azure-cli-keyvault-2.0.2 azure-cli-lab-0.0.3 azure-cli-monitor-0.0.3 azure-cli-network-2.0.4 azure-cli-nspkg-3.0.0+1.dev20170427 azure-cli-profile-2.0.4 azure-cli-redis-0.2.1 azure-cli-resource-2.0.4 azure-cli-role-2.0.3 azure-cli-sql-2.0.2 azure-cli-storage-2.0.4 azure-cli-vm-2.0.4 azure-graphrbac-0.30.0rc6 azure-keyvault-0.2.0 azure-mgmt-authorization-0.30.0rc6 azure-mgmt-batch-3.0.1 azure-mgmt-compute-1.0.0rc1 azure-mgmt-containerregistry-0.2.1 azure-mgmt-devtestlabs-2.0.0 azure-mgmt-dns-1.0.1 azure-mgmt-documentdb-0.1.2 azure-mgmt-iothub-0.2.2 azure-mgmt-keyvault-0.31.0 azure-mgmt-monitor-0.2.1 azure-mgmt-network-1.0.0rc2 azure-mgmt-redis-1.0.0 azure-mgmt-resource-1.0.0rc1 azure-mgmt-sql-0.4.0 azure-mgmt-storage-1.0.0rc1 azure-mgmt-trafficmanager-0.30.0rc6 azure-mgmt-web-0.31.1 azure-monitor-0.3.0 azure-multiapi-storage-0.1.0 cffi-1.10.0 colorama-0.3.9 cryptography-1.8.1 futures-3.1.1 idna-2.5 isodate-0.5.4 jmespath-0.9.2 keyring-10.3.2 msrest-0.4.7 msrestazure-0.4.7 oauthlib-2.0.2 packaging-16.8 paramiko-2.1.2 pyOpenSSL-17.0.0 pyasn1-0.2.3 pycparser-2.17 pygments-2.2.0 pyparsing-2.2.0 pyyaml-3.12 requests-oauthlib-0.8.0 scp-0.10.2 sshtunnel-0.1.2 tabulate-0.7.7 urllib3-1.16 whoosh-2.7.4 xmltodict-0.11.0 sh-3.2#
Can't get master branch to install. or nightly. I can't get all the Python modules to link up - like Module azure.
I will try:
azure-cli-monitor 0.0.3