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

index patterns, for example metricbeat-* do not always get created when running setup #18426

Closed
DanRoscigno opened this issue May 11, 2020 · 15 comments
Labels
Team:Integrations Label for the Integrations team

Comments

@DanRoscigno
Copy link
Contributor

  • 7.6.2
  • Debian Linux to ESS

Sometimes the index pattern is created via setup, and sometimes it is not. @ycombinator suggested running setup with --dashboards, which seems to be a default. In very limited testing adding --dashboards seems to get the index pattern created.

I used Metricbeat in the example, but Filebeat is the same.

cc: @EthanStrider

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 11, 2020
@DanRoscigno DanRoscigno added the Team:Integrations Label for the Integrations team label May 11, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 11, 2020
@andresrc andresrc added good first issue Indicates a good issue for first-time contributors docs labels May 25, 2020
@andresrc
Copy link
Contributor

This is currently the intended behaviour, so we will document it.

@DanRoscigno
Copy link
Contributor Author

I am probably misunderstanding. What is the intended behavior?

@DanRoscigno
Copy link
Contributor Author

@andresrc , can you please give me some more information. Are you saying that the intended behavior is that the dashboards will be created by default, but to get the index patterns we have to specify --dashboards? If so, could --dashboards be changed to --index-pattern?

@kvch
Copy link
Contributor

kvch commented Jun 11, 2020

@DanRoscigno The intended behaviour is that index patterns are loaded with dashboards. That is what we wanted to document as an intended behaviour. In the long run, we would like to get rid of the subcommand setup, so we rather not put much effort into maintaining it.

Also, after searching a bit, I have found an undocumented setting for setup: only_index which lets you load only index patterns without loading dashboards: #7285

You can set it under setup.dashboards section of the configuration:

setup.dashboards.only_index: true

@DanRoscigno
Copy link
Contributor Author

@DanRoscigno The intended behaviour is that index patterns are loaded with dashboards. That is what we wanted to document as an intended behaviour.

Thanks for the info @kvch . The reason I opened the issue is that when the dashboards are loaded the index patterns do not always get created. Sometimes they do, and sometimes they do not. The dashboards always get loaded when setup is run with the default beatname.yml file. setup.dashboards.only_index does not help, as users want dashboards and index patterns.

Since loading the dashboards when running setup is the default, and creating the index pattern is supposed to happen when the dashboards get loaded, the index pattern should be created also.

@EamonnTP
Copy link

Hi @kvch @DanRoscigno Would recommending that a user should include the setup.dashboards.only_index: true and setup.dashboards.enabled: true settings in the config file, help clarify this issue? I can make the necessary doc updates and add you both as reviewers.

@DanRoscigno
Copy link
Contributor Author

Thanks @EamonnTP . I don't think "fixing the bug in the docs" is a good habit. If we can modify the default .yml file without a side effect of causing setup to run every time the Beat is run, then I would be good with fixing it in the docs and config files instead of in the code.

BUT

Have you tested combining those two settings? From their names they should be mutually exclusive.

@kvch
Copy link
Contributor

kvch commented Jun 30, 2020

@DanRoscigno You are right. It is indeed not a good habit to fix the bug in the docs. However, we are retiring the setup subcommand of Beats in favour of Elastic Integrations. In that solution, dashboards, templates, etc. are installed by Kibana, not Beats. At the moment we are focusing on creating better integrations, rather than trying to fix a feature which is going to be discontinued. :)

@EamonnTP
Copy link

@DanRoscigno Confirmed with @kvch that it's unfortunate both setting names sound mutually exclusive, however, both can be used in the config file.

@DanRoscigno
Copy link
Contributor Author

Cool, I am glad to review the PR and update the best practices. Thanks.

@EamonnTP EamonnTP self-assigned this Jun 30, 2020
@dedemorton
Copy link
Contributor

@EamonnTP When you work on this issue, please check the troubleshooting topic about this problem to see if it can be improved, too: https://www.elastic.co/guide/en/beats/metricbeat/current/could-not-locate-index-pattern.html

@EamonnTP
Copy link

Hi @kvch @DanRoscigno I need a little guidance with this. I enabled both settings setup.dashboards.enabled: true
setup.dashboards.only_index: true in the metricbeat.yml, but it returns an error Error importing Kibana dashboards: fail to import the dashboards in Kibana.

@kvch kvch removed docs good first issue Indicates a good issue for first-time contributors labels Jan 6, 2021
@kvch kvch assigned kvch and unassigned EamonnTP Jan 6, 2021
@kvch
Copy link
Contributor

kvch commented Feb 15, 2021

@DanRoscigno I know it has been a while since you opened this issue. But is there any chance you could share what privileges the user you used to setup has, what modules did you enabled, etc.? I have spent the last few hours trying to reproduce the issue with multiple versions of Beats, Elasticsearch and Kibana. Even if I enabled all modules or none of them, the index template was loaded successfully.

Or if someone else is facing this issue, I would like to know about every little detail there is, because so far I cannot reproduce the problem.

@DanRoscigno
Copy link
Contributor Author

I don't remember @kvch , way too long ago and I was told it was the intended behavior.

@kvch kvch removed their assignment Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

6 participants