Great Question setup loads templates, mappings, ingest pipelines, dashboards etc...
metricbeat setup -e
Needs to be run once each time you change the version or change the configuration, like add module, add inputs.etc
Say you install metricbeat on a host and enable the system module... You run metricbeat setup -e ...
You can then install metricbeat on as many servers as you like without running setup because all the config is already loaded.
Then you decide to add the MySQL module you need to run setup again once, and then update the configurations / modules or install on your 10 MySQL hosts.
Then you upgrade a version you need to run setup once again.
Basically once per configuration change independent of how many hosts it is installed on.
Then you decide to add the MySQL module you need to run setup again once
Just to check: is this needed for every module? Having run setup on a host with no modules enabled, dashboards for all modules were created in Kibana already.
Then you upgrade a version you need to run setup once again.
I assume the same goes for other Elastic Stack "extras"? Every time we bump the version of Filebeat, Metricbeat, Elastic APM, etc, we should check if there is something like a "setup -e" option that can be run once (per cluster)?
How about major components like Logstash and Kibana? Do they even have a "setup -e" option?
I need to check if our CI/CD pipelines do such a thing.
Needs to be run once each time you change the version or change the configuration, like add module, add inputs.etc
My $0.02:
In my case, Metricbeat runs on ~200 machines.
Unprivileged users have access to these. So an Elasticsearch user with the setup role can't be used.
Therefore, when a machine starts using a module that is not used by other machines, setup must be run on a dedicated machine that unprivileged users do not have access to.
I could indeed install Metricbeat on a dedicated machine, and run setup on it when needed, but that requires me to know when configurations have changed, which is not trivial with at least the configuration management system that I use (Ansible).
I guess I should use Elastic Agent to prevent this.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.