Prometheus metrics (text exposition)
curl --request GET \
--url http://localhost:3773/metricsimport requests
url = "http://localhost:3773/metrics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3773/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3773",
CURLOPT_URL => "http://localhost:3773/metrics",
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 := "http://localhost:3773/metrics"
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("http://localhost:3773/metrics")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3773/metrics")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"# HELP http_requests_total Total number of HTTP requests\n# TYPE http_requests_total counter\nhttp_requests_total{method=\"GET\",endpoint=\"/health\",status=\"200\"} 1\nhttp_requests_total{method=\"POST\",endpoint=\"/did/resolve\",status=\"200\"} 1\n\n# HELP http_request_duration_seconds HTTP request latency\n# TYPE http_request_duration_seconds histogram\nhttp_request_duration_seconds_bucket{le=\"0.1\"} 2\nhttp_request_duration_seconds_bucket{le=\"0.5\"} 2\nhttp_request_duration_seconds_bucket{le=\"1.0\"} 2\nhttp_request_duration_seconds_bucket{le=\"+Inf\"} 2\nhttp_request_duration_seconds_sum 0.0\nhttp_request_duration_seconds_count 2\n\n# HELP agent_tasks_active Currently active tasks\n# TYPE agent_tasks_active gauge\nagent_tasks_active{agent_id=\"did:bindu:bindu_builder_at_getbindu_com:agent:8faa865e-d8ec-8b2f-f000-598e8e463d60\"} 0\n\n# HELP http_request_size_bytes HTTP request body size\n# TYPE http_request_size_bytes summary\nhttp_request_size_bytes_sum 109\nhttp_request_size_bytes_count 1\n\n# HELP http_response_size_bytes HTTP response body size\n# TYPE http_response_size_bytes summary\nhttp_response_size_bytes_sum 1054\nhttp_response_size_bytes_count 2\n\n# HELP http_requests_in_flight Current number of HTTP requests being processed\n# TYPE http_requests_in_flight gauge\nhttp_requests_in_flight 0\n"Health & Monitoring
Prometheus metrics (text exposition)
Standard Prometheus text format. Key series include:
http_requests_total{method, path, status}— request countshttp_request_duration_seconds— latency histogramagent_tasks_active— count by stateagent_tasks_completed_total{state}— lifetime terminal countsagent_llm_tokens_total{direction, model}— token usage
GET
/
metrics
Prometheus metrics (text exposition)
curl --request GET \
--url http://localhost:3773/metricsimport requests
url = "http://localhost:3773/metrics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3773/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3773",
CURLOPT_URL => "http://localhost:3773/metrics",
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 := "http://localhost:3773/metrics"
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("http://localhost:3773/metrics")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3773/metrics")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"# HELP http_requests_total Total number of HTTP requests\n# TYPE http_requests_total counter\nhttp_requests_total{method=\"GET\",endpoint=\"/health\",status=\"200\"} 1\nhttp_requests_total{method=\"POST\",endpoint=\"/did/resolve\",status=\"200\"} 1\n\n# HELP http_request_duration_seconds HTTP request latency\n# TYPE http_request_duration_seconds histogram\nhttp_request_duration_seconds_bucket{le=\"0.1\"} 2\nhttp_request_duration_seconds_bucket{le=\"0.5\"} 2\nhttp_request_duration_seconds_bucket{le=\"1.0\"} 2\nhttp_request_duration_seconds_bucket{le=\"+Inf\"} 2\nhttp_request_duration_seconds_sum 0.0\nhttp_request_duration_seconds_count 2\n\n# HELP agent_tasks_active Currently active tasks\n# TYPE agent_tasks_active gauge\nagent_tasks_active{agent_id=\"did:bindu:bindu_builder_at_getbindu_com:agent:8faa865e-d8ec-8b2f-f000-598e8e463d60\"} 0\n\n# HELP http_request_size_bytes HTTP request body size\n# TYPE http_request_size_bytes summary\nhttp_request_size_bytes_sum 109\nhttp_request_size_bytes_count 1\n\n# HELP http_response_size_bytes HTTP response body size\n# TYPE http_response_size_bytes summary\nhttp_response_size_bytes_sum 1054\nhttp_response_size_bytes_count 2\n\n# HELP http_requests_in_flight Current number of HTTP requests being processed\n# TYPE http_requests_in_flight gauge\nhttp_requests_in_flight 0\n"Response
200 - text/plain
Prometheus text
The response is of type string.
Was this page helpful?
⌘I