jefffall

Results comments of jefffall

with this condition file: (this is the file listed as @{condition} more condition { "odatatype": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", "operator": "GreaterThan", "threshold": "90.0" } I have removed the windowSize key and the request...

tried window_size. Looking in the Python code - window_size seems to be what is used internally after the key windowSize. But here goes a try: the conditions file changed to:...

Seems the key "windowSize" is required up at the Azure Cloud level. The windowSize key is in the Python code and seems to convert to an internal variable of window_size...

% find . | xargs grep -s "windowSize" * ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/models/location_threshold_rule_condition.py: 'window_size': {'key': 'windowSize', 'type': 'duration'}, Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/models/location_threshold_rule_condition.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/models/management_event_aggregation_condition.py: 'window_size': {'key': 'windowSize', 'type': 'duration'}, Binary file ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/models/management_event_aggregation_condition.pyc matches ./azure-cli/lib/python2.7/site-packages/azure/mgmt/monitor/models/threshold_rule_condition.py:...

Command arguments ['monitor', 'alert-rules', 'create', '--is-enabled', 'IS_ENABLED', '--name', 'JeffFallRuleTestCPU', '--resource-group', 'H-Monitoring-G', '--alert-rule-resource-name', '/subscriptions/supressed/resourceGroups/H-Monitoring-G/providers/Microsoft.Compute/virtualMachines/myvm', '--location', 'westus', '--condition', '@condition'] Current cloud config: {'endpoints': {'active_directory': 'https://login.microsoftonline.com', 'active_directory_graph_resource_id': 'https://graph.windows.net/', 'active_directory_resource_id': 'https://management.core.windows.net/', 'batch_resource_id': 'https://batch.core.windows.net/', 'gallery':...

Tried a little debugging az monitor alert-rules create --is-enabled IS_ENABLED --name JeffFallRuleTestCPU --resource-group HCM-Monitoring-RG --alert-rule-resource-name /subscriptions/mysub/resourceGroups/H-Monitoring-G/providers/Microsoft.Compute/virtualMachines/myVM --location westus --condition @{condition} ----------------- debug kwargs ------------------- {'is_enabled': 'IS_ENABLED', 'resource_group_name': 'HCM-Monitoring-RG', 'description': None,...

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...

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...

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...

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'...