Recently I had issues to deploy an IoT Hub. I used an Azure Resource Manager (ARM) template that worked so far but then resulted in the error Default eventHub endpoint 'operationsMonitoringEvents' is missing
. Below what you have to add to achieve a successfull deployment.
You need to add the eventHub endpoint 'operationsMonitoringEvents'
"operationsMonitoringEvents": {
"retentionTimeInDays": "[parameters('opMonRetentionTimeInDays')]",
"partitionCount": "[parameters('opMonPartitionCount')]",
"path": "[concat(parameters('iotHubName'),'-operationmonitoring')]",
"endpoint": "[parameters('opMonEndpoint')]"
}
The endpoint can be found e.g. via the portal here
Additionally you can configure operations monitoring e.g. via
"operationsMonitoringProperties": {
"events": {
"None": "None",
"Connections": "None",
"DeviceTelemetry": "None",
"C2DCommands": "None",
"DeviceIdentityOperations": "None",
"FileUploadOperations": "None",
"Routes": "None"
}
}
Edit: as mentioned by Dipti Mamidala it is also enough to add only
"operationsMonitoringEvents": {
"retentionTimeInDays": "[parameters('opMonRetentionTimeInDays')]",
"partitionCount": "[parameters('opMonPartitionCount')]"
}