Developers
Monitoring
My computers, health, status, metrics and logs.
My computers
In your Account, every container or pod shows up in My computers as a computer labeled Server, with the name of the token it connected with. There you see its state (sharing, paused or off) and what it has earned, and you can remove it.
Health and status
| Path (port 9090) | Answers |
|---|---|
/healthz | The process is alive. Use it for liveness. |
/readyz | Connected to the network and engine ready. Use it for readiness. |
/status | Status as JSON with no personal data: version, variant, accelerator (accel), connection, engine, in-flight requests and models. |
/metrics | Metrics in Prometheus text format. |
With the port published on the loopback interface only (-p 127.0.0.1:9090:9090):
curl -s http://127.0.0.1:9090/healthz
curl -s http://127.0.0.1:9090/readyz
curl -s http://127.0.0.1:9090/status
curl -s http://127.0.0.1:9090/metricsMetrics
| Metric | What it measures |
|---|---|
piap_node_info{version,variant,accel} | Version, image variant and detected accelerator (always 1). |
piap_node_connected | 1 when connected to the network. |
piap_node_sharing | 1 when sharing (not paused or outside the schedule). |
piap_node_engine_ready | 1 when the model engine is ready. |
piap_node_jobs_in_flight | In-flight requests. |
piap_node_tokens_today | Tokens generated today for the network (UTC day). |
piap_node_daily_token_budget | Configured daily cap (PIAP_DAILY_TOKENS); 0 = no cap. |
piap_node_models_installed | Models installed on the volume. |
piap_node_uptime_seconds | Seconds since start. |
Scraping with Prometheus, with static targets and with pod discovery on Kubernetes (with the chart, metrics.serviceMonitor.enabled=true creates a ServiceMonitor):
scrape_configs:
- job_name: piap-node
scrape_interval: 30s
static_configs:
- targets:
- 10.0.10.21:9090
- 10.0.10.22:9090
- job_name: piap-node-k8s
kubernetes_sd_configs:
- role: pod
namespaces:
names: ["piap"]
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_name]
regex: piap-node
action: keep
- source_labels: [__meta_kubernetes_pod_container_port_number]
regex: "9090"
action: keepSome useful alerts:
groups:
- name: piap-node
rules:
- alert: PiapNodeDisconnected
expr: piap_node_connected == 0
for: 10m
- alert: PiapNodeEngineNotReady
expr: piap_node_engine_ready == 0
for: 15m
- alert: PiapNodeDailyBudgetReached
expr: piap_node_daily_token_budget > 0 and piap_node_tokens_today >= piap_node_daily_token_budget
for: 5mLogs
Logs go to standard output as JSON and never include request content, the token or personal data. Ship them to your logging system like any other container.