Skip to content

Commit d2111d2

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into MongoDB3.6
2 parents 08b9314 + 3e56892 commit d2111d2

14 files changed

+221
-122
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41813,6 +41813,11 @@
4181341813
"redirect_url": "/azure/iot-central/preview/tutorial-define-edge-device-type/",
4181441814
"redirect_document_id": false
4181541815
},
41816+
{
41817+
"source_path": "articles/iot-central/core/tutorial-add-edge-as-leaf-device.md",
41818+
"redirect_url": "/azure/iot-central/preview/tutorial-add-edge-as-leaf-device/",
41819+
"redirect_document_id": false
41820+
},
4181641821
{
4181741822
"source_path": "articles/iot-central/core/tutorial-use-device-groups-pnp.md",
4181841823
"redirect_url": "/azure/iot-central/preview/tutorial-use-device-groups/",

articles/cosmos-db/logging.md

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -396,61 +396,105 @@ Now that you've enabled data collection, run the following log search example by
396396
![Sample log search for the 10 most recent logs](./media/logging/log-analytics-query.png)
397397

398398
<a id="#queries"></a>
399-
### Queries
399+
### CosmosDB Log Analytics queries in Azure Monitor
400400

401-
Here are some additional queries that you can enter into the **Log search** box to help you monitor your Azure Cosmos containers. These queries work with the [new language](../log-analytics/log-analytics-log-search-upgrade.md).
401+
Here are some additional queries that you can enter into the **Log search** box to help you monitor your Azure Cosmos containers. These queries work with the [new language](../log-analytics/log-analytics-log-search-upgrade.md).
402402

403403
To learn about the meaning of the data that's returned by each log search, see [Interpret your Azure Cosmos DB logs](#interpret).
404404

405405
* To query for all of the diagnostic logs from Azure Cosmos DB for a specified time period:
406406

407407
```
408-
AzureDiagnostics | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
408+
AzureDiagnostics
409+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
409410
```
410411
411412
* To query for the 10 most recently logged events:
412413
413414
```
414-
AzureDiagnostics | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | take 10
415+
AzureDiagnostics
416+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
417+
| limit 10
415418
```
416419
417420
* To query for all operations, grouped by operation type:
418421
419422
```
420-
AzureDiagnostics | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | summarize count() by OperationName
423+
AzureDiagnostics
424+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
425+
| summarize count() by OperationName
421426
```
422427
423428
* To query for all operations, grouped by **Resource**:
424429
425430
```
426-
AzureActivity | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | summarize count() by Resource
431+
AzureActivity
432+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
433+
| summarize count() by Resource
427434
```
428435
429436
* To query for all user activity, grouped by resource:
430437
431438
```
432-
AzureActivity | where Caller == "[email protected]" and ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | summarize count() by Resource
439+
AzureActivity
440+
| where Caller == "[email protected]" and ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
441+
| summarize count() by Resource
433442
```
434443
> [!NOTE]
435444
> This command is for an activity log, not a diagnostic log.
436445
446+
* To get all queries greater than 100 RUs joined with data from DataPlaneRequests and QueryRunTimeStatistics
447+
448+
```
449+
AzureDiagnostics
450+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" and todouble(requestCharge_s) > 100.0
451+
| project activityId_g, requestCharge_s
452+
| join kind= inner (
453+
AzureDiagnostics
454+
| where ResourceProvider =="MICROSOFT.DOCUMENTDB" and Category == "QueryRuntimeStatistics"
455+
| project activityId_g, querytext_s
456+
) on $left.activityId_g == $right.activityId_g
457+
| order by requestCharge_s desc
458+
| limit 100
459+
```
460+
461+
462+
437463
* To query for which operations take longer than 3 milliseconds:
438464
439465
```
440-
AzureDiagnostics | where toint(duration_s) > 3 and ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | summarize count() by clientIpAddress_s, TimeGenerated
466+
AzureDiagnostics
467+
| where toint(duration_s) > 3 and ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
468+
| summarize count() by clientIpAddress_s, TimeGenerated
441469
```
442470
443471
* To query for which agent is running the operations:
444472
445473
```
446-
AzureDiagnostics | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | summarize count() by OperationName, userAgent_s
474+
AzureDiagnostics
475+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
476+
| summarize count() by OperationName, userAgent_s
447477
```
448478
449479
* To query for when the long running operations were performed:
450480
451481
```
452-
AzureDiagnostics | where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests" | project TimeGenerated , duration_s | render timechart
482+
AzureDiagnostics
483+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
484+
| project TimeGenerated , duration_s
485+
| render timechart
453486
```
487+
488+
* To get Partition Key statistics to evaluate skew across top 3 partitions for database account:
489+
490+
```
491+
AzureDiagnostics
492+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="PartitionKeyStatistics"
493+
| project SubscriptionId, regionName_s, databaseName_s, collectionname_s, partitionkey_s, sizeKb_s, ResourceId
494+
495+
496+
```
497+
454498
455499
For more information about how to use the new Log Search language, see [Understand log searches in Azure Monitor logs](../log-analytics/log-analytics-log-search-new.md).
456500

articles/hdinsight/hdinsight-use-external-metadata-stores.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ HDInsight also supports custom metastores, which are recommended for production
5252

5353
![HDInsight Hive Metadata Store Use Case](./media/hdinsight-use-external-metadata-stores/metadata-store-use-case.png)
5454

55+
### Create and config Azure SQL Database for the custom metastore
56+
57+
You need to create or have an existing Azure SQL Database before setting up a custom Hive metastore for a HDInsight cluster. For more information, see [Quickstart: Create a single database in Azure SQL DB](https://docs.microsoft.com/azure/sql-database/sql-database-single-database-get-started?tabs=azure-portal).
58+
59+
To make sure that your HDInsight cluster can access the connected Azure SQL Database, configure Azure SQL Database firewall rules to allow Azure services and resources to access the server.
60+
61+
You can enable this option in the Azure portal by clicking **Set server firewall**, and clicking **ON** underneath **Allow Azure services and resources to access this server** for the Azure SQL Database server or database. For more information, see [Create and manage IP firewall rules](https://docs.microsoft.com/azure/sql-database/sql-database-firewall-configure#use-the-azure-portal-to-manage-server-level-ip-firewall-rules)
62+
63+
![set server firewall button](./media/hdinsight-use-external-metadata-stores/configure-azure-sql-database-firewall1.png)
64+
65+
![allow azure services access](./media/hdinsight-use-external-metadata-stores/configure-azure-sql-database-firewall2.png)
66+
5567
### Select a custom metastore during cluster creation
5668

5769
You can point your cluster to a previously created Azure SQL Database during cluster creation, or you can configure the SQL Database after the cluster is created. This option is specified with the **Storage > Metastore settings** while creating a new Hadoop, Spark, or interactive Hive cluster from Azure portal.

articles/hdinsight/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ landingContent:
3030
links:
3131
- text: HDInsight components and versions
3232
url: ./hdinsight-component-versioning.md
33+
- text: Selecting the right VM size
34+
url: ./hdinsight-selecting-vm-size.md
3335
- text: HDInsight supported VM types
3436
url: ./hdinsight-supported-node-configuration.md
3537
- text: Compare storage options
85.6 KB
Loading
234 KB
Loading

articles/iot-hub/iot-hub-monitor-resource-health.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: philmea
66
ms.service: iot-hub
77
services: iot-hub
88
ms.topic: conceptual
9-
ms.date: 02/27/2019
9+
ms.date: 11/11/2019
1010
ms.author: kgremban
1111
---
1212
# Monitor the health of Azure IoT Hub and diagnose problems quickly
@@ -409,6 +409,54 @@ In the `properties` section, this log contains additional information about mess
409409
| **endpointType** | String | The type of the routing endpoint |
410410
| **parentSpanId** | String | The [span-id](https://w3c.github.io/trace-context/#parent-id) of the parent message, which would be the IoT Hub ingress message trace in this case |
411411

412+
#### Configurations
413+
414+
IoT Hub configuration logs tracks events and error for the Automatic Device Management feature set.
415+
416+
```json
417+
{
418+
"records":
419+
[
420+
{
421+
"time": "2019-09-24T17:21:52Z",
422+
"resourceId": "Resource Id",
423+
"operationName": "ReadManyConfigurations",
424+
"category": "Configurations",
425+
"resultType": "",
426+
"resultDescription": "",
427+
"level": "Information",
428+
"durationMs": "17",
429+
"properties": "{\"configurationId\":\"\",\"sdkVersion\":\"2018-06-30\",\"messageSize\":\"0\",\"statusCode\":null}",
430+
"location": "southcentralus"
431+
}
432+
]
433+
}
434+
```
435+
436+
### Device Streams (Preview)
437+
438+
The device streams category tracks request-response interactions sent to individual devices.
439+
440+
```json
441+
{
442+
"records":
443+
[
444+
{
445+
"time": "2019-09-19T11:12:04Z",
446+
"resourceId": "Resource Id",
447+
"operationName": "invoke",
448+
"category": "DeviceStreams",
449+
"resultType": "",
450+
"resultDescription": "",
451+
"level": "Information",
452+
"durationMs": "74",
453+
"properties": "{\"deviceId\":\"myDevice\",\"moduleId\":\"myModule\",\"sdkVersion\":\"2019-05-01-preview\",\"requestSize\":\"3\",\"responseSize\":\"5\",\"statusCode\":null,\"requestName\":\"myRequest\",\"direction\":\"c2d\"}",
454+
"location": "Central US"
455+
}
456+
]
457+
}
458+
```
459+
412460
### Read logs from Azure Event Hubs
413461

414462
After you set up event logging through diagnostics settings, you can create applications that read out the logs so that you can take action based on the information in them. This sample code retrieves logs from an event hub:
@@ -497,4 +545,4 @@ To learn more about how to interpret health data, see [Azure resource health ove
497545
## Next steps
498546

499547
* [Understand IoT Hub metrics](iot-hub-metrics.md)
500-
* [IoT remote monitoring and notifications with Azure Logic Apps connecting your IoT hub and mailbox](iot-hub-monitoring-notifications-with-azure-logic-apps.md)
548+
* [IoT remote monitoring and notifications with Azure Logic Apps connecting your IoT hub and mailbox](iot-hub-monitoring-notifications-with-azure-logic-apps.md)

articles/iot-pnp/quickstart-create-pnp-device-linux.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ You can find your _company model repository connection string_ in the [Azure Cer
5454

5555
## Prepare an IoT hub
5656

57-
You need an Azure IoT hub in your Azure subscription to complete this quickstart. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
57+
You also need an Azure IoT hub in your Azure subscription to complete this quickstart. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin. If you don't have an IoT hub, there will be steps to create one below.
5858

5959
If you're using the Azure CLI locally, the `az` version should be **2.0.75** or later, the Azure Cloud Shell uses the latest version. Use the `az --version` command to check the version installed on your machine.
6060
61-
Add the Microsoft Azure IoT Extension for Azure CLI:
61+
Run the following command to add the Microsoft Azure IoT Extension for Azure CLI to your Cloud Shell instance:
6262
6363
```azurecli-interactive
6464
az extension add --name azure-cli-iot-ext
6565
```
6666
6767
The steps in this quickstart require version **0.8.5** or later of the extension. Use the `az extension list` command to check the version you have installed, and the `az extension update` command to update if necessary.
6868
69-
If don't have an IoT hub, create one using the following commands, replacing `{YourIoTHubName}` with a unique name of your choice. If you're running these commands locally, first sign in to your Azure subscription using `az login`. If you're running these commands in the Azure cloud shell, you're signed in automatically:
69+
If don't have an IoT hub, create one using the following commands, replacing `<YourIoTHubName>` with a unique name of your choice. If you're running these commands locally, first sign in to your Azure subscription using `az login`. If you're running these commands in the Azure cloud shell, you're signed in automatically:
7070
7171
```azurecli-interactive
7272
az group create --name pnpquickstarts_rg --location centralus
73-
az iot hub create --name {YourIoTHubName} \
73+
az iot hub create --name <YourIoTHubName> \
7474
--resource-group pnpquickstarts_rg --sku S1
7575
```
7676
@@ -79,23 +79,23 @@ The previous commands create a resource group called `pnpquickstarts_rg` and an
7979
> [!IMPORTANT]
8080
> During public preview, IoT Plug and Play features are only available on IoT hubs created in the **Central US**, **North Europe**, and **Japan East** regions.
8181
82-
Run the following command to create a device identity for a device called `mypnpdevice` in your IoT hub. Replace the `{YourIoTHubName}` placeholder with the name of your IoT hub:
82+
Run the following command to create a device identity in your IoT hub. Replace the **YourIoTHubName** and **YourDevice** placeholders with your actual names.
8383
8484
```azurecli-interactive
85-
az iot hub device-identity create --hub-name {YourIoTHubName} --device-id mypnpdevice
85+
az iot hub device-identity create --hub-name <YourIoTHubName> --device-id <YourDevice>
8686
```
8787
88-
Run the following commands to get the _device connection string_ for the device you just registered. You need this connection string later in this quickstart:
88+
Run the following commands to get the _device connection string_ for the device you just registered.
8989
9090
```azurecli-interactive
91-
az iot hub device-identity show-connection-string --hub-name {YourIoTHubName} --device-id mypnpdevice --output table
91+
az iot hub device-identity show-connection-string --hub-name <YourIoTHubName> --device-id <YourDevice> --output table
9292
```
9393
9494
## Author your model
9595
9696
In this quickstart, you use an existing sample device capability model and associated interfaces.
9797
98-
1. Create a `pnp_app` directory in your home directory. You use this folder for the device model files and device code stub.
98+
1. Create a `pnp_app` directory in your local drive. You use this folder for the device model files and device code stub.
9999
100100
```bash
101101
cd ~
@@ -110,34 +110,34 @@ In this quickstart, you use an existing sample device capability model and assoc
110110
curl -O -L https://raw.githubusercontent.com/Azure/IoTPlugandPlay/master/samples/EnvironmentalSensor.interface.json
111111
```
112112
113-
1. Open `pnp_app` folder with VS Code. You can view the files with intellisense:
113+
1. Open `pnp_app` folder with VS Code. You can view the files with IntelliSense:
114114
115115
![Device capability model](media/quickstart-create-pnp-device-linux/dcm.png)
116116
117117
1. In the files you downloaded, replace `<YOUR_COMPANY_NAME_HERE>` in the `@id` and `schema` fields with a unique value. Use only the characters a-z, A-Z, 0-9, and underscore. For more information, see [Digital Twin identifier format](https://github.com/Azure/IoTPlugandPlay/tree/master/DTDL#digital-twin-identifier-format).
118118
119119
## Generate the C code stub
120120
121-
Now you have a DCM and its associated interfaces, you can generate the device code that implements the model. To generate the C code stub in VS code:
121+
Now that you have a DCM and its associated interfaces, you can generate the device code that implements the model. To generate the C code stub in VS Code:
122122
123-
1. With the `pnp_app` folder open in VS code, use **Ctrl+Shift+P** to open the command palette, enter **IoT Plug and Play**, and select **Generate Device Code Stub**.
123+
1. With the `pnp_app` folder open in VS Code, use **Ctrl+Shift+P** to open the command palette, enter **IoT Plug and Play**, and select **Generate Device Code Stub**.
124124
125125
> [!NOTE]
126-
> The first time you use the IoT Plug and Play Code Generator utility, it takes a few seconds to download.
126+
> The first time you use the IoT Plug and Play Code Generator utility, it takes a few seconds to download and install automatically.
127127
128-
1. Choose the **SampleDevice.capabilitymodel.json** file to use to generate the device code stub.
128+
1. Choose the **SampleDevice.capabilitymodel.json** file to use for generating the device code stub.
129129
130-
1. Enter the project name **sample_device**, it will be the name of your device application.
130+
1. Enter the project name **sample_device**. This will be the name of your device application.
131131
132132
1. Choose **ANSI C** as your language.
133133
134134
1. Choose **Via IoT Hub device connection string** as connection method.
135135
136136
1. Choose **CMake Project on Linux** as your project template.
137137
138-
1. Choose **Via Source Code** as the way to include the SDK.
138+
1. Choose **Via Source Code** as the way to include the device SDK.
139139
140-
1. VS Code opens a new window with generated device code stub files.
140+
1. A new folder called **sample_device** is created in the same location as the DCM file, and in it are the generated device code stub files. VS Code opens a new window to display these.
141141
![Device code](media/quickstart-create-pnp-device-linux/device-code.png)
142142
143143
## Build and run the code
@@ -170,7 +170,7 @@ You use the device SDK source code to build the generated device code stub. The
170170
171171
```sh
172172
cd ~/pnp_app/sample_device/cmake
173-
./sample_device "{IoT Hub device connection string}"
173+
./sample_device "<device connection string>"
174174
```
175175
176176
1. The device application starts sending data to IoT Hub.
@@ -192,25 +192,25 @@ To validate the device code with the **az** CLI, you need to publish the files t
192192
> [!NOTE]
193193
> The connection string is only required the first time you connect to the repository.
194194
195-
1. In VS Code output window and notification, you can check the files have been published successfully.
195+
1. In VS Code output window and notification, you can check that the files have been published successfully.
196196
197197
> [!NOTE]
198198
> If you get errors on publishing the device model files, you can try use command **IoT Plug and Play: Sign out Model Repository** to sign out and go through the steps again.
199199
200200
### Use the Azure IoT CLI to validate the code
201201
202-
After the device client sample starts, you can check it's working with the Azure CLI.
202+
After the device client sample starts, you can check that it's working with the Azure CLI.
203203

204204
Use the following command to view the telemetry the sample device is sending. You may need to wait a minute or two before you see any telemetry in the output:
205205

206206
```azurecli-interactive
207-
az iot dt monitor-events --hub-name {your IoT hub} --device-id mypnpdevice
207+
az iot dt monitor-events --hub-name <YourIoTHubNme> --device-id <YourDevice>
208208
```
209209

210210
Use the following command to view all the properties sent by the device:
211211

212212
```azurecli-interactive
213-
az iot dt list-properties --device-id mypnpdevice --hub-name {Your IoT hub name} --source private --repo-login "{Your company model repository connection string}"
213+
az iot dt list-properties --device-id <YourDevice> --hub-name <YourIoTHubNme> --source private --repo-login "<Your company model repository connection string>"
214214
```
215215

216216
## Next steps
@@ -220,4 +220,4 @@ In this quickstart, you learned how to create an IoT Plug and Play device using
220220
To learn more about DCMs and how to create your own models, continue to the tutorial:
221221

222222
> [!div class="nextstepaction"]
223-
> [Tutorial: Create a test a device capability model using Visual Studio Code](tutorial-pnp-visual-studio-code.md)
223+
> [Tutorial: Create and test a device capability model using Visual Studio Code](tutorial-pnp-visual-studio-code.md)

0 commit comments

Comments
 (0)