[slm] Snapshots are just ignored when scheduled, but manual _execute works

I have a got a S3 repository and a slm policy. I can execute this policy manually : Snapshot is created, last success of this manual execution appears well, no failures. So I set up the scheduled cron :

After the cron time, nothing happens. No failures. (Even in ES logs) Nothing.
But I can again _execute the policy to create the snapshot.

It is not about UTC hour issue or something like that because I waited enough to be sure the CRON are just ignored.

It seems to be the same case than Snapshots not running as scheduled

For the record, I use the version 8.5.2 of elasticsearch, and my policy is this one :

nightly-snapshots :

  "policy": {
	"name": "<es-nightly-snap-{now/d}>",
	"schedule": "0 30 1 * * ?",
	"repository": "es-snapshots",
	"config": {
		"indices": [
			"*"
		],
		"feature_states": [],
		"ignore_unavailable": false,
		"include_global_state": true
	},
	"retention": {
		"expire_after": "10d",
		"min_count": 3,
		"max_count": 10
	}
}

The slm never triggers so I had to setup a crontab -e :
30 1 * * * curl --silent -X POST http://localhost:9200/_slm/policy/nightly-snapshots/_execute &>/dev/null
And so the execution works with this one.

I'd really appreciate any help :slight_smile:

exact same problem for us on an elastic/kibana 7.15.8 cluster
cron jobs are not fired; snapshots are never created nor shown as failed, nothing in logs.

Manual execution of the policies works

GET _slm/policy/hourly-snapshots
{
  "hourly-snapshots" : {
    "version" : 4,
    "modified_date_millis" : 1672400363794,
    "policy" : {
      "name" : "<hourly-snapshot-{now/H}>",
      "schedule" : "0 0 * * * ?",
      "repository" : "snaps-ELK-POC",
      "config" : {
        "ignore_unavailable" : true,
        "partial" : true
      },
      "retention" : {
        "expire_after" : "2d",
        "max_count" : 48
      }
    },
    "next_execution_millis" : 1672404000000,
    "stats" : {
      "policy" : "hourly-snapshots",
      "snapshots_taken" : 0,
      "snapshots_failed" : 0,
      "snapshots_deleted" : 0,
      "snapshot_deletion_failures" : 0
    }
  }
}
1 Like

this helped me : kibana - Elasticsearch : Snapshots not executed automatically (cron schedule issue) - Stack Overflow

POST _slm/stop
POST _slm/start
2 Likes

I spent hours on this, thank you so much.

Your solution worked for us ( GET /_slm/status was returning STOPPED ...)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.