Roll over alias not working

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Opensearch 2.13

Describe the issue:
what I m missing here?
Why this error?

{
“message”: “Missing rollover_alias index setting [index=producer-server-000001]”
}

  1. created Index producer-server-000001 from logstash agent
 POST /_aliases
{
  "actions": [
    {
      "add": {
        "index": "producer-server-000001",
        "alias": "producer-server"
      }
    }
  ]
}
  1. ISM policy
PUT _plugins/_ism/policies/rollover_policy_for_all_indices
{
  "policy": {
    "policy_id": "rollover_policy_for_all_indices",
    "description": "ISM policy to rollover indices after primary shard reaches 2MB, keep in hot phase for 2 days, warm phase for 1 day, cold phase for 1 day, and delete after 4 days.",
    "schema_version": 1,
    "default_state": "hot",
    "ism_template": [
      {
        "index_patterns": ["*"], 
        "priority": 1
      }
    ],
    "states": [
      {
        "name": "hot",
        "actions": [
          {
            "rollover": {
              "min_primary_shard_size": "2mb"
            }
          }
        ],
        "transitions": [
          {
            "state_name": "warm",
            "conditions": {
              "min_index_age": "2d"
            }
          }
        ]
      },
      {
        "name": "warm",
        "actions": [
          {
            "replica_count": {
              "number_of_replicas": 1
            }
          }
        ],
        "transitions": [
          {
            "state_name": "cold",
            "conditions": {
              "min_index_age": "3d"
            }
          }
        ]
      },
      {
        "name": "cold",
        "actions": [
          {
            "read_only": {}
          }
        ],
        "transitions": [
          {
            "state_name": "delete",
            "conditions": {
              "min_index_age": "4d"
            }
          }
        ]
      },
      {
        "name": "delete",
        "actions": [
          {
            "delete": {}
          }
        ],
        "transitions": []
      }
    ]
  }
}

PUT _index_template/mongodb-shard-template
{
  "index_patterns": ["producer-server*"],
  "template": {
    "settings": {
      "number_of_shards": 2,
      "number_of_replicas": 1,
      "index.plugins.index_state_management.policy_id": "rollover_policy_for_all_indices",
      "index.plugins.index_state_management.rollover_alias": "producer-server"

    }
  },
  "priority": 1
}

Configuration:

alias 
{
  "producer-server-000001": {
    "aliases": {
      "producer-server": {}
    }
  }
}
setting
{
  "producer-server-000001": {
    "settings": {
      "index": {
        "replication": {
          "type": "DOCUMENT"
        },
        "number_of_shards": "2",
        "plugins": {
          "index_state_management": {
            "policy_id": "rollover_policy_for_all_indices"
          }
        },
        "provided_name": "producer-server-000001",
        "creation_date": "1730994599117",
        "number_of_replicas": "1",
        "uuid": "W6O2WBdFRxavlxyS_vU2zQ",
        "version": {
          "created": "136347827"
        }
      }
    }
  }
}

Relevant Logs or Screenshots:

@devuser, Could you look at the solution in this thread and OpenSearch documentation?

I think you should use plugins.index_state_management.rollover_alias instead of index.plugins.index_state_management.rollover_alias

@pablo Can you explain me the solution ?

When I

PUT producer-server-000001
{
  "aliases": {
    "producer-server": {
      "is_write_index": true
    }
  },
  "settings": {
    "index.plugins.index_state_management.rollover_alias": "producer-server"
  }
}

this solves the problem.

is there any issue with my order. What is actually going wrong?

Any opensearch expert please explain?

@devuser Please take a look at the rollover example in the OpenSearch documentation.

According to the documentation, it should be

  "settings": {
    "plugins.index_state_management.rollover_alias": "producer-server"
  }