Skip to main content

sinks

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

Overview

Namesinks
TypeResource
Iddigitalocean.monitoring.sinks

Fields

The following fields are returned by SELECT queries:

The response is a JSON object with a sink key.

NameDatatypeDescription
destinationobject
resourcesarrayList of resources identified by their URNs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
monitoring_get_sinkselectsink_uuidTo get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid}.
monitoring_list_sinksselectresource_idTo list all sinks, send a GET request to /v2/monitoring/sinks.
monitoring_create_sinkinsertTo create a new sink, send a POST request to /v2/monitoring/sinks. Forwards logs from the
resources identified in resources to the specified pre-existing destination.
monitoring_delete_sinkdeletesink_uuidTo delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid}.

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
sink_uuidstringA unique identifier for a sink. (example: 78b172b6-52c3-4a4b-96d5-78d3f1a0b18c)
resource_idstringA unique URN for a resource.

SELECT examples

To get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid}.

SELECT
destination,
resources
FROM digitalocean.monitoring.sinks
WHERE sink_uuid = '{{ sink_uuid }}' -- required;

INSERT examples

To create a new sink, send a POST request to /v2/monitoring/sinks. Forwards logs from the
resources identified in resources to the specified pre-existing destination.

INSERT INTO digitalocean.monitoring.sinks (
data__destination_uuid,
data__resources
)
SELECT
'{{ destination_uuid }}',
'{{ resources }}'
;

DELETE examples

To delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid}.

DELETE FROM digitalocean.monitoring.sinks
WHERE sink_uuid = '{{ sink_uuid }}' --required;