curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/analytics/remediation-stats \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats', 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 => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats"
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))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "RemediationStats",
"metadata": {
"totalCount": 3,
"page": 1,
"pageSize": 3
},
"items": [
{
"action": "Agentic AI-driven remediation",
"total": 14,
"successful": 12,
"failed": 2,
"successRate": 0.857,
"avgDuration": 184.5
},
{
"action": "AdjustResources",
"total": 6,
"successful": 6,
"failed": 0,
"successRate": 1,
"avgDuration": 42
},
{
"action": "RestartDeployment",
"total": 4,
"successful": 3,
"failed": 1,
"successRate": 0.75,
"avgDuration": 35.2
}
]
}
Estatísticas de Remediação
Retorna as taxas de sucesso de remediação agrupadas por estratégia, julgadas pela resolução do Issue pai
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/analytics/remediation-stats \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats', 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 => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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 := "{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats"
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))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/analytics/remediation-stats")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "RemediationStats",
"metadata": {
"totalCount": 3,
"page": 1,
"pageSize": 3
},
"items": [
{
"action": "Agentic AI-driven remediation",
"total": 14,
"successful": 12,
"failed": 2,
"successRate": 0.857,
"avgDuration": 184.5
},
{
"action": "AdjustResources",
"total": 6,
"successful": 6,
"failed": 0,
"successRate": 1,
"avgDuration": 42
},
{
"action": "RestartDeployment",
"total": 4,
"successful": 3,
"failed": 1,
"successRate": 0.75,
"avgDuration": 35.2
}
]
}
2026-03-01T00:00:00Z). Um valor inválido é ignorado.Metodologia de cálculo
Role mínima:viewer. Cobre todos os namespaces. Os RemediationPlans criados na janela são agrupados pelo Issue pai, e o sucesso é julgado pelo estado atual do Issue, não por plano:
- Sucesso: o Issue pai está
Resolved - Falha: o Issue pai está em qualquer outro estado (inclusive Issues ainda em remediação)
action) é:
- no modo agêntico, o campo
strategydo plano (o operator defineAgentic AI-driven remediation), senão o tipo da primeira ação do histórico, senãoAgentic; - nos demais casos, o tipo da primeira ação do plano, ou
Unknownquando não há nenhuma.
successRate é uma razão de 0 a 1. avgDuration é em segundos, com média sobre os planos que têm startedAt e completedAt. Os itens vêm ordenados por total, do maior para o menor.
Resolved, eles contam como falha até que esteja.{
"apiVersion": "v1",
"kind": "RemediationStats",
"metadata": {
"totalCount": 3,
"page": 1,
"pageSize": 3
},
"items": [
{
"action": "Agentic AI-driven remediation",
"total": 14,
"successful": 12,
"failed": 2,
"successRate": 0.857,
"avgDuration": 184.5
},
{
"action": "AdjustResources",
"total": 6,
"successful": 6,
"failed": 0,
"successRate": 1,
"avgDuration": 42
},
{
"action": "RestartDeployment",
"total": 4,
"successful": 3,
"failed": 1,
"successRate": 0.75,
"avgDuration": 35.2
}
]
}
Autorizações
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).
Parâmetros de consulta
Start of the time range (RFC3339). Unparseable values are ignored.
"2026-03-01T00:00:00Z"
End of the time range (RFC3339). Unparseable values are ignored.
"2026-03-19T23:59:59Z"