How to stop Ml Daily Maintenance Service in elasticsearch (SLM retention snapshot cleanup task)

The ML daily maintenance task only touches indices named .ml-anomalies* and .ml-state*. Are you storing your own data in indices with names that match these patterns? If you are then please switch to using other indices, as these patterns are reserved for the Elastic ML plugin.

The ML daily maintenance is running extremely quickly, which makes me wonder if you are not using ML at all. Is that correct? If you are not using ML at all you can disable it by putting xpack.ml.enabled: false in your elasticsearch.yml. Please be aware that after doing this none of the ML APIs will work. Disabling the ML plugin and restarting the cluster will stop the ML daily maintenance task from running. But then, assuming your indices are not named .ml*, I think you will find that it wasn't the ML daily maintenance that was deleting your indices after all.