How to set up log rotation
Log storage parameters in VictoriaLogs.
Раздел «Platform administrator»: быстрый переход по подразделам
На этой странице
Where rotation is configured
Rotation parameters are set in the resource VLSingle of the VictoriaLogs component (API group operator.victoriametrics.com).
To configure VLSingle for a specific cluster, open the Management Cluster, then go to the side menu section Administration → Custom Resources. In the operator.victoriametrics.com API group, select the VLSingle resource, then open the VLSingle object in the namespace of the desired cluster.
About migrating CR during an update, see Transitions between versions.
Basic parameters
| Parameter | Description | Example |
|---|---|---|
retentionPeriod | Log storage period. Can take values from 1d (one day) to 100y (one hundred years) | 1d |
retention.maxDiskSpaceUsageBytes | Maximum disk capacity. If the specified volume is exceeded, the “earliest” logs for the past period will be deleted in accordance with the set storage period in retentionPeriod | 10MB |
storage.resources.requests.storage | Disk size for storing logs. When the specified volume is filled, logs stop being written | 3Gi |
Setting example
spec:
retentionPeriod: 1d
extraArgs:
retention.maxDiskSpaceUsageBytes: 10MB
storage:
resources:
requests:
storage: 3Gi