Hi friends
I would like to remove the delete phases of every apm ilm policy or at the very least set it to delete in 3 years. Right now we can't seem to get it working at all.
Aside: Can i apply the setting globally across all of APM's created lifecycle policies. If not is there some list of policies somwhere?
Here is my current attempt.
apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-server-prod
namespace: elastic-system
spec:
version: 8.7.1
count: 1
elasticsearchRef:
name: "elasticsearch-prod"
kibanaRef:
name: "kibana-prod"
http:
service:
spec:
type: NodePort
podTemplate:
spec:
containers:
- name: apm-server
config:
http.enabled: true
http.port: 5068
monitoring.enabled: false
setup.template.settings:
index:
routing.allocation.require.type: "monitoring"
anonymous:
rate_limit:
event_limit: 300
ip_limit: 1000
allow_service: ["admin-dashboard", "frontend"]
apm-server.rum.enabled: true
apm-server.rum.allow_origins: ["*"]
apm-server:
template.settings:
index:
routing.allocation.require.type: "monitoring"
ilm:
enabled: "auto"
setup:
enabled: true
overwrite: true
require_policy: true
policies:
- name: "traces-apm.rum_traces-default_policy"
policy:
phases:
hot:
actions:
rollover:
max_size: "50gb"
max_age: "30d"
set_priority:
priority: 100
delete:
min_age: "1095d"
actions:
delete: {}
GET _ilm/policy/traces-apm.rum_traces-default_policy
But you can see nothing has changed.
{
"traces-apm.rum_traces-default_policy": {
"version": 1,
"modified_date": "2023-06-05T14:19:02.806Z",
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "50gb",
"max_age": "30d"
},
"set_priority": {
"priority": 100
}
}
},
"delete": {
"min_age": "90d",
"actions": {
"delete": {
"delete_searchable_snapshot": true
}
}
}
},
"_meta": {
"package": {
"name": "apm"
},
"managed_by": "fleet",
"managed": true
}
},
"in_use_by": {
"indices": [],
"data_streams": [],
"composable_templates": [
"traces-apm.rum"
]
}
}
}