Skip to main content

event_logs

Creates, updates, deletes, gets or lists an event_logs resource.

Overview

Nameevent_logs
TypeResource
Iddigitalocean.apps.event_logs

Fields

The following fields are returned by SELECT queries:

A JSON object with urls that point to archived logs

NameDatatypeDescription
historic_urlsarray (title: A list of URLs to archived log files)
live_urlstringA URL of the real-time live logs. This URL may use either the https:// or wss:// protocols and will keep pushing live logs as they become available. (example: ws://logs/build)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
apps_get_event_logsselectapp_id, event_id, typefollow, pod_connection_timeoutRetrieve the logs of an autoscaling event for an app.

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
app_idstringThe app ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)
event_idstringThe event ID (example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf)
typestringThe type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) (example: BUILD)
followbooleanWhether the logs should follow live updates. (example: true)
pod_connection_timeoutstringAn optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. (example: 3m)

SELECT examples

Retrieve the logs of an autoscaling event for an app.

SELECT
historic_urls,
live_url
FROM digitalocean.apps.event_logs
WHERE app_id = '{{ app_id }}' -- required
AND event_id = '{{ event_id }}' -- required
AND type = '{{ type }}' -- required
AND follow = '{{ follow }}'
AND pod_connection_timeout = '{{ pod_connection_timeout }}'
;