Skip to content

Automatically install monitoring templates at plugin initialization#78350

Merged
jbaiera merged 20 commits intoelastic:masterfrom
jbaiera:monitoring-autoinstall-templates
Oct 5, 2021
Merged

Automatically install monitoring templates at plugin initialization#78350
jbaiera merged 20 commits intoelastic:masterfrom
jbaiera:monitoring-autoinstall-templates

Conversation

@jbaiera
Copy link
Copy Markdown
Member

@jbaiera jbaiera commented Sep 27, 2021

This PR adds a MonitoringIndexTemplateRegistry to the monitoring plugin which automatically installs all monitoring templates locally when the plugin is initialized. Exporters have been updated to no longer attempt installation of the monitoring templates, and instead will wait for the templates to become available before setting themselves as started. Some older functionality related to templates has been removed as well, such as the expectation that version 6 monitoring templates are installed, as well as the setting that controls their installation (xpack.monitoring.exporters.<EXPORTER>.index.template.create_legacy_templates).

This allows it to better replace the MonitoringTemplateUtils class.
…sing.

Update template name uses away from MonitoringTemplateUtils.
Only install templates if there is a template source given (for now)
Only target .monitoring indices when asserting index count, since readying the local exporter will create a watcher index that trips up the test.
No longer assumes that templates will be installed by the exporter.
No longer assumes that templates will be installed by the exporter. Added some additional trace logging lines to aid in debugging these tests.
@jbaiera jbaiera requested a review from danhermann September 27, 2021 21:15
@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 27, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Copy Markdown
Contributor

@danhermann danhermann left a comment

Choose a reason for hiding this comment

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

LGTM

@jbaiera
Copy link
Copy Markdown
Member Author

jbaiera commented Oct 4, 2021

@elasticmachine update branch

@jbaiera jbaiera merged commit aa3d510 into elastic:master Oct 5, 2021
@jbaiera jbaiera deleted the monitoring-autoinstall-templates branch October 5, 2021 18:05
@jbaiera
Copy link
Copy Markdown
Member Author

jbaiera commented Oct 6, 2021

Changing to the deprecation label since we have re-added the removed setting in 8.0 to allow for a longer deprecation cycle. The setting will not break 8.0 nodes on start up, but it will not have any functionality tied to it.

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.

4 participants