Hello Francesc,
What is the command you use to set the replicas to 0? Ensure you add the auto_expand_replicas: false to ensure it does not happen again.
PUT .opendistro-alerting-*/_settings { "index":{ "number_of_replicas":0, "auto_expand_replicas":false } }
Additionally, three categories of settings exist in the cluster settings API: persistent, transient, and default. Persistent settings will persist after a cluster restart. After a restart, OpenSearch clears transient settings.
If you specify the same setting in multiple places, OpenSearch uses the following precedence:
PUT /_cluster/settings { "persistent" : { "opendistro" : { "index_state_management" : { "history" : { "number_of_replicas" : "0" } } } } }