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

[Rule Registry] Default index settings and ILM policy for all indices #111152

Closed
Tracked by #101016
banderror opened this issue Sep 3, 2021 · 8 comments
Closed
Tracked by #101016
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@banderror
Copy link
Contributor

Parent ticket: #101016

Summary

We never really talked about which index settings and ILM policy would be best for all RAC indices by default. What we have in the code is more like a draft and an issue was found with the default policy: #111029

export const defaultLifecyclePolicy = {
policy: {
phases: {
hot: {
actions: {
rollover: {
max_age: '90d',
max_size: '50gb',
},
},
},
delete: {
actions: {
delete: {},
},
},
},
},
};

Index settings are minimalistic and defined in the technical component template:

Ideas for the policy

We could use the .siem-signals policy as a base because it was in production for some time:

{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "50gb",
            "max_age": "30d"
          }
        }
      }
    }
  }
}

30d and 50gb are the recommended defaults, and max_size is deprecated in favour of max_primary_shard_size:

So it could be

{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_primary_shard_size": "50gb",
            "max_age": "30d"
          }
        }
      }
    }
  }
}

Some default policies also include a _meta object with managed: true and a description.

Any other settings that would make sense? Data tiers, priorities, etc?

Ideas for the settings

I was thinking about something like that:

  settings: {
    number_of_shards: 1,
    auto_expand_replicas: '0-1',
    'mapping.total_fields.limit': 10000,
    'sort.field': '@timestamp',
    'sort.order': 'desc',
  },
  • auto_expand_replicas: '0-1' can be useful in simple 1-node setups (otherwise indices won’t be healthy); it’s used in event_log plugin for example
  • ‘mapping.total_fields.limit’: 10000 is used in Security Solution for .siem-signals indices
  • default sorting could be probably useful to make all queries faster
@banderror banderror added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: rac label obsolete labels Sep 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@banderror
Copy link
Contributor Author

cc @weltenwort

@weltenwort
Copy link
Member

ℹ️ I'm implementing the removal of the delete phase as a fix for 7.15.0 in #111139. I also align the rollover action thresholds with the default you mentioned above.

@banderror
Copy link
Contributor Author

Hey everyone, I removed this ticket from the backlog of the Detection Rules area.

We (@elastic/security-detections-response-rules) are not the owners anymore (however feel free to still ping us if you have any tech questions about the ticket). Ownership of this ticket and other tickets related to rule_registry (like #101016) now goes to the Detection Alerts area (Team:Detection Alerts label). Please ping @peluja1012 and @marshallmain if you have any questions.

@marshallmain
Copy link
Contributor

Transferring again to @elastic/response-ops as they now own the rule registry implementation.

@marshallmain marshallmain removed Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Alerts Security Detection Alerts Area Team labels Feb 1, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label Feb 1, 2022
@kobelb kobelb added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Feb 1, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Feb 1, 2022
@kobelb kobelb changed the title [RAC][Rule Registry] Default index settings and ILM policy for all indices [Rule Registry] Default index settings and ILM policy for all indices Feb 1, 2022
@mikecote
Copy link
Contributor

Linking with #141146 for researching.

@ymao1
Copy link
Contributor

ymao1 commented Dec 8, 2022

Closing as default index settings and ILM policy already exists for RAC indices.

@ymao1 ymao1 closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

8 participants