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

[DOCS] Correct watcher event data example #56469

Merged
merged 3 commits into from
May 12, 2020
Merged

[DOCS] Correct watcher event data example #56469

merged 3 commits into from
May 12, 2020

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented May 8, 2020

  • Updates Logstash index patterns. Logstash indices now default to an
    ILM-friendly index pattern.
  • Swaps *.raw fields for *.keyword fields. The Logstash template
    uses keyword fields by default since 6.x.
  • Swaps instances ofctx.payload.hits.total.value with
    ctx.payload.hits.total

Closes #56248

* Updates Logstash index patterns. Logstash indices now default to an
  ILM-friendly index pattern.
* Swaps `*.raw` fields for `*.keyword` fields. The Logstash template
  uses `keyword` fields by default since 6.x.
* Swaps instances of`ctx.payload.hits.total.value` with
  `ctx.payload.hits.total`
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label May 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Monitoring)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 8, 2020
@hub-cap
Copy link
Contributor

hub-cap commented May 12, 2020

@jrodewig its best if someone from @elastic/es-core-features reviews this since im no longer on the team working on watcher.

@jrodewig
Copy link
Contributor Author

@hub-cap Will do. Thanks for the heads up!

@jrodewig jrodewig requested review from jakelandis and removed request for hub-cap May 12, 2020 15:44
@@ -83,8 +83,8 @@ To set up the watch:
"search": {
"request": {
"indices": [
"<logstash-{now-1h}>", <1>
"<logstash-{now}>"
Copy link
Contributor

Choose a reason for hiding this comment

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

With ILM there will be an alias by default named logstash. Rather then trying to query the concrete indices, I think the example should just use a single index logstash and the note below call out that logstash is an alias.

In general we should avoid examples that include both time based (e.g. {now}) and rollover based (e.g. -00001) in favor of the fronting alias. The time stamp on the index when combined with rollover changes meaning such that it is the time when the index was created, not necessarily reflective of the content of that index (the content is dependent on the rollover rules). It is a distinction difficult to describe and the alias should be the preferred access across multiple rolled over indices.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jakelandis. I've updated this and the following snippet to use the logstash index alias with 2c1d2db.

Also added some more context around Logstash ILM defaults in the callout text.

@jrodewig jrodewig requested a review from jakelandis May 12, 2020 16:27
@jrodewig
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/bwc

@jrodewig
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for fixing this !

jrodewig added a commit that referenced this pull request May 12, 2020
* Swaps outdated index patterns for the default `logstash` index alias.
  Adds some related information about Logstash ILM defaults to the callout.

* Swaps `*.raw` fields for `*.keyword` fields. The Logstash template
  uses `keyword` fields by default since 6.x.

* Swaps instances of `ctx.payload.hits.total.value` with
  `ctx.payload.hits.total`
jrodewig added a commit that referenced this pull request May 12, 2020
* Swaps outdated index patterns for the default `logstash` index alias.
  Adds some related information about Logstash ILM defaults to the callout.

* Swaps `*.raw` fields for `*.keyword` fields. The Logstash template
  uses `keyword` fields by default since 6.x.

* Swaps instances of `ctx.payload.hits.total.value` with
  `ctx.payload.hits.total`
jrodewig added a commit that referenced this pull request May 12, 2020
* Swaps outdated index patterns for the default `logstash` index alias.
  Adds some related information about Logstash ILM defaults to the callout.

* Swaps `*.raw` fields for `*.keyword` fields. The Logstash template
  uses `keyword` fields by default since 6.x.

* Swaps instances of `ctx.payload.hits.total.value` with
  `ctx.payload.hits.total`
jrodewig added a commit that referenced this pull request May 12, 2020
* Swaps outdated index patterns for the default `logstash` index alias.
  Adds some related information about Logstash ILM defaults to the callout.

* Swaps `*.raw` fields for `*.keyword` fields. The Logstash template
  uses `keyword` fields by default since 6.x.

* Swaps instances of `ctx.payload.hits.total.value` with
  `ctx.payload.hits.total`
@jrodewig
Copy link
Contributor Author

Backport commits

master 1353d8b
7.x cf76a93
7.8 3661f64
7.7 4b578c3
7.6 9e03d03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: watching-meetup-data.html example has 3 errors preventing example from working
4 participants