Elasticsearch SLM error

Hi,
I have Elasticsearch 7.7.1 and i want to configure SLM policy with cron schedule that triggers multiple times.

In terminal

curl -X PUT "localhost:9200/_slm/policy/nightly-snapshots?pretty" -H 'Content-Type: application/json' -d'
{
  "trigger" : {
    "schedule" : {
      "cron" : [
        "0 0 13 * * ?",
        "0 0 23 * * ?"
      ]
    }
  }
  "name": "<nightly-snap-{now/d}>", 
  "repository": "myrepo", 
  "config": { 
    "indices": ["*"] 
  },
  "retention": { 
    "expire_after": "30d", 
    "min_count": 5, 
    "max_count": 50 
  }
}
'

Error output

"error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[10:3] [snapshot_lifecycle] failed to parse object"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[10:3] [snapshot_lifecycle] failed to parse object",
    "caused_by" : {
      "type" : "json_parse_exception",
      "reason" : "Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (org.elasticsearch.transport.netty4.ByteBufStreamInput); line: 11, column: 4]"
    }
  },
  "status" : 400

What am I doing wrong? Thank You.

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