Skip to main content

services

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

Overview

Nameservices
TypeResource
Idlinode.managed.services

Fields

The following fields are returned by SELECT queries:

The requested Managed Service.

NameDatatypeDescription
idintegerRead-only This Service's unique ID.
addressstring (url)The URL at which this Service is monitored. URL parameters such as ?no-cache=1 are preserved. URL fragments/anchors such as #monitor are not preserved. (example: https://example.org)
bodystringWhat to expect to find in the response body for the Service to be considered up. (example: it worked)
consultation_groupstringThe group of ManagedContacts who should be notified or consulted with when an Issue is detected. (example: on-call)
createdstring (date-time)Read-only When this Managed Service was created. (example: 2018-01-01T00:01:01)
credentialsarrayAn array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service.
labelstringThe label for this Service. This is for display purposes only. (example: prod-1, pattern: [a-zA-Z0-9-_ .]{3,64})
notesstringAny information relevant to the Service that Linode special forces should know when attempting to resolve Issues. (example: The service name is my-cool-application)
regionstringThe Region in which this Service is located. This is required if address is a private IP, and may not be set otherwise.
service_typestringHow this Service is monitored. (url, tcp) (example: url)
statusstringRead-only The current status of this Service. (disabled, pending, ok, problem) (example: ok)
timeoutintegerHow long to wait, in seconds, for a response before considering the Service to be down.
updatedstring (date-time)Read-only When this Managed Service was last updated. (example: 2018-03-01T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectserviceIdReturns the configuration settings for a single service monitor.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
listselectReturns a paginated list of service monitors on your account. These are the services on your Linodes monitored by Linode Managed.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
createinsertlabel, service_type, address, timeoutCreates a service monitor. Linode Managed monitors this service and alerts Akamai Support when issues are detected.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
updatereplaceserviceIdUpdates a service monitor's configuration settings.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
deletedeleteserviceIdDeletes a service monitor, so that the service is no longer monitored by Linode Managed.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
disableexecserviceIdTemporarily disables monitoring of a service on a managed Linode.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...
enableexecserviceIdEnables monitoring of a service on a managed Linode.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

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
serviceIdstringThe ID of the Managed Service to enable.

SELECT examples

Returns the configuration settings for a single service monitor.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

SELECT
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated
FROM linode.managed.services
WHERE serviceId = '{{ serviceId }}' -- required
;

INSERT examples

Creates a service monitor. Linode Managed monitors this service and alerts Akamai Support when issues are detected.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

INSERT INTO linode.managed.services (
address,
body,
consultation_group,
credentials,
label,
notes,
region,
service_type,
timeout
)
SELECT
'{{ address }}' /* required */,
'{{ body }}',
'{{ consultation_group }}',
'{{ credentials }}',
'{{ label }}' /* required */,
'{{ notes }}',
'{{ region }}',
'{{ service_type }}' /* required */,
{{ timeout }} /* required */
RETURNING
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated
;

REPLACE examples

Updates a service monitor's configuration settings.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

REPLACE linode.managed.services
SET
address = '{{ address }}',
body = '{{ body }}',
consultation_group = '{{ consultation_group }}',
credentials = '{{ credentials }}',
label = '{{ label }}',
notes = '{{ notes }}',
region = '{{ region }}',
service_type = '{{ service_type }}',
timeout = {{ timeout }}
WHERE
serviceId = '{{ serviceId }}' --required
RETURNING
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated;

DELETE examples

Deletes a service monitor, so that the service is no longer monitored by Linode Managed.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

DELETE FROM linode.managed.services
WHERE serviceId = '{{ serviceId }}' --required
;

Lifecycle Methods

Temporarily disables monitoring of a service on a managed Linode.

This operation can only be accessed by the unrestricted users of an account.

Learn more...

Learn more...

EXEC linode.managed.services.disable
@serviceId='{{ serviceId }}' --required
;