Skip to main content

diagnostics

Creates, updates, deletes, gets or lists a diagnostics resource.

Overview​

Namediagnostics
TypeResource
Idovh.ovh_cloud_connect.diagnostics

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerDiagnostic id
datestring (date-time)Date of the diagnostic
descriptionstringDescription of the diagnostic
functionstringDiagnostic function (diagAccessEdge, diagMacs, diagPeering, diagPeeringExtra, diagRoutes)
resultarrayDiagnostic result
sourcestringSource where the diagnostic was run
statusstringDiagnostic status (denied, doing, done, error, pause, todo)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameReturns the diagnostic status and the equipment output (BGP state, routes or MACs).
listselectservice_namex_pagination_modeReturns the IDs of the diagnostics run on the service.
createinsertservice_name, diagnostic_nameChecks 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.

NameDatatypeDescription
api_hoststringThe 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"}})
idintegerId
service_namestring (uuid)Service name (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;