How do I chart the distribution of a property?

The Cohort page can reveal distribution of any device property

There are many reasons why you might need to know how some property of your devices varies across your entire device estate. For example, signal-strength, battery-level or temperature: Are just a few devices suffering poor signal? Are just a few devices about to run out of battery?

On the Cohort page you can ask DevicePilot to give you a basic statistic of the property by entering into the Metric box something like:

Average value of: temperature

However that single number doesn't show you the distribution of the property - so let's now see how to turn this single number into a picture worth a thousand words.

There are two concepts to understand:

1) At the top of the Cohort page, change the Metric to one of the following:

EITHER: Count of $id

OR: Count distinct values of $id

The first of these will measure the number of messages which contain the device $id property. Since by definition ALL messages have to contain $id, this effectively means "count the number of messages".

The second of these will measure occurrences of each unique value of $id. So this is counting how many devices are mentioned, not messages. This is probably what you want in most cases.

2) Now we need to split this measurement into groups of the unique values of the property. We do this further down the page by setting:

Group by property: temperature

Now you'll see a nice distribution. The unique values of the property are shown along the bottom, and the number of devices (or the number of messages) are shown up the side. You can sort by either, by clicking the Sort By button at the top. Do you have a Gaussian distribution, or a long-tail distribution?

You can Group By Time instead, to see how values change over time.

Once you have this set up as a KPI, just give it a name and save it, then you can add it as a widget on a Dashboard.