Cohort Analysis is DevicePilot's query engine that allows you to understand your telemetry data. It will allow you define Uptime % KPIs, break out fault codes by firmware revision, and show trends of user interaction over time.
First however, some basics. A KPI is made up of several elements
Let's get started with the simplest example - we'll count the number of messages stored. This tutorial assumes you have devices posting into your account.
Metrics are the first part of a KPI - you use them to define what you care about, what good looks like, so you can measure it.
Head to the Cohort page, and in the Metric section, choose Count of $id:
Ensure the time Click Run KPI and see your results, which will be something like
What does this mean? $id is set on every message we receive (it's the unique Id of the device), so by counting them, we see how messages there are.
What if we wanted to know how many different devices we had? We just change the Metric to Count distinct values of and run again.
You'll now see the number of unique device that have posted a message.
In order to understand our device estate better, we can group the Metrics by different dimensions.
For instance, if we group by time to see how our metric changes through the day:
then we'll see how the number of unique devices changes hour by hour:
Use the scoping filter at the bottom to limit your query to a subset of devices. Like everything else in Cohort, this is much more powerful than it first appears because instead of selecting devices based on their current state, it is actively selecting which devices to include in the analysis moment by moment throughout the analysis timespan.