Server monitoring

Get the latest monitoring statistics for a specific server.


GET/api/servers/{server}/monitor

Get monitoring data

This endpoint allows you to retrieve the latest monitoring responses for your server. This requires monitoring to be installed on the server.

Request

GET
/api/servers/{server}/monitor
curl -G "https://ploi.io/api/servers/{server}/monitor" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "cpu": "5.2",
      "ram": "21.81",
      "disk": "40",
      "load_average": "0.19",
      "date": "2021-05-18 05:50:14"
    },
    {
      "cpu": "5",
      "ram": "22.15",
      "disk": "40",
      "load_average": "0.06",
      "date": "2021-05-18 05:45:38"
    },
    {
      "cpu": "6",
      "ram": "22.09",
      "disk": "40",
      "load_average": "0.26",
      "date": "2021-05-18 05:40:06"
    }
  ]
}

Errors

You may encounter these errors when monitoring is not available.

No monitoring installed

{
  "message": "The given data was invalid.",
  "errors": [
    "You do not have monitoring installed on this server."
  ],
  "links": []
}

Subscription not sufficient

{
  "message": "The given data was invalid.",
  "errors": [
    "Your subscription is not sufficient enough to allow monitoring."
  ],
  "links": [
    "http://ploi.io/pricing"
  ]
}