Understanding Measurements

44 views
Skip to first unread message

Andrew Hill

unread,
Sep 26, 2011, 9:55:56 AM9/26/11
to amon_dat...@googlegroups.com
Hi all,

There has been some discussion in the past about how best to understand measurements in AMON. We currently have (or will have) two types of reading -- "instant" and "duration". These differ in that "instant" measurements have a single timestamp, representing the date & time the measurement was recorded, while "duration" measurements have a "startDate" and "endDate", representing a start and end date & time that the measurement relates to.

However, we have had feedback that there are different types of measurements, regardless of how the interval of that measurement is recorded. Specifically, there seem to be three main types:
  • Pure value measurements - e.g. temperature, relative humidity, etc. Measurements that represent an actual recorded value at a given time (i.e. almost always these will be "instant" measurements);
  • Counter or incremental measurements - e.g. units of gas used. Measurements from devices that usually have a counter that increments up from zero, which may reset back to zero in the event of device reboot or counter overflow, but which should be interpreted as a single, ever increasing number that gets larger and larger and never goes backwards. Again, these will almost always be "instant" measurements;
  • Pulse measurements - e.g. number of times a door has been opened in a given time time interval (i.e. "duration" measurements are perfect here, although some manufacturers of devices have indicated that even for pulse measurements, they only record the timestamp at which the number of events is reported, and the interval has to be inferred from the previous reading timestamp).
On this bases, we would like to propose that AMON v2.1 (or later):
  • Restores official support for the "period" key/value pair (with values of "instant" and "duration"); and
  • Introduces a new key/value pair at the "reading" level, with key name "value_type", which can be used to define the type of values that will recorded in the measurements. We would propose three "value_type"s: "independent", "counter" and "pulse", to correspond with the three examples above.
Thoughts and comments welcomed!

Andrew
Reply all
Reply to author
Forward
0 new messages