Any downside to overwrite: true?

I am getting started with APM for the first time. I am running an APM server container with my application containers. They push data through logstash to S3 and do not have a direct connection to elasticsearch. I am running setup like this periodically via a CI runner:

setup \
      -E output.logstash.enabled=false \
      -E output.elasticsearch.enabled=true \
      -E "output.elasticsearch.hosts=['$ELASTICSEARCH_URL']" \
      -E apm-server.rum.kibana.enabled=true \
      -E apm-server.rum.kibana.host="$KIBANA_URL"

I noticed overwrite defaults to false. What is the harm in setting it true?

Hi @thenewguy,
the *.enabled settings defaulting to true and *.overwrite settings defaulting to false ensures that non-existing setup steps are run for the setup command or when the server is started. The generated index templates and indices contain the APM Server version, so that new features are taken into account on version upgrades when generating new templates, etc. By default running the same setup command twice will lead to the same setup, therefore disabling overwrite by default avoids unnecessary overwrites on restart, or when having multiple instances of the same version running. There is no harm though in setting overwrite to true if you are not managing any of the templates, ILM policies etc. outside the APM Server.

Looking at your config, you are nesting the kibana part under rum, while it should be configured as apm-server.kibana.enabled and apm-server.kibana.host. Please be aware that the kibana configuration is not needed for the setup (there is no Kibana dashboards or index patterns loaded in APM Server >= 7.0). It is used for the APM agents to fetch agent remote configuration from Kibana through the server.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.