Pular para o conteúdo principal
GET
/
analytics
/
capacity
Capacity Forecast
curl --request GET \
  --url http://{host}:{port}/{basePath}/analytics/capacity \
  --header 'Authorization: <api-key>'
{
  "apiVersion": "v1",
  "kind": "CapacityForecastList",
  "metadata": {
    "totalCount": 2,
    "page": 1,
    "pageSize": 2
  },
  "items": [
    {
      "Resource": {"Kind": "Deployment", "Name": "payment-service", "Namespace": "production"},
      "Urgency": "urgent",
      "Recommendation": "Memory exhaustion projected in 5 days. Scale up or optimize memory usage.",
      "IsBottleneck": true
    },
    {
      "Resource": {"Kind": "StatefulSet", "Name": "redis-cluster", "Namespace": "data"},
      "Urgency": "plan",
      "Recommendation": "CPU trend increasing. Plan capacity review within 30 days."
    }
  ]
}
namespace
string
Filtrar por namespace do Kubernetes
from
string
Data inicial no formato RFC3339
to
string
Data final no formato RFC3339 (padrão: agora). A janela de análise padrão e de 7 dias.

Campos da Previsao

CampoDescrição
ResourceO recurso Kubernetes (kind, name, namespace)
Urgencyurgent (esgotamento em menos de 7 dias), plan (7-30 dias), stable (mais de 30 dias)
RecommendationRecomendacao gerada automaticamente com base na urgencia
IsBottleneckSe este recurso está correlacionado com incidentes ativos
{
  "apiVersion": "v1",
  "kind": "CapacityForecastList",
  "metadata": {
    "totalCount": 2,
    "page": 1,
    "pageSize": 2
  },
  "items": [
    {
      "Resource": {"Kind": "Deployment", "Name": "payment-service", "Namespace": "production"},
      "Urgency": "urgent",
      "Recommendation": "Memory exhaustion projected in 5 days. Scale up or optimize memory usage.",
      "IsBottleneck": true
    },
    {
      "Resource": {"Kind": "StatefulSet", "Name": "redis-cluster", "Namespace": "data"},
      "Urgency": "plan",
      "Recommendation": "CPU trend increasing. Plan capacity review within 30 days."
    }
  ]
}

Autorizações

Authorization
string
header
obrigatório

Bearer token issued by the operator. Format: Authorization: Bearer <token>.

Parâmetros de consulta

namespace
string

Filter by namespace.

from
string<date-time>

Start date (RFC3339).

to
string<date-time>

End date (RFC3339).

Resposta

Capacity forecast list

apiVersion
string
Exemplo:

"v1"

kind
string
Exemplo:

"CapacityForecastList"

metadata
object
items
object[]