Skip to content

Commit e133418

Browse files
committed
Diagnostics and metrics scrub
1 parent 53fb38f commit e133418

File tree

5 files changed

+183
-113
lines changed

5 files changed

+183
-113
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: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,66 @@
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, tracing, logging, 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 resource utilization and throughput of MQTT broker. These metrics are available in Prometheus format and can be scraped by Prometheus or Azure Monitor through OpenTelemetry Collector. 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 and traces
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+
Traces are for [distributed tracing](https://opentelemetry.io/docs/concepts/signals/traces/) and provide detailed information about the requests and responses handled by MQTT broker. These traces can be sent to Azure Monitor through OpenTelemetry Collector.
32+
33+
To learn more, see [Configure observability and monitoring](../configure-observability-monitoring/howto-configure-observability.md).
34+
35+
## Self-check
36+
37+
The self-check probe is a part of the MQTT broker and is enabled by default. It uses OpenTelemetry (OTel) events to monitor the system. The probe sends test messages to check the system's behavior and timing.
38+
39+
The validation process checks if the system works correctly by comparing the test results with expected outcomes. These outcomes include:
40+
41+
1. The paths messages take through the system.
42+
2. The system's timing behavior.
43+
44+
The system uses MQTT for messaging, including the replication protocol. The probe generates test traffic for all MQTT operations (CONNECT, PUBLISH, SUBSCRIBE, PING) and monitors them to ensure they follow the correct paths.
45+
46+
> [!IMPORTANT]
47+
> The self-check 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).
48+
49+
## Change diagnostics settings
50+
51+
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.
2952

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

3255
```json
3356
{
3457
"diagnostics": {
35-
"logs": {
36-
"level": "debug"
37-
},
3858
"metrics": {
3959
"prometheusPort": 9600
4060
},
41-
"selfCheck": {
42-
"mode": "Enabled",
43-
"intervalSeconds": 30,
44-
"timeoutSeconds": 15
45-
},
61+
"logs": {
62+
"level": "debug"
63+
},
4664
"traces": {
4765
"mode": "Enabled",
4866
"cacheSizeMegabytes": 16,
@@ -51,6 +69,11 @@ To override, first prepare a Broker config file following the [BrokerDiagnostics
5169
"intervalSeconds": 30
5270
},
5371
"spanChannelCapacity": 1000
72+
},
73+
"selfCheck": {
74+
"mode": "Enabled",
75+
"intervalSeconds": 30,
76+
"timeoutSeconds": 15
5477
}
5578
}
5679
}
@@ -62,8 +85,6 @@ Then, deploy Azure IoT Operations using the `az iot ops create` command with the
6285
az iot ops create ... --broker-config-file <FILE>.json
6386
```
6487

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-
6788
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).
6889

6990
## Next steps

articles/iot-operations/reference/observability-metrics-mq.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)