Azure IoT Hub: Metric "Total number of messages used" seems incorrect

DisplayName42 56 Reputation points
2025-02-24T14:40:13.5666667+00:00

The metric "Total number of messages used" seems incorrect because it decreased during the last week although the metric "Telemetry messages sent" is stable (as expected). The metric "Total number of messages used" is currently lower than "Telemetry messages sent" which does not make sense to me: Shouldn't "Total number of messages used" always be equal or higher than "Telemetry messages sent"?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,247 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde | MVP 35,246 Reputation points MVP
    2025-02-24T16:17:38.12+00:00

    Hello @DisplayName42 ,

    welcome to this moderated Azure community forum.

    The Azure IoT Hub counts the number of messages being sent by devices to the hub (D2C).

    This is also seen in the Metrics:

    User's image

    Notice that this 'messages' can be confusing because an IoT Hub counts the number 4KB chunks. If a message has the size of 6KB, this is counted as two chunks.

    I looked up the other metric also:

    User's image

    This 'total number of messages used' includes both D2C message and device twin changes, direct method calls, etc.

    So, yes, the observation you made are a bit strange.

    The metrics information is not reported live, there is a delay on the dialogs so we need to be patient ;-)

    In the past, I have seen the that the Metrics were not updated correctly although the counting was done as expected. So, the Metrics were right a few days later.

    Please check the metrics over the coming days and see if this is corrected.

    If not, you can create an Azure support ticket so the support team can take a look at the backend.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


  2. LeelaRajeshSayana-MSFT 17,301 Reputation points
    2025-02-27T15:32:37.5+00:00

    Thank you, @DisplayName42 , for connecting with us offline and sharing the information needed to work on this issue.

    Additional diagnostics revealed that there are gaps in data ingestion into Azure Monitor. This is likely caused by provider registration ending in a bad state. Trying the following steps helped resolve the issue.

    1. Navigate to the subscription on the Azure portal, find Resource Providers under the Settings section.
      1. Filter Microsoft.Devices and hit Re-register
      2. Filter microsoft.insights and hit Re-register
    2. Wait for 24 hours for this registration to propagate and try querying the metrics

    If you encounter the issue again, please do not hesitate to reach out to us through the comments below and we would glad to address this issue. If you are content with the engagement received on this issue, I request that you to kindly re-take the survey for your experience on this thread.

    We are here to help you and strive to make your experience better and greatly value your feedback. Looking forward to your reply. Much appreciate your feedback!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.