الحصول على مقاييس المراقبة
curl --request GET \
--url https://api.truthlocks.com/v1/metrics \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/metrics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"metrics": [
{
"name": "<string>",
"values": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
]
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}قابلية المراقبة
قراءة بيانات تعريف خدمة MAIP
يعرض مقاييس السلاسل الزمنية لنشاط الوكيل. يدعم أسماء مقاييس متعددة وفترات زمنية قابلة للتكوين للتجميع.
GET
/
v1
/
metrics
الحصول على مقاييس المراقبة
curl --request GET \
--url https://api.truthlocks.com/v1/metrics \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/metrics"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"metrics": [
{
"name": "<string>",
"values": [
{
"timestamp": "2023-11-07T05:31:56Z",
"value": 123
}
]
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}يُرجع
service، supported_events، event_types، وgenerated_at لخدمة هوية الجهاز. إنه ليس استعلامًا لمقاييس السلاسل الزمنية. لا يستهلك المعالج معلمات الدقة أو الفترة أو التجميع.
