curl -XPUT -k -u elastic:$pass https://localhost:9200/_index_template/replicas -d '{"index_patterns": ["*"], "template": {"settings": {"number_of_replicas": "0"}}}' -H 'Content-Type: application/json'
Gives the following error, maybe I need to change priority to something higher
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"index template [replicas] has index patterns [*] matching patterns from existing templates [.kibana-event-log-8.1.0-template,.kibana_security_session_index_template_1,.monitoring-beats-mb,.monitoring-ent-search-mb,.monitoring-es-mb,.monitoring-kibana-mb,.monitoring-logstash-mb] with patterns (.kibana-event-log-8.1.0-template => [.kibana-event-log-8.1.0-*],.kibana_security_session_index_template_1 => [.kibana_security_session_1],.monitoring-beats-mb => [.monitoring-beats-8-*],.monitoring-ent-search-mb => [.monitoring-ent-search-8-*],.monitoring-es-mb => [.monitoring-es-8-*],.monitoring-kibana-mb => [.monitoring-kibana-8-*],.monitoring-logstash-mb => [.monitoring-logstash-8-*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"}],"type":"illegal_argument_exception","reason":"index template [replicas] has index patterns [*] matching patterns from existing templates [.kibana-event-log-8.1.0-template,.kibana_security_session_index_template_1,.monitoring-beats-mb,.monitoring-ent-search-mb,.monitoring-es-mb,.monitoring-kibana-mb,.monitoring-logstash-mb] with patterns (.kibana-event-log-8.1.0-template => [.kibana-event-log-8.1.0-*],.kibana_security_session_index_template_1 => [.kibana_security_session_1],.monitoring-beats-mb => [.monitoring-beats-8-*],.monitoring-ent-search-mb => [.monitoring-ent-search-8-*],.monitoring-es-mb => [.monitoring-es-8-*],.monitoring-kibana-mb => [.monitoring-kibana-8-*],.monitoring-logstash-mb => [.monitoring-logstash-8-*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"},"status":400}
I can change the existing settings with this command, but when 8.2.0 comes out I have a feeling the new indexes and or streams will have the default replica of 1
curl -XPUT -k -u elastic:$pass https://localhost:9200/*/_settings?pretty -H 'Content-Type: application/json' -d '{"settings": {"number_of_replicas": 0}}'
{
"acknowledged" : true
}