2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
============================================
|
|
|
|
Servers diagnostics (servers, diagnostics)
|
|
|
|
============================================
|
|
|
|
|
|
|
|
Shows the usage data for a server.
|
|
|
|
|
|
|
|
Show Server Diagnostics
|
|
|
|
=======================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/diagnostics
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows basic usage data for a server.
|
|
|
|
|
2016-05-09 08:50:06 -04:00
|
|
|
Policy defaults enable only users with the administrative role. Cloud
|
|
|
|
providers can change these permissions through the ``policy.json``
|
|
|
|
file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-22 07:45:43 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), notfound(404), conflict(409), notimplemented(501)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-10-10 14:50:17 -04:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-08-16 15:04:14 +03:00
|
|
|
Starting from **microversion 2.48** diagnostics response is standardized
|
|
|
|
across all virt drivers. The response should be considered a debug interface
|
|
|
|
only and not relied upon by programmatic tools. All response fields are listed
|
|
|
|
below. If the virt driver is unable to provide a specific field then this field
|
|
|
|
will be reported as ``None`` in the response.
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- config_drive: config_drive_diagnostics
|
|
|
|
- state: vm_state_diagnostics
|
|
|
|
- driver: driver_diagnostics
|
|
|
|
- hypervisor: hypervisor_diagnostics
|
|
|
|
- hypervisor_os: hypervisor_os_diagnostics
|
|
|
|
- uptime: uptime_diagnostics
|
|
|
|
- num_cpus: num_cpus_diagnostics
|
|
|
|
- num_disks: num_disks_diagnostics
|
|
|
|
- num_nics: num_nics_diagnostics
|
|
|
|
- memory_details: memory_details_diagnostics
|
|
|
|
- cpu_details: cpu_details_diagnostics
|
|
|
|
- disk_details: disk_details_diagnostics
|
|
|
|
- nic_details: nic_details_diagnostics
|
2016-05-09 08:50:06 -04:00
|
|
|
|
2017-06-06 17:31:45 +04:00
|
|
|
**Example Server diagnostics (2.48)**
|
2016-05-09 08:50:06 -04:00
|
|
|
|
2016-08-16 15:04:14 +03:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-server-diagnostics/v2.48/server-diagnostics-get-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
Before **microversion 2.48** the response format for diagnostics was not
|
|
|
|
well defined. Each hypervisor had its own format.
|
|
|
|
|
2017-06-06 17:31:45 +04:00
|
|
|
**Example Server diagnostics (2.1)**
|
2016-08-16 15:04:14 +03:00
|
|
|
|
2016-11-04 06:48:51 +08:00
|
|
|
Below is an example of diagnostics for a libvirt based instance. The unit of the return
|
|
|
|
value is hypervisor specific, but in this case the unit of vnet1_rx* and
|
|
|
|
vnet1_tx* is octets.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:17:40 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-server-diagnostics/server-diagnostics-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|