System
System Metrics
GET
/
api
/
v1
/
observer
/
system
System Metrics
curl --request GET \
--url https://api.example.com/api/v1/observer/systemimport requests
url = "https://api.example.com/api/v1/observer/system"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/observer/system', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/observer/system",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/observer/system"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/observer/system")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/observer/system")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ok",
"result": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "Queue\tPending\tIn Progress\tProcessed\tErrors\tTotal\nEmbedding\t0\t0\t10\t0\t10\nSemantic\t0\t0\t10\t0\t10\nTOTAL\t0\t0\t20\t0\t20"
},
"time": 0.03
}
{
"status": "ok",
"result": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "Collection\tIndex Count\tVector Count\tStatus\ncontext\t1\t55\tOK\nTOTAL\t1\t55"
},
"time": 0.05
}
{
"status": "ok",
"result": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "Model\tProvider\tPrompt\tCompletion\tTotal\tLast Updated\ndoubao-1-5-vision-pro-32k\tvolcengine\t1000\t500\t1500\t2024-01-01 12:00:00\nTOTAL\t\t1000\t500\t1500"
},
"time": 0.04
}
{
"status": "ok",
"result": {
"is_healthy": true,
"errors": [],
"components": {
"queue": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vikingdb": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vlm": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "..."
}
}
},
"time": 0.08
}
Get detailed metrics and status for all system components including queue system, VikingDB, and VLM token usage.
Response:
Response:
The observer API provides component-level monitoring for production deployments.
Authentication
Requires API key authentication viaX-API-Key header.
Available Metrics
Queue System
Get status of embedding and semantic processing queues.curl -X GET http://localhost:1933/api/v1/observer/queue \
-H "X-API-Key: your-key"
print(client.observer.queue)
# Output:
# [queue] (healthy)
# Queue Pending In Progress Processed Errors Total
# Embedding 0 0 10 0 10
# Semantic 0 0 10 0 10
# TOTAL 0 0 20 0 20
VikingDB Status
Get VikingDB collection and vector count information.curl -X GET http://localhost:1933/api/v1/observer/vikingdb \
-H "X-API-Key: your-key"
print(client.observer.vikingdb)
# Output:
# [vikingdb] (healthy)
# Collection Index Count Vector Count Status
# context 1 55 OK
# TOTAL 1 55
# Access specific properties
print(client.observer.vikingdb.is_healthy) # True
print(client.observer.vikingdb.status) # Status table string
VLM Token Usage
Get Vision Language Model token usage statistics.curl -X GET http://localhost:1933/api/v1/observer/vlm \
-H "X-API-Key: your-key"
print(client.observer.vlm)
# Output:
# [vlm] (healthy)
# Model Provider Prompt Completion Total Last Updated
# doubao-1-5-vision-pro-32k volcengine 1000 500 1500 2024-01-01 12:00:00
# TOTAL 1000 500 1500
Overall System Status
Get combined status of all components.curl -X GET http://localhost:1933/api/v1/observer/system \
-H "X-API-Key: your-key"
# Print all component status
print(client.observer.system)
# Check if system is healthy
if client.observer.is_healthy():
print("System OK")
else:
print("System has issues")
print(client.observer.system)
Response Schemas
Component Status Response
string
Response status (
ok or error)object
number
Request processing time in seconds
System Status Response
string
Response status (
ok or error)object
number
Request processing time in seconds
Response Examples
{
"status": "ok",
"result": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "Queue\tPending\tIn Progress\tProcessed\tErrors\tTotal\nEmbedding\t0\t0\t10\t0\t10\nSemantic\t0\t0\t10\t0\t10\nTOTAL\t0\t0\t20\t0\t20"
},
"time": 0.03
}
{
"status": "ok",
"result": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "Collection\tIndex Count\tVector Count\tStatus\ncontext\t1\t55\tOK\nTOTAL\t1\t55"
},
"time": 0.05
}
{
"status": "ok",
"result": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "Model\tProvider\tPrompt\tCompletion\tTotal\tLast Updated\ndoubao-1-5-vision-pro-32k\tvolcengine\t1000\t500\t1500\t2024-01-01 12:00:00\nTOTAL\t\t1000\t500\t1500"
},
"time": 0.04
}
{
"status": "ok",
"result": {
"is_healthy": true,
"errors": [],
"components": {
"queue": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vikingdb": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vlm": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "..."
}
}
},
"time": 0.08
}
Wait for Processing
Wait for all asynchronous processing (embedding, semantic generation) to complete.curl -X POST http://localhost:1933/api/v1/system/wait \
-H "Content-Type: application/json" \
-H "X-API-Key: your-key" \
-d '{"timeout": 60.0}'
# Add resources
client.add_resource("./docs/")
# Wait for all processing to complete
status = client.wait_processed(timeout=60.0)
print(f"Pending: {status['pending']}")
print(f"Processed: {status['processed']}")
print(f"Errors: {status['errors']}")
{
"status": "ok",
"result": {
"pending": 0,
"in_progress": 0,
"processed": 20,
"errors": 0
},
"time": 0.1
}
Health Check
Quick boolean health check:curl -X GET http://localhost:1933/api/v1/debug/health \
-H "X-API-Key: your-key"
if client.observer.is_healthy():
print("System OK")
else:
print(client.observer.system)
{
"status": "ok",
"result": {
"healthy": true
},
"time": 0.02
}
Monitoring Best Practices
Use Readiness Probes in Kubernetes
Use Readiness Probes in Kubernetes
Configure the
/ready endpoint (no auth required) as your readiness probe:readinessProbe:
httpGet:
path: /ready
port: 1933
initialDelaySeconds: 10
periodSeconds: 5
Monitor Queue Depths
Monitor Queue Depths
If
pending or in_progress counts remain high:- Check embedding service health
- Verify VikingDB connectivity
- Consider scaling workers
Track VLM Token Usage
Track VLM Token Usage
Monitor token consumption to:
- Predict costs
- Identify usage spikes
- Detect potential abuse
Related Endpoints
- System Status - Basic status check
- Wait for Processing - Ensure async operations complete
⌘I
System Metrics
curl --request GET \
--url https://api.example.com/api/v1/observer/systemimport requests
url = "https://api.example.com/api/v1/observer/system"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/observer/system', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/observer/system",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/observer/system"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/observer/system")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/observer/system")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ok",
"result": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "Queue\tPending\tIn Progress\tProcessed\tErrors\tTotal\nEmbedding\t0\t0\t10\t0\t10\nSemantic\t0\t0\t10\t0\t10\nTOTAL\t0\t0\t20\t0\t20"
},
"time": 0.03
}
{
"status": "ok",
"result": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "Collection\tIndex Count\tVector Count\tStatus\ncontext\t1\t55\tOK\nTOTAL\t1\t55"
},
"time": 0.05
}
{
"status": "ok",
"result": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "Model\tProvider\tPrompt\tCompletion\tTotal\tLast Updated\ndoubao-1-5-vision-pro-32k\tvolcengine\t1000\t500\t1500\t2024-01-01 12:00:00\nTOTAL\t\t1000\t500\t1500"
},
"time": 0.04
}
{
"status": "ok",
"result": {
"is_healthy": true,
"errors": [],
"components": {
"queue": {
"name": "queue",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vikingdb": {
"name": "vikingdb",
"is_healthy": true,
"has_errors": false,
"status": "..."
},
"vlm": {
"name": "vlm",
"is_healthy": true,
"has_errors": false,
"status": "..."
}
}
},
"time": 0.08
}
