purgelogs
Purge flow execution logs and trigger-related logs.
Purge flow execution logs and trigger-related logs.
Purge flow execution logs and trigger-related logs.
This task can be used to purge flow execution and trigger logs for all flows, for a specific namespace, or for a specific flow.
type: "io.kestra.plugin.core.log.purgelogs"Examples
Purge all logs that has been created more than one month ago.
id: "purgelogs"
type: "io.kestra.plugin.core.log.purgelogs"
endDate: "{{ now() | dateAdd(-1, 'MONTHS') }}"Purge all logs that has been created more than one month ago, but keep error logs.
id: "purgelogs"
type: "io.kestra.plugin.core.log.purgelogs"
endDate: "{{ now() | dateAdd(-1, 'MONTHS') }}"
logLevels:
- TRACE
- DEBUG
- INFO
- WARNProperties
endDate*Requiredstring
The maximum date to be purged
All logs before this date will be purged.
executionIdstring
The Execution ID of the logs to be purged
flowIdstring
The flow ID of the logs to be purged
You need to provide the namespace property if you want to purge flow logs.
logLevelsarray
ERRORWARNINFODEBUGTRACEThe levels of the logs to be purged
If not set, log for all levels will be purged.
namespacestring
Namespace of logs that need to be purged
If flowId isn't provided, this is a namespace prefix, else the namespace of the flow.
startDatestring
The minimum date to be purged
All logs after this date will be purged.
Outputs
countinteger
0The count of deleted logs