services
Creates, updates, deletes, gets or lists a services resource.
Overview
| Name | services |
| Type | Resource |
| Id | linode.managed.services |
Fields
The following fields are returned by SELECT queries:
- get
- list
The requested Managed Service.
| Name | Datatype | Description |
|---|---|---|
id | integer | Read-only This Service's unique ID. |
address | string (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) |
body | string | What to expect to find in the response body for the Service to be considered up. (example: it worked) |
consultation_group | string | The group of ManagedContacts who should be notified or consulted with when an Issue is detected. (example: on-call) |
created | string (date-time) | Read-only When this Managed Service was created. (example: 2018-01-01T00:01:01) |
credentials | array | An array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service. |
label | string | The label for this Service. This is for display purposes only. (example: prod-1, pattern: [a-zA-Z0-9-_ .]{3,64}) |
notes | string | Any information relevant to the Service that Linode special forces should know when attempting to resolve Issues. (example: The service name is my-cool-application) |
region | string | The Region in which this Service is located. This is required if address is a private IP, and may not be set otherwise. |
service_type | string | How this Service is monitored. (url, tcp) (example: url) |
status | string | Read-only The current status of this Service. (disabled, pending, ok, problem) (example: ok) |
timeout | integer | How long to wait, in seconds, for a response before considering the Service to be down. |
updated | string (date-time) | Read-only When this Managed Service was last updated. (example: 2018-03-01T00:01:01) |
A paginated list of Managed Services.
| Name | Datatype | Description |
|---|---|---|
id | integer | Read-only This Service's unique ID. |
address | string (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) |
body | string | What to expect to find in the response body for the Service to be considered up. (example: it worked) |
consultation_group | string | The group of ManagedContacts who should be notified or consulted with when an Issue is detected. (example: on-call) |
created | string (date-time) | Read-only When this Managed Service was created. (example: 2018-01-01T00:01:01) |
credentials | array | An array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service. |
label | string | The label for this Service. This is for display purposes only. (example: prod-1, pattern: [a-zA-Z0-9-_ .]{3,64}) |
notes | string | Any information relevant to the Service that Linode special forces should know when attempting to resolve Issues. (example: The service name is my-cool-application) |
region | string | The Region in which this Service is located. This is required if address is a private IP, and may not be set otherwise. |
service_type | string | How this Service is monitored. (url, tcp) (example: url) |
status | string | Read-only The current status of this Service. (disabled, pending, ok, problem) (example: ok) |
timeout | integer | How long to wait, in seconds, for a response before considering the Service to be down. |
updated | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | serviceId | 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... | |
list | select | Returns 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... | ||
create | insert | label, service_type, address, timeout | 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... | |
update | replace | serviceId | Updates a service monitor's configuration settings. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | |
delete | delete | serviceId | 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... | |
disable | exec | serviceId | 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... | |
enable | exec | serviceId | Enables 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.
| Name | Datatype | Description |
|---|---|---|
serviceId | string | The ID of the Managed Service to enable. |
SELECT examples
- get
- list
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
;
Returns 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...
SELECT
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated
FROM linode.managed.services
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: services
props:
- name: address
value: "{{ address }}"
description: |
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.
- name: body
value: "{{ body }}"
description: |
What to expect to find in the response body for the Service to be considered up.
- name: consultation_group
value: "{{ consultation_group }}"
description: |
The group of ManagedContacts who should be notified or consulted with when an Issue is detected.
- name: credentials
value:
- {{ credentials }}
description: |
An array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service.
- name: label
value: "{{ label }}"
description: |
The label for this Service. This is for display purposes only.
- name: notes
value: "{{ notes }}"
description: |
Any information relevant to the Service that Linode special forces should know when attempting to resolve Issues.
- name: region
value: "{{ region }}"
description: |
The Region in which this Service is located. This is required if address is a private IP, and may not be set otherwise.
- name: service_type
value: "{{ service_type }}"
description: |
How this Service is monitored.
valid_values: ['url', 'tcp']
- name: timeout
value: {{ timeout }}
description: |
How long to wait, in seconds, for a response before considering the Service to be down.
REPLACE examples
- update
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
- delete
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
- disable
- enable
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
;
Enables 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.enable
@serviceId='{{ serviceId }}' --required
;