Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Rollover alias should not be required to attach a policy to a data stream #427

Closed
phestecAMZN opened this issue Dec 2, 2022 · 0 comments · Fixed by #429
Closed
Labels
bug Something isn't working

Comments

@phestecAMZN
Copy link
Contributor

What is the bug?
Documentation indicates that when attaching a policy containing a rollover to a data stream, you do not need to provide a rollover alias. Currently, not providing one creates a validation error and prevents the policy from being attached.

**How can one reproduce the bug?**r
Steps to reproduce the behavior:

Step 1:
Create data stream with the example named 'logs-example'

PUT _index_template/logs-template
{
"index_patterns": [
"my-data-stream",
"logs-*"
],
"data_stream": {},
"priority": 100
}
POST logs-example/_doc
{
"message": "login attempt failed",
"@timestamp": "2013-03-01T00:00:00"
}

Step 2:
Create ISM policy

PUT _plugins/_ism/policies/policy_1
{
"policy": {
"description": "ingesting logs",
"default_state": "ingest",
"states": [
{
"name": "ingest",
"actions": [
{
"rollover": {
"min_doc_count": 2
}
}
],
"transitions": [
{
"state_name": "search"
}
]
},
{
"name": "search",
"actions": [],
"transitions": [
{
"state_name": "delete",
"conditions": {
"min_index_age": "5m"
}
}
]
},
{
"name": "delete",
"actions": [
{
"delete": {}
}
],
"transitions": []
}
],
"ism_template": {
"index_patterns": ["logs-*"],
"priority": 100
}
}
}
Step 3:
Use the interface to attach the policy 'policy_1' to 'logs-example' you will be prompted to enter a 'Rollover alias'. It will not let you attach using the interface if you don't enter a 'Rollover alias' which in this case it should be optional.

What is the expected behavior?
Should be able to attach policy with or without a rollover alias

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
Screen Shot 2022-12-02 at 1 10 20 PM

Do you have any additional context?
Add any other context about the problem.

@phestecAMZN phestecAMZN added bug Something isn't working untriaged labels Dec 2, 2022
@phestecAMZN phestecAMZN changed the title [BUG] [BUG] Rollover alias should not be required to attach a policy to a data stream Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant