Skip to content

Metrics

Metrics record numeric time series from your application: request counts, latency, queue depth. Put datapoints, chart aggregates, and fire an alarm when a threshold is crossed.

Status: Preview. See the API action reference for the full command list.

Before you start

  • Sign in with skippr login. See Cloud User Directory.
  • Ensure your policy allows the metrics actions you need.

Concepts

  • A namespace plus metric name identify a series.
  • Datapoints carry a value, optional unit, and timestamp.
  • Alarms watch a series against a threshold.

Put a datapoint and read it back

bash
skippr metrics put-metric-data --input - <<JSON
{
  "namespace": "app",
  "metricData": [{"metricName": "requests", "value": 1, "unit": "Count"}]
}
JSON

skippr metrics get-metric-statistics --namespace app --metric-name requests

Create an alarm with CLI, Terraform, CDKTF TypeScript, or CDKTF Python. Putting datapoints is a data-plane call. For provider credentials and the shared cloud provider block, see Terraform and CDKTF.

bash
skippr metrics put-metric-alarm --input - <<JSON
{
  "alarmName": "requests",
  "namespace": "app",
  "metricName": "requests",
  "threshold": 1
}
JSON
hcl
resource "cloud_metric_alarm" "requests" {
  alarm_name  = "requests"
  namespace   = "app"
  metric_name = "requests"
  threshold   = 1
}
ts
import { CloudProvider, CloudMetricAlarm } from "@skippr/provider-cloud";

const cloud = new CloudProvider(this, "cloud", { region: "eu-central-1" });

new CloudMetricAlarm(this, "requests", {
  alarmName: "requests",
  namespace: "app",
  metricName: "requests",
  threshold: 1,
  provider: cloud,
});
python
from skippr_cdktf import CloudProvider, CloudMetricAlarm

cloud = CloudProvider(self, "cloud", region="eu-central-1")

CloudMetricAlarm(
    self,
    "requests",
    alarm_name="requests",
    namespace="app",
    metric_name="requests",
    threshold=1,
    provider=cloud,
)

DescribeAlarms lists alarms. DeleteMetricAlarm removes one. GetMetricStatistics aggregates by Period and Statistic over the request window, merging recent points with lake history.

Access

  • CLI: skippr metrics <operation>
  • Hostname: metrics.{region}.cloud.skippr.io
  • Auth: Bearer JWT or SigV4 service metrics