diagnostics
Creates, updates, deletes, gets or lists a diagnostics resource.
Overview​
| Name | diagnostics |
| Type | Resource |
| Id | ovh.ovh_cloud_connect.diagnostics |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Diagnostic id |
date | string (date-time) | Date of the diagnostic |
description | string | Description of the diagnostic |
function | string | Diagnostic function (diagAccessEdge, diagMacs, diagPeering, diagPeeringExtra, diagRoutes) |
result | array | Diagnostic result |
source | string | Source where the diagnostic was run |
status | string | Diagnostic status (denied, doing, done, error, pause, todo) |
OVHcloud Connect Diagnostic
| Name | Datatype | Description |
|---|---|---|
id | integer | Diagnostic id |
date | string (date-time) | Date of the diagnostic |
description | string | Description of the diagnostic |
function | string | Diagnostic function (diagAccessEdge, diagMacs, diagPeering, diagPeeringExtra, diagRoutes) |
result | array | Diagnostic result |
source | string | Source where the diagnostic was run |
status | string | Diagnostic status (denied, doing, done, error, pause, todo) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Returns the diagnostic status and the equipment output (BGP state, routes or MACs). | |
list | select | service_name | x_pagination_mode | Returns the IDs of the diagnostics run on the service. |
create | insert | service_name, diagnostic_name | Checks BGP peering, routes or MAC addresses on a configuration; runs per 24 h are capped. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
id | integer | Id |
service_name | string (uuid) | Service name (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Returns the diagnostic status and the equipment output (BGP state, routes or MACs).
SELECT
id,
date,
description,
function,
result,
source,
status
FROM ovh.ovh_cloud_connect.diagnostics
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IDs of the diagnostics run on the service.
SELECT
id,
date,
description,
function,
result,
source,
status
FROM ovh.ovh_cloud_connect.diagnostics
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Checks BGP peering, routes or MAC addresses on a configuration; runs per 24 h are capped.
INSERT INTO ovh.ovh_cloud_connect.diagnostics (
dc_config_id,
diagnostic_name,
diagnostic_type,
edge_id,
extra_config_id,
pop_config_id,
service_name
)
SELECT
{{ dc_config_id }},
'{{ diagnostic_name }}' /* required */,
'{{ diagnostic_type }}',
{{ edge_id }},
{{ extra_config_id }},
{{ pop_config_id }},
'{{ service_name }}'
RETURNING
id,
date,
description,
function,
result,
source,
status
;
# Description fields are for documentation purposes
- name: diagnostics
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the diagnostics resource.
- name: dc_config_id
value: {{ dc_config_id }}
description: |
ID of the Datacenter configuration
- name: diagnostic_name
value: "{{ diagnostic_name }}"
description: |
Name of the diagnostic
valid_values: ['diagAccessEdge', 'diagMacs', 'diagPeering', 'diagPeeringExtra', 'diagRoutes']
- name: diagnostic_type
value: "{{ diagnostic_type }}"
description: |
Type of the diagnostic
valid_values: ['advertised-routes', 'default', 'routes']
- name: edge_id
value: {{ edge_id }}
description: |
ID of the service Edge
- name: extra_config_id
value: {{ extra_config_id }}
description: |
ID of the extra configuration
- name: pop_config_id
value: {{ pop_config_id }}
description: |
ID of the Pop Configuration