Skip to content

Commit c23c6ea

Browse files
author
Jill Grant
authored
Merge pull request #290558 from jlian/release-aio-ga
Diagnostics and metrics scrub
2 parents 9b1bc31 + f548e18 commit c23c6ea

File tree

6 files changed

+218
-151
lines changed

6 files changed

+218
-151
lines changed

articles/iot-operations/.openpublishing.redirection.iot-operations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"source_path_from_root": "/articles/iot-operations/reference/glossary.md",
535535
"redirect_url": "/azure/iot/iot-glossary?toc=/azure/iot-operations/toc.json&bc=/azure/iot-operations/breadcrumb/toc.json",
536536
"redirect_document_id": false
537+
},
538+
{
539+
"source_path_from_root": "/articles/iot-operations/reference/observability-metrics-mq.md",
540+
"redirect_url": "/azure/iot-operations/reference/observability-metrics-mqtt-broker",
541+
"redirect_document_id": false
537542
}
538543
]
539544
}

articles/iot-operations/manage-mqtt-broker/howto-broker-diagnostics.md

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,64 @@
11
---
2-
title: Configure Azure IoT Operations MQTT broker diagnostic settings
3-
description: Learn how to configure diagnostic settings for the Azure IoT Operations MQTT broker, like logs, metrics, self-check, and tracing.
2+
title: Configure Azure IoT Operations MQTT broker diagnostics settings
3+
description: Learn how to configure diagnostics settings for the Azure IoT Operations MQTT broker, like logs, metrics, self-check, and tracing.
44
author: PatAltimore
55
ms.author: patricka
66
ms.topic: how-to
77
ms.service: azure-iot-operations
88
ms.subservice: azure-mqtt-broker
9-
ms.date: 11/07/2024
9+
ms.date: 11/14/2024
1010

1111
#CustomerIntent: As an operator, I want to configure diagnostics so that I can monitor MQTT broker communications.
1212
---
1313

14-
# Configure MQTT broker diagnostic settings
14+
# Configure MQTT broker diagnostics settings
1515

1616
> [!IMPORTANT]
1717
> This setting requires modifying the Broker resource and can only be configured at initial deployment time using the Azure CLI or Azure Portal. A new deployment is required if Broker configuration changes are needed. To learn more, see [Customize default Broker](./overview-broker.md#customize-default-broker).
1818
19-
Diagnostic settings allow you to enable metrics and tracing for MQTT broker.
19+
Diagnostic settings allow you to configure metrics, logs, and self-check for the MQTT broker.
2020

21-
- Logs provide information about the operations performed by MQTT broker.
22-
- Metrics provide information about the resource utilization and throughput of MQTT broker.
23-
- Self-check periodically checks the health of MQTT broker by running a set of diagnostic tests.
24-
- Tracing provides detailed information about the requests and responses handled by MQTT broker.
21+
## Metrics
2522

26-
## Change diagnostic settings
23+
Metrics provide information about the current and past health and status of the MQTT broker. These metrics are emitted in OpenTelemetry format (OTLP). They can be converted to Prometheus format using an OpenTelemetry Collector and routed to Azure Managed Grafana Dashboards using Azure Monitor Managed Service for Prometheus. To learn more, see [Configure observability and monitoring](../configure-observability-monitoring/howto-configure-observability.md).
2724

28-
In most scenarios, the default diagnostic settings are sufficient. To override default diagnostic settings for MQTT broker, edit the `diagnostics` section in the Broker resource. Currently, changing settings is only supported using the `--broker-config-file` flag when you deploy the Azure IoT Operations using the `az iot ops create` command.
25+
For the full list of metrics available, see [MQTT broker metrics](../reference/observability-metrics-mqtt-broker.md).
26+
27+
## Logs
28+
29+
Logs provide information about the operations performed by MQTT broker. These logs are available in the Kubernetes cluster as container logs. They can be configured to be sent to Azure Monitor Logs with Container Insights.
30+
31+
To learn more, see [Configure observability and monitoring](../configure-observability-monitoring/howto-configure-observability.md).
32+
33+
## Self-check
34+
35+
The MQTT broker's self-check mechanism is enabled by default. It uses a diagnostics probe and OpenTelemetry (OTel) traces to monitor the broker. The probe sends test messages to check the system's behavior and timing.
36+
37+
The validation process checks if the system works correctly by comparing the test results with expected outcomes. These outcomes include:
38+
39+
1. The paths messages take through the system.
40+
2. The system's timing behavior.
41+
42+
The diagnostics probe periodically executes MQTT operations (PING, CONNECT, PUBLISH, SUBSCRIBE, UNSUBSCRIBE) on the MQTT broker and monitors the corresponding ACKs and traces to check for latency, message loss, and correctness of the replication protocol.
43+
44+
> [!IMPORTANT]
45+
> The self-check diagnostics probe publishes messages to the `azedge/dmqtt/selftest` topic. Don't publish or subscribe to diagnostic probe topics that start with `azedge/dmqtt/selftest`. Publishing or subscribing to these topics might affect the probe or self-test checks resulting in invalid results. Invalid results might be listed in diagnostic probe logs, metrics, or dashboards. For example, you might see the issue *Path verification failed for probe event with operation type 'Publish'* in the diagnostics-probe logs. For more information, see [Known Issues](../troubleshoot/known-issues.md#mqtt-broker).
46+
47+
## Change diagnostics settings
48+
49+
In most scenarios, the default diagnostics settings are sufficient. To override default diagnostics settings for MQTT broker, edit the `diagnostics` section in the Broker resource. Currently, changing settings is only supported using the `--broker-config-file` flag when you deploy the Azure IoT Operations using the `az iot ops create` command.
2950

3051
To override, first prepare a Broker config file following the [BrokerDiagnostics](/rest/api/iotoperations/broker/create-or-update#brokerdiagnostics) API reference. For example:
3152

3253
```json
3354
{
3455
"diagnostics": {
35-
"logs": {
36-
"level": "debug"
37-
},
3856
"metrics": {
3957
"prometheusPort": 9600
4058
},
41-
"selfCheck": {
42-
"mode": "Enabled",
43-
"intervalSeconds": 30,
44-
"timeoutSeconds": 15
45-
},
59+
"logs": {
60+
"level": "debug"
61+
},
4662
"traces": {
4763
"mode": "Enabled",
4864
"cacheSizeMegabytes": 16,
@@ -51,6 +67,11 @@ To override, first prepare a Broker config file following the [BrokerDiagnostics
5167
"intervalSeconds": 30
5268
},
5369
"spanChannelCapacity": 1000
70+
},
71+
"selfCheck": {
72+
"mode": "Enabled",
73+
"intervalSeconds": 30,
74+
"timeoutSeconds": 15
5475
}
5576
}
5677
}
@@ -62,8 +83,6 @@ Then, deploy Azure IoT Operations using the `az iot ops create` command with the
6283
az iot ops create ... --broker-config-file <FILE>.json
6384
```
6485

65-
The self-test diagnostics probe publishes messages to the `azedge/dmqtt/selftest` topic. You shouldn't publish or subscribe to this topic as it's used for internal diagnostics. For more information, see [Known Issues](../troubleshoot/known-issues.md#mqtt-broker).
66-
6786
To learn more, see [Azure CLI support for advanced MQTT broker configuration](https://aka.ms/aziotops-broker-config) and [Broker examples](/rest/api/iotoperations/broker/create-or-update#examples).
6887

6988
## Next steps

articles/iot-operations/manage-mqtt-broker/overview-broker.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ Customizing the default Broker resource isn't required for most setups. The sett
181181
- [**Cardinality**](./howto-configure-availability-scale.md#configure-scaling-settings): Determines the broker's capacity to handle more connections and messages, and it enhances high availability if there are pod or node failures.
182182
- [**Memory profile**](./howto-configure-availability-scale.md#configure-memory-profile): Sets the maximum memory usage of the broker and how to handle memory usage as the broker scales up.
183183
- [**Disk-backed message buffer**](./howto-disk-backed-message-buffer.md): Configuration for buffering messages to disk as RAM fills up.
184-
- [**Encryption of internal traffic**](./howto-encrypt-internal-traffic.md): Configuration for encrypting internal traffic between broker frontend and backend pods.
184+
- [**Diagnostics settings**](./howto-broker-diagnostics.md): Configuration for diagnostic settings like log level and metrics endpoint.
185185
- [**Advanced MQTT client options**](./howto-broker-mqtt-client-options.md): Configuration for advanced MQTT client options like session expiry, message expiry, and keep-alive settings.
186+
- [**Encryption of internal traffic**](./howto-encrypt-internal-traffic.md): Configuration for encrypting internal traffic between broker frontend and backend pods.
186187

187188
Customizing the default broker must be done during initial deployment time using Azure CLI or Azure portal. A new deployment is required if different Broker configuration settings are needed.
188189

0 commit comments

Comments
 (0)