Can I ask you to elaborate on manually indexing data streams?
Replicas are just copies of shards so if they are discarded it doesn't matter (in a single node cluster)
This command goes through the existing indices and changes them to green
curl -XPUT -k -u elastic:$pass https://localhost:9200/*/_settings?pretty -H 'Content-Type: application/json' -d '{"settings": {"number_of_replicas": 0}}'
Today I created a template with a high priority that stuck
curl -XGET -k -u elastic:$pass https://localhost:9200/_index_template/default?pretty
{
"index_templates" : [
{
"name" : "default",
"index_template" : {
"index_patterns" : [
"*"
],
"template" : {
"settings" : {
"index" : {
"number_of_replicas" : "0"
}
}
},
"composed_of" : [ ],
"priority" : 90000000,
"_meta" : {
"description" : "this used to be easy"
},
"data_stream" : {
"hidden" : false,
"allow_custom_routing" : false
}
}
}
]
}
It seems I can't delete it anymore as it's in use now heh
curl -XDELETE -k -u elastic:$pass https://localhost:9200/_index_template/default?pretty
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "unable to remove composable templates [default] as they are in use by a data streams [.monitoring-es-8-mb, logs-elastic_agent-default, logs-elastic_agent.filebeat-default, logs-elastic_agent.fleet_server-default, logs-elastic_agent.metricbeat-default, logs-system.application-default, logs-system.auth-default, logs-system.security-default, logs-system.syslog-default, logs-system.system-default, metricbeat-8.1.0, metricbeat-8.1.1, metrics-elastic_agent.elastic_agent-default, metrics-elastic_agent.filebeat-default, metrics-elastic_agent.fleet_server-default, metrics-elastic_agent.metricbeat-default, metrics-system.cpu-default, metrics-system.diskio-default, metrics-system.filesystem-default, metrics-system.fsstat-default, metrics-system.load-default, metrics-system.memory-default, metrics-system.network-default, metrics-system.process-default, metrics-system.process.summary-default, metrics-system.socket_summary-default, metrics-system.uptime-default]"
}
],
"type" : "illegal_argument_exception",
"reason" : "unable to remove composable templates [default] as they are in use by a data streams [.monitoring-es-8-mb, logs-elastic_agent-default, logs-elastic_agent.filebeat-default, logs-elastic_agent.fleet_server-default, logs-elastic_agent.metricbeat-default, logs-system.application-default, logs-system.auth-default, logs-system.security-default, logs-system.syslog-default, logs-system.system-default, metricbeat-8.1.0, metricbeat-8.1.1, metrics-elastic_agent.elastic_agent-default, metrics-elastic_agent.filebeat-default, metrics-elastic_agent.fleet_server-default, metrics-elastic_agent.metricbeat-default, metrics-system.cpu-default, metrics-system.diskio-default, metrics-system.filesystem-default, metrics-system.fsstat-default, metrics-system.load-default, metrics-system.memory-default, metrics-system.network-default, metrics-system.process-default, metrics-system.process.summary-default, metrics-system.socket_summary-default, metrics-system.uptime-default]"
},
"status" : 400
}
It looks promising but I need to find out how to actually delete it
that's for another day...
(Index Template cannot be deleted / error message seems incorrect · Issue #84171 · elastic/elasticsearch · GitHub)