
Alibaba Cloud Trigger
CertifiedTrigger on new logs in Alibaba Cloud Simple Log Service (SLS)
Alibaba Cloud Trigger
Trigger on new logs in Alibaba Cloud Simple Log Service (SLS)
Consumes new SLS log groups using shard cursors persisted in namespace KV. Late-arriving logs are consumed by ingestion position, independently of their event timestamps.
type: io.kestra.plugin.alibaba.sls.TriggerExamples
React to error logs in SLS
id: sls_on_errors
namespace: company.team
triggers:
- id: on_errors
type: io.kestra.plugin.alibaba.sls.Trigger
accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
region: cn-hangzhou
project: ops-logs
logstore: app-events
query: "* | where level == 'ERROR'"
fetchType: STORE
interval: PT1M
tasks:
- id: alert
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.count }} error logs received"
Properties
accessKeyId *string
The AccessKey ID
accessKeySecret *string
The AccessKey Secret
logstore *string
Logstore
The SLS Logstore name.
project *string
Project
The SLS project name.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
endpointOverride string
Endpoint override
fetchType string
FETCHSTOREFETCHFETCH_ONENONEResult handling mode
FETCH or STORE; defaults to FETCH. FETCH accumulates the complete matching backlog in memory and execution variables. Use STORE for high-volume logstores, long lookback windows, or catch-up after downtime; STORE writes results incrementally to internal storage.
interval string
PT1MdurationPolling interval
Interval between query runs; defaults to 60 seconds.
lookback string
PT5MInitial lookback duration
Lookback duration when no prior cursor exists in the KV store; defaults to 5 minutes.
query string
Query
SPL consumption filter, such as * | where level == 'ERROR'. Defaults to empty. Index search syntax and SQL analysis are not supported.
region string
Region
Region used to derive the endpoint when endpointOverride is absent.
securityToken string
Security Token
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
topic string
Topic
Topic filter.
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
count integer
Total number of log records returned
log object
First fetched log item as a key-value map
Only populated if fetchType is FETCH_ONE
logs array
Fetched logs as a list of key-value maps
Only populated if fetchType is FETCH
uri string
uriURI of the stored results in internal storage
Only populated if fetchType is STORE