question

CollinKoornstra-7867 avatar image
1 Vote"
CollinKoornstra-7867 asked asergaz edited

Azure Iothub, Total devices growing without us actually adding a device

For a IoT project we use IoTHub to connect our devices to the cloud. The last week we noticed that our device count randomly grew everynight. Its seems like a random device is connected and after 10 minutes or less it automaticly disconnects.
We're currently testing a use-case to see if IoTHub could be used in our production environment but before we make the choice we would like to know why there are random devices appearing.

30624-image.png

As you can see in this image our total devices started spiking everynight since this weekend.

Is anyone else experiencing the same issue?


azure-iot-hub
image.png (74.2 KiB)
· 9
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I checked my own IoT Hub and I see a similar pattern for the last 24 hours (where I did not add or delete any device):

31223-image.png

This metric is of course still in preview (as seen in the image), but it's a bit strange it's not a flat line.


1 Vote 1 ·
image.png (95.7 KiB)

@SandervandeVelde42 Sorry for the inconvenience caused.

I have reached out to our internal team on the issue and once I have an update will keep you posted on same.

1 Vote 1 ·

I just checked the metrics again:

31730-image.png


There is something strange going on. This is an IoTHub which is running for a long time already in West Europe.

I have not added or deleted any device today.

Note: 'Total devices' is not in preview anymore.

0 Votes 0 ·
image.png (122.0 KiB)
Show more comments

Quick update that we are internally investigating this issue with Product Group. Thanks for your time so far.

1 Vote 1 ·

@CollinKoornstra-7867 Welcome to Q&A forum!

Sorry to hear that you are having trouble with the spikes.

Could you please share more details on how you are connecting the devices with IoT Hub and what code are you using in the simulated devices?
Also, kindly check Monitor the health of Azure IoT Hub and see if it helps to identify the root cause of spike.

You can also Control access to IoT Hub

0 Votes 0 ·

@AshokPeddakotla-MSFT Thanks for the answer, I've checked the health of the IoT Hub but nothing special happens.
I will wait for your update towards @SandervandeVelde42

0 Votes 0 ·

Hello,
I believe this could be a similar case where we confirmed that the API is eventually consistent which could cause the abnormal Total Devices showing in the dashboard: https://github.com/MicrosoftDocs/azure-docs/issues/40863

Though please bear with me while we confirm with Product Group if this is expected since it is currently in preview.

0 Votes 0 ·

I too see spikes when I select (Aggregation: Average) or (Aggregation: Min) - didn't add or delete devices as well recently:

31750-image.png

32003-image.png

(Aggregation: Max) shows the correct values:

31990-image.png


0 Votes 0 ·
image.png (104.9 KiB)
image.png (116.8 KiB)
image.png (104.4 KiB)

1 Answer

asergaz avatar image
1 Vote"
asergaz answered asergaz edited

Update March 2021


THIS IS NOW FIXED

You can now start using Total Devices Count Metric again.

PS: Ignore the average Aggregation in Total Devices Count metric and use Max only.

"Average of total device count, is aggregated slightly different from Max/Min. Max/min is taken whenever there is a snapshot data point, i.e. total device count in minutely interval; whereas average is computed upon sum/count. Depending on how many data points emitted per minute interval, there will be a small variance spread across the central line. Upon observing the wavy spike below, it is completely normal and should be tolerated."


Update November 2020



Hello,
We have confirmed this is a bug and is currently being fixed. Please check the Root Cause Analysis and mark this as answer or let us know any concerns you may have while this is being fixed:

Root cause: We have identified a bug in service emitting a metric for total device count twice within a minute, resulting higher number of devices (than customer actually has) to shown in Total Device Count tile of the IoT Hub dashboard.
Mitigation: As a workaround, please use 'IoT Hub Usage' tile instead of 'Total Device Count'
Next Steps: We are working on fixing the concurrency issue with the tasks that update the 'totalDeviceCount' metric.

Thank you so much for your time @CollinKoornstra-7867 @SandervandeVelde42

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.





· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

The max number of devices does not have those spikes anymore (I only added an extra device a few minutes ago):

71066-image.png


Still, the average is a bit strange, I expected a flat line (because I did not change the number of devices during the last 24 hours):

71140-image.png


1 Vote 1 ·
image.png (23.9 KiB)
image.png (38.7 KiB)
asergaz avatar image asergaz SandervandeVelde42 ·

@SandervandeVelde42 thanks for checking it. Looping back with Product Team. @CollinKoornstra-7867 can you share your results as well? Tanks!

0 Votes 0 ·

@SandervandeVelde42 @CollinKoornstra-7867 I have confirmed with product group that you should ignore the average Aggregation in Total Devices Count metric and use Max only.

"Average of total device count, is aggregated slightly different from Max/Min. Max/min is taken whenever there is a snapshot data point, i.e. total device count in minutely interval; whereas average is computed upon sum/count. Depending on how many data points emitted per minute interval, there will be a small variance spread across the central line. Upon observing the wavy spike below, it is completely normal and should be tolerated."

Please let me know if you are ok with this and mark the answer as verified.

Regards!

1 Vote 1 ·

@CollinKoornstra-7867 @SandervandeVelde42

Please can you validate (and mark as answer) that the issue is now resolved?

Thank you so much!

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·