database

Get database metrics

Returns metrics related to a Managed Database service by its {uuid} and query parameter {period}.

get/1.3/database/{uuid}/metrics

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/database/{uuid}/metrics
  • Auth: HTTP bearer

Path parameters

uuidstring uuid required

The unique identifier for the integration.

Example:01234567-89ab-cdef-0123-456789abcdef

Service UUID

Response

OK

DatabaseMetricsResponse required

Schema for metrics response.

Example response

{
  "cpu_usage": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          2.744682398273781,
          3.054323473090861
        ],
        [
          "2022-01-21T13:11:00Z",
          3.0735645433218366,
          2.972423595745795
        ],
        [
          "2022-01-21T13:11:30Z",
          2.61619694060839,
          3.1358378052207883
        ],
        [
          "2022-01-21T13:12:00Z",
          3.275132296130991,
          4.196249043309251
        ]
      ]
    },
    "hints": {
      "title": "CPU usage %"
    }
  },
  "disk_usage": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          5.654416415900109,
          5.58959125727556
        ],
        [
          "2022-01-21T13:11:00Z",
          5.654416415900109,
          5.58959125727556
        ],
        [
          "2022-01-21T13:11:30Z",
          5.654416415900109,
          5.58959125727556
        ]
      ]
    },
    "hints": {
      "title": "Disk space usage %"
    }
  },
  "diskio_reads": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          0,
          0
        ],
        [
          "2022-01-21T13:11:00Z",
          0,
          0
        ],
        [
          "2022-01-21T13:11:30Z",
          0,
          0
        ]
      ]
    },
    "hints": {
      "title": "Disk iops (reads)"
    }
  },
  "diskio_writes": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          3,
          2
        ],
        [
          "2022-01-21T13:11:00Z",
          2,
          3
        ],
        [
          "2022-01-21T13:11:30Z",
          4,
          3
        ]
      ]
    },
    "hints": {
      "title": "Disk iops (writes)"
    }
  },
  "load_average": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          0.11,
          0.11
        ],
        [
          "2022-01-21T13:11:00Z",
          0.14,
          0.1
        ],
        [
          "2022-01-21T13:11:30Z",
          0.14,
          0.09
        ]
      ]
    },
    "hints": {
      "title": "Load average (5 min)"
    }
  },
  "mem_usage": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          11.491766148261078,
          12.318932883261219
        ],
        [
          "2022-01-21T13:11:00Z",
          11.511967645759277,
          12.304403727425075
        ],
        [
          "2022-01-21T13:11:30Z",
          11.488581675749048,
          12.272260458006759
        ]
      ]
    },
    "hints": {
      "title": "Memory usage %"
    }
  },
  "net_receive": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          442,
          470
        ],
        [
          "2022-01-21T13:11:00Z",
          439,
          384
        ],
        [
          "2022-01-21T13:11:30Z",
          466,
          458
        ]
      ]
    },
    "hints": {
      "title": "Network receive (bytes/s)"
    }
  },
  "net_send": {
    "data": {
      "cols": [
        {
          "label": "time",
          "type": "date"
        },
        {
          "label": "test-1 (master)",
          "type": "number"
        },
        {
          "label": "test-2 (standby)",
          "type": "number"
        }
      ],
      "rows": [
        [
          "2022-01-21T13:10:30Z",
          672,
          581
        ],
        [
          "2022-01-21T13:11:00Z",
          660,
          555
        ],
        [
          "2022-01-21T13:11:30Z",
          694,
          573
        ]
      ]
    },
    "hints": {
      "title": "Network transmit (bytes/s)"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.