Metrics

Use these endpoints to manage Metrics operations on a Crate Operator host. The reference below includes request attributes, response shapes, and executable request examples.

The Metrics object

Structured server metrics matching the node_exporter_metrics DB table. Fields map to node_exporter Prometheus metrics collected from the local instance.

Required attributes

cpu_usage number<double>

CPU usage as a fraction (0.0 – 1.0), computed as 1 — (idle / total).

fs_total_bytes integer<int64>

Total filesystem size in bytes for the root volume.

fs_usage_ratio number<double>

Filesystem usage ratio (0.0 – 1.0).

fs_used_bytes integer<int64>

Used filesystem bytes on the root volume.

health_version integer

Version of the alert/health logic (for recalibration).

inodes_total integer<int64>

Total inodes on the root filesystem.

inodes_usage_ratio number<double>

Inode usage ratio (0.0 – 1.0).

inodes_used integer<int64>

Used inodes on the root filesystem.

memory_total_bytes integer<int64>

Total physical memory in bytes.

memory_usage_ratio number<double>

Memory usage ratio (0.0 – 1.0).

memory_used_bytes integer<int64>

Used memory in bytes (total — available).

scraped_at string<date-time>

Timestamp when the metrics were scraped.

systemd_degraded boolean

Whether the systemd state is degraded.

systemd_failed_units integer

Number of failed systemd units.

systemd_has_failed boolean

Whether any systemd unit has failed.

systemd_running_units integer

Number of running systemd units.

uptime_seconds integer<int64>

System uptime in seconds.

Optional attributes

boot_time string<date-time> | null

System boot time (ISO 8601).

cpu_cores integer | null

Number of CPU cores.

fs_mount_count integer | null

Number of mounted filesystems.

load_avg_15m number<double> | null

Load average over 15 minutes.

load_avg_1m number<double> | null

Load average over 1 minute.

load_avg_5m number<double> | null

Load average over 5 minutes.

GET /v1/node/metrics

Scrape node_exporter metrics

Fetches and parses metrics from the local node_exporter instance (http://localhost:9100/metrics) and returns them as a structured payload matching the node_exporter_metrics table schema.

Responses

200 Node metrics collected successfully
503 Node exporter unavailable