Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 1.43 KB

File metadata and controls

82 lines (64 loc) · 1.43 KB

Kruize REST API

The Kruize REST API is as follows:

listApplications

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"
  }
]

Recommendations

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
      }
    }
  }
]

Health

Get the status of Kruize.

Request GET /health

curl -H 'Accept: application/json' http://localhost:31313/health

Response

UP