I need to know how to get "Connected Client Count" from API rest or go SDK, but I did not find any reference of what does it really means. From where "Connected Client Count" comes?
My guess: The "Connected Client Count" is calculating doing the following:
- Get the device list from API.
- For one of these devices get the modules from API
- Now it could return many modules depending on your architecture, so in my case it will ignores agent and hub modules, considering just other nodeRed modules as a real client. If the client (nodeRed module) connectionStatus == connected so this is a valid client connect and should return +1.
I would be very glad for an explanation of this or some doc references.
The "Connected Client Count" that you find in the Azure Portal reflects the amount of modules and/or devices that are currently connected to your edgeHub. It gets these values from the reported properties in the Module Twin of your edgeHub module. If you take a look in the Module Twin you will find something similar to this in the reported properties:
You can find out more on the reported properties of this module here