Infrastructure
The Infrastructure page shows the health of your hosts in real time — which are online, which are silent, and which metrics are spiking. Click any host to drill into its metric history.
What you’ll need
- A ScryWatch project API key (see API Keys & Settings)
- A server, worker, or service to send metrics from
Step 1: Send your first metrics
Use the metrics ingest endpoint with your API key:
curl -X POST https://api.scrywatch.com/api/metrics \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"host": "web-server-01",
"service": "api-gateway",
"environment": "production",
"metrics": [
{ "name": "cpu_percent", "value": 42.7 },
{ "name": "mem_percent", "value": 61.2 },
{ "name": "disk_percent", "value": 38.0 }
]
}'
You should receive:
{ "accepted": 3 }
Tip: Send up to 50 metrics per request. Batch all metrics for a host in a single call rather than making one call per metric.
Step 2: Open Infrastructure
Click Infrastructure in the left sidebar.
At the top you’ll see a summary bar with four chips:
| Chip | Meaning |
|---|---|
| Total Hosts | Every host that has ever sent metrics |
| Online | Hosts that reported within the last 2 minutes |
| Offline | Hosts that have gone silent |
| Warnings | Hosts with at least one metric ≥ 80% |
Below the summary bar is the host table — one row per host.
Step 3: Read the host table
Each row shows:
- Status dot — Green (healthy), Yellow (≥ 80%), Red (≥ 90%), Gray (offline)
- Host — the hostname you sent
- Status pill —
onlineoroffline - Metric columns — one column per distinct metric name across all your hosts, with a mini progress bar and current value.
cpu_percent,mem_percent, anddisk_percentare pinned first; everything else is alphabetical - Services — any
servicetags you included - Last Seen — how long ago this host last reported
Offline rows are dimmed. Metric cells for offline hosts show —.
Step 4: Drill into a host
Click any row to open the host detail page.
You’ll see:
- A breadcrumb back to the host list
- The host’s status dot, name, last seen time, and service tags
- A 2-column grid of metric cards — one card per metric the host reports
Each card shows:
- The metric name
- The current value (colored green / yellow / red by threshold, or purple for non-percentage metrics)
- A sparkline bar chart for the last 1 hour
Step 5: Understand metric colors
Metrics in the 0–100 range are treated as percentages and colored by threshold:
| Value | Color | Meaning |
|---|---|---|
| < 80% | Green | Healthy |
| 80–89% | Yellow | Warning |
| ≥ 90% | Red | Critical |
Metrics outside 0–100 (e.g. queue_depth, latency_ms) are shown in purple with no threshold — ScryWatch can’t know what “too high” means for arbitrary values.
Step 6: Set up periodic metric collection
For ongoing monitoring, send metrics on a schedule. The page treats a host as online if it reported within the last 2 minutes, so send at least every 60 seconds.
Example using Node.js:
import os from 'os';
setInterval(async () => {
const memUsed = process.memoryUsage().rss / os.totalmem() * 100;
await fetch('https://api.scrywatch.com/api/metrics', {
method: 'POST',
headers: {
'Authorization': 'Bearer sw_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
host: os.hostname(),
service: 'my-service',
metrics: [
{ name: 'mem_percent', value: memUsed },
],
}),
});
}, 30_000);
Tip: For Cloudflare Workers, use a cron trigger (
scheduledhandler) to send metrics every minute.
You’re done
You now know how to:
- Send gauge metrics with host and service tags
- Read the summary bar and host table at a glance
- Spot offline or warning hosts by their status dot
- Drill into a host to see its per-metric sparkline history
- Set up periodic metric collection so the page stays live
Related docs
Full metrics ingest API reference — request body schema, batch limits, and time-series query endpoints.