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_managed_service
- get_managed_services
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. (example: url) |
status | string | Read-only The current status of this Service. (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_managed_service | select | Returns information about a single Managed Service on your Account. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | ||
get_managed_services | select | Returns a paginated list of Managed Services on your Account. These are the services Linode Managed is monitoring and will report and attempt to resolve issues with. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | ||
post_managed_service | insert | data__label , data__service_type , data__address , data__timeout | Creates a Managed Service. Linode Managed will begin monitoring this service and reporting and attempting to resolve any Issues. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | |
put_managed_service | replace | Updates information about a Managed Service. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | ||
delete_managed_service | delete | Deletes a Managed Service. This service will no longer be monitored by Linode Managed. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | ||
post_disable_managed_service | exec | Temporarily disables monitoring of a Managed Service. This operation can only be accessed by the unrestricted users of an account. Learn more... Learn more... | ||
post_enable_managed_service | exec | Enables monitoring of a Managed Service. 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 |
---|
SELECT
examples
- get_managed_service
- get_managed_services
Returns information about a single Managed Service on your Account.
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;
Returns a paginated list of Managed Services on your Account. These are the services Linode Managed is monitoring and will report and attempt to resolve issues with.
This operation can only be accessed by the unrestricted users of an account.
Learn more...
Learn more...
SELECT
data,
page,
pages,
results
FROM linode.managed.services;
INSERT
examples
- post_managed_service
- Manifest
Creates a Managed Service. Linode Managed will begin monitoring this service and reporting and attempting to resolve any Issues.
This operation can only be accessed by the unrestricted users of an account.
Learn more...
Learn more...
INSERT INTO linode.managed.services (
data__address,
data__body,
data__consultation_group,
data__credentials,
data__label,
data__notes,
data__region,
data__service_type,
data__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: string
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: string
description: >
What to expect to find in the response body for the Service to be considered up.
- name: consultation_group
value: string
description: >
The group of ManagedContacts who should be notified or consulted with when an Issue is detected.
- name: credentials
value: array
description: >
An array of ManagedCredential IDs that should be used when attempting to resolve issues with this Service.
- name: label
value: string
description: >
The label for this Service. This is for display purposes only.
- name: notes
value: string
description: >
Any information relevant to the Service that Linode special forces should know when attempting to resolve Issues.
- name: region
value: string
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: string
description: >
How this Service is monitored.
valid_values: ['url', 'tcp']
- name: timeout
value: integer
description: >
How long to wait, in seconds, for a response before considering the Service to be down.
REPLACE
examples
- put_managed_service
Updates information about a Managed Service.
This operation can only be accessed by the unrestricted users of an account.
Learn more...
Learn more...
REPLACE linode.managed.services
SET
data__address = '{{ address }}',
data__body = '{{ body }}',
data__consultation_group = '{{ consultation_group }}',
data__credentials = '{{ credentials }}',
data__label = '{{ label }}',
data__notes = '{{ notes }}',
data__region = '{{ region }}',
data__service_type = '{{ service_type }}',
data__timeout = {{ timeout }}
WHERE
RETURNING
id,
address,
body,
consultation_group,
created,
credentials,
label,
notes,
region,
service_type,
status,
timeout,
updated;
DELETE
examples
- delete_managed_service
Deletes a Managed Service. This service will no longer be 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;
Lifecycle Methods
- post_disable_managed_service
- post_enable_managed_service
Temporarily disables monitoring of a Managed Service.
This operation can only be accessed by the unrestricted users of an account.
Learn more...
Learn more...
EXEC linode.managed.services.post_disable_managed_service
;
Enables monitoring of a Managed Service.
This operation can only be accessed by the unrestricted users of an account.
Learn more...
Learn more...
EXEC linode.managed.services.post_enable_managed_service
;