The Kruize REST API is as follows:
Get the list of applications monitored by Kruize, along with the application and recommendation generation status.
Request
GET /listApplications
curl -H 'Accept: application/json' http://localhost:31313/listApplications
Response
[
{
"application_name": "kruize",
"recommendations_generated": "yes",
"status": "running"
},
{
"application_name": "grafana",
"recommendations_generated": "no",
"status": "idle"
},
{
"application_name": "cadvisor",
"recommendations_generated": "yes",
"status": "running"
},
{
"application_name": "prometheus",
"recommendations_generated": "no",
"status": "idle"
}
]
Get the recommendations generated by Kruize for an application it is monitoring.
Request
GET /recommendations?application_name=<APPLICATION_NAME>
curl -H 'Accept: application/json' http://localhost:31313/recommendations?application_name=<APPLICATION_NAME>
Response
[
{
"application_name": "sample_application",
"resources": {
"requests": {
"memory": "108.9MB",
"cpu": 0.6
},
"limits": {
"memory": "158.9MB",
"cpu": 1.2
}
}
}
]
Get the status of Kruize.
Request
GET /health
curl -H 'Accept: application/json' http://localhost:31313/health
Response
UP