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

add collection data stream and ilm policy #118

Merged
merged 7 commits into from
Dec 14, 2020

Conversation

nnamdifrankie
Copy link
Contributor

@nnamdifrankie nnamdifrankie commented Dec 9, 2020

This PR adds the new data stream that will be used for diagnostic alerts.

It contains:

  • The hidden field which will make the diagnostic data stream hidden
  • A custom ilm_policy which will be aggressive

These fields are now supported in the package-spec:
elastic/package-spec#91
elastic/package-spec#90

And released via the package-registry:
https://github.com/elastic/package-registry/releases/tag/v0.15.0

It's been tested locally via new changes in Fleet package installation.
elastic/kibana#85492
elastic/kibana#85703

@@ -0,0 +1,15 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this should be deleted

}
}
}
}
Copy link

@tsg tsg Dec 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a delete phase, otherwise the indices will be rolled over but not actually deleted. In my testing, I did something like this:

PUT /_ilm/policy/endpoint.diagnostic.collection
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_size": "1gb",
            "max_age": "7d",
            "max_docs": 10000
          }
        }
      },
      "delete": {
        "min_age": "10m",
        "actions": {
           "delete": {
            }
        }
      }
    }
  }
}

That should mean that the rolled-over index is deleted 10m after it's rotated. Comparing to your version, I also have a limitation of max_docs. Not sure we need it, but maybe good for testing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @tsg I updated the policy

Copy link
Collaborator

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to check, if for some reason the kibana side changes don't get merged before feature freeze can we still release these changes? Or are we hoping to merge the kibana changes and this PR at the same time?

@@ -0,0 +1,28 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to double check that this is the intent but this mapping is pretty reduced. The only fields that will be searchable within ES are @timestamp, data_stream, ecs.version, and the event.* fields. Is that what we want?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathan-buttner this is the desired functionality.

This will be read by a telemetry server and it will search by event.ingested. We don't need to index any other fields as we'll only need to search for the latest docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@kevinlog
Copy link
Contributor

@jonathan-buttner

Just want to check, if for some reason the kibana side changes don't get merged before feature freeze can we still release these changes? Or are we hoping to merge the kibana changes and this PR at the same time?

The Kibana side changes are ready, the PRs are up.
elastic/kibana#85703
elastic/kibana#85492

I've tested everything together locally. My plan is to merge the Fleet changes as soon as I get approval and then I'll merge this

@kevinlog kevinlog merged commit f29b618 into master Dec 14, 2020
@kevinlog kevinlog deleted the add-new-collection-data-stream branch December 14, 2020 21:23
AaronLamb1 pushed a commit that referenced this pull request Jan 12, 2021
Co-authored-by: Kevin Logan <klogan@endgame.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants