Adventure Labs Logo
Scout Docs
Helpers

Health metrics

Helpers for querying device health metrics and summary stats

Health metrics helpers

server_get_health_metrics

  • Options: lookbackSeconds, maxCount; optional timestampAnchor (ISO; window end, default now), source, metricName.
  • Window: timestamp >= anchor - lookbackSeconds and timestamp < anchor. Results ordered by timestamp desc, limited by maxCount.
  • Returns: { status, msg, data: HealthMetric[] }.

server_get_health_metrics_summary

  • Options: device_id, optional lookbackMinutes (default 60).
  • Returns: { status, msg, data } with one row per metric: metric_name, min_value, max_value, avg_value, count.

On this page