Sign in to follow this  
Johnny Yuen

Device / Instance Count in Widget

Recommended Posts

We receive requests from customers every now and then asking whether we could display the number of devices/instances dynamically on a widget, either through a Big Number Widget or Custom Graph Widget.

An ancestral practice involves creating a complex datapoint with a value of 1, and then aggregate the sum of this datapoint on the widget to retrieve the total number of devices/instances. This could be tedious as it involves changes made on the DataSource level.

There’s good news, though - We have modernized and simplified this method after making a breakthrough on a recent ticket utilizing the following neat and simple method, and we’d like to share this idea with our users:

On a high-level, the quintessence of this stratagem is as follows:

  1. 1) Identify a non-zero datapoint where you'd like to see it's devices/instance count
  2. 2) Configure an Aggregate SUM of this datapoint e.g. AggregateSUM
  3. 3) Configure an Aggregate AVERAGE of this datapoint e.g. AggregateAVG
  4. 4) Create a Virtual Datapoint with the following expression: AggregateSUM/AggregateAVG

Note: Datapoint with NaN will not be counted as a device or instance in the process of aggregation.

Example of device count configuration:-

Count-4a.thumb.png.7a28e5e9c71c7df42c2be87a4d8948e3.png

 

Example of instance count configuration:-

Count-4b.thumb.png.ed9421c4fdb1e70bed7fd9af2fa175aa.png

 

Edited by Johnny Yuen
Added Image files

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this