Telemetry module available

Metrics are now available on EDGE for those intrepid souls. It’s a space-efficient storage/query system based on TimescaleDB that covers a swath of features about your system and your hosted sites. From testing, it outperforms InfluxDB and adds no additional memory overhead beyond what’s already in place; a perfect union.

upcp will pull down the latest code and populate the “telemetry” module that exposes the endpoints. Enable telemetry if you haven’t yet:

cpcmd scope:set cp.config telemetry enabled true

A quick rundown of usage:

  • metrics : list all available metrics by name, ex: cpcmd telemetry:metrics
  • get : get last recorded metric for a given name, e.g. cpcmd telemetry:get memory-available
  • range : get sum of records in a range (begin, end), an optional sum parameter disables rollup behavior, e.g. show all memory points logged since inception cpcmd telemetry:range memory-available 0 null null false .
    • If you want to sum records, such as with monotonic queries, omit the fourth ($sum) parameter: show aggregate query count since inception cpcmd telemetry:range mysql-q 0 null null

And if you need to zero a metric because something went awry, drop_metric , e.g. cpcmd telemetry:drop-metric mysql-q

Have fun. There’s more on the way! :smiley: