Home

/reports/operational/clusterstats?st={timestamp}&et={timestamp}&mode={summary_type}

Gets a summary of the cluster's users, apps, or queues.

Request
GET http://unravel-host:3000/api/v1/reports/operational/clusterstats?st={timestamp}&et={timestamp}&mode={summary_type}
Path parameters

None.

Query parameters

Required parameters are highlighted.

Name

Type

Description

st

string

Start time, in Unix epoch format.

et

string

End time, in Unix epoch format.

mode

string

Summary type.

Valid values are user, app, queue.

Response body

JSON schema when mode is user or queue:

{
  "userStats": [
// array of users | queues currently on cluster
    {
      "root": {
        "running": {
          "min":  minimum applications running,,
          "max": minimum applications running,
          "mean": average appication number running,
          "stddev": standard deviation
        },
        "memory":  { // see running above },
        "pending": {  // see running above },
        "vcores":  {  // see running above }
      }
    }
  ]
}
Examples

Request with mode=user:

curl -X GET "http://myserver.com:3000/api/v1/reports/operational/clusterstats?st=1536658189000&et=1536744589000&mode=user" -H  "accept: application/json" -H  "Authorization: JWT token"

Response for mode=user:

{
  "userStats": [
    {
      "root": {
        "running": {
          "min": 1,
          "max": 1,
          "mean": 1,
          "stddev": 0
        },
        "memory": {
          "min": 1024,
          "max": 16384,
          "mean": 7040,
          "stddev": 7099.0974074174
        },
        "pending": {
          "min": 0,
          "max": 0,
          "mean": 0,
          "stddev": 0
        },
        "vcores": {
          "min": 1,
          "max": 3,
          "mean": 2,
          "stddev": 0.81649658092773
        }
      }
    }
  ]
}

Request with mode=queue:

curl -X GET "http://myserver.com:3000/api/v1/reports/operational/clusterstats?st=1536658189000&et=1536744589000&mode=queue" -H  "accept: application/json" -H  "Authorization: JWT token"

Response for mode=queue:

{
  "queueStats": [
    {
      "root.users.root": {
        "running": {
          "min": 1,
          "max": 1,
          "mean": 1,
          "stddev": 0
        },
        "memory": {
          "min": 1024,
          "max": 16384,
          "mean": 7040,
          "stddev": 7099.0974074174
        },
        "pending": {
          "min": 0,
          "max": 0,
          "mean": 0,
          "stddev": 0
        },
        "vcores": {
          "min": 1,
          "max": 3,
          "mean": 2,
          "stddev": 0.81649658092773
        }
      }
    }
  ]
}

Response for mode=app:

{
   [
     appID : application id,
     type : memorySeconds/vcoreSeconds
     vcore : vcore value
     memory : memory value
   ]
}