|
| 1 | +# Azure CLI elastic Extension # |
| 2 | +This is the extension for elastic |
| 3 | + |
| 4 | +### How to use ### |
| 5 | +Install this extension using the below CLI command |
| 6 | +``` |
| 7 | +az extension add --name elastic |
| 8 | +``` |
| 9 | + |
| 10 | +### Included Features ### |
| 11 | +#### elastic monitor #### |
| 12 | +##### Create ##### |
| 13 | +``` |
| 14 | +az elastic monitor create --monitor-name "myMonitor" --name "myMonitor" --location "West US 2" \ |
| 15 | + --user-info "{\\"companyInfo\\":{\\"business\\":\\"Technology\\",\\"country\\":\\"US\\",\\"domain\\":\\"microsoft.com\\",\\"employeeNumber\\":\\"10000\\",\\"state\\":\\"WA\\"},\\"companyName\\":\\"Microsoft\\",\\"emailAddress\\":\\"alice@microsoft.com\\",\\"firstName\\":\\"Alice\\",\\"lastName\\":\\"Bob\\"}" \ |
| 16 | + --name "free_Monthly" --tags Environment="Dev" --resource-group "myResourceGroup" |
| 17 | +
|
| 18 | +az elastic monitor wait --created --monitor-name "{myMonitor}" --resource-group "{rg}" |
| 19 | +``` |
| 20 | +##### Show ##### |
| 21 | +``` |
| 22 | +az elastic monitor show --name "myMonitor" --resource-group "myResourceGroup" |
| 23 | +``` |
| 24 | +##### List ##### |
| 25 | +``` |
| 26 | +az elastic monitor list --resource-group "myResourceGroup" |
| 27 | +``` |
| 28 | +##### Update ##### |
| 29 | +``` |
| 30 | +az elastic monitor update --name "myMonitor" --tags Environment="Dev" --resource-group "myResourceGroup" |
| 31 | +``` |
| 32 | +##### Delete ##### |
| 33 | +``` |
| 34 | +az elastic monitor delete --name "myMonitor" --resource-group "myResourceGroup" |
| 35 | +``` |
| 36 | +#### elastic monitored-resource #### |
| 37 | +##### List ##### |
| 38 | +``` |
| 39 | +az elastic monitored-resource list --monitor-name "myMonitor" --resource-group "myResourceGroup" |
| 40 | +``` |
| 41 | +#### elastic deployment-info #### |
| 42 | +##### List ##### |
| 43 | +``` |
| 44 | +az elastic deployment-info list --monitor-name "myMonitor" --resource-group "myResourceGroup" |
| 45 | +``` |
| 46 | +#### elastic tag-rule #### |
| 47 | +##### Create ##### |
| 48 | +``` |
| 49 | +az elastic tag-rule create --monitor-name "myMonitor" \ |
| 50 | + --filtering-tags name="Environment" action="Include" value="Prod" \ |
| 51 | + --filtering-tags name="Environment" action="Exclude" value="Dev" --send-aad-logs false --send-activity-logs true \ |
| 52 | + --send-subscription-logs true --resource-group "myResourceGroup" --rule-set-name "default" |
| 53 | +``` |
| 54 | +##### Show ##### |
| 55 | +``` |
| 56 | +az elastic tag-rule show --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" |
| 57 | +``` |
| 58 | +##### List ##### |
| 59 | +``` |
| 60 | +az elastic tag-rule list --monitor-name "myMonitor" --resource-group "myResourceGroup" |
| 61 | +``` |
| 62 | +##### Delete ##### |
| 63 | +``` |
| 64 | +az elastic tag-rule delete --monitor-name "myMonitor" --resource-group "myResourceGroup" --rule-set-name "default" |
| 65 | +``` |
| 66 | +#### elastic vm-host #### |
| 67 | +##### List ##### |
| 68 | +``` |
| 69 | +az elastic vm-host list --monitor-name "myMonitor" --resource-group "myResourceGroup" |
| 70 | +``` |
| 71 | +#### elastic vm-ingestion #### |
| 72 | +##### Detail ##### |
| 73 | +``` |
| 74 | +az elastic vm-ingestion detail --monitor-name "myMonitor" --resource-group "myResourceGroup" |
| 75 | +``` |
| 76 | +#### elastic vm-collection #### |
| 77 | +##### Update ##### |
| 78 | +``` |
| 79 | +az elastic vm-collection update --monitor-name "myMonitor" --operation-name "Add" \ |
| 80 | + --vm-resource-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualmachines/myVM" \ |
| 81 | + --resource-group "myResourceGroup" |
| 82 | +``` |
0 commit comments