Updating the Beats agents properly issue

Hello,

I have a 3 nodes cluster. Some days ago it was time for the ELK cluster update.

During the process i run the sudo yum update command in each node in order to retrieve the newest versions for ELK.

In the proposed updated packages there were also the packages that include the newest versions of the Beats agents that i have in my nodes such as metricbeat, filebeat etc.

After the update of the Beats agents i noticed that also the config files of the agents were changed. For example the metricbeat.yml, filebeat.yaml etc.
That caused me problem because i had to go to those yaml files and configure them again properly.

So to sum up, my question is whats the proper way of updating those Beats agents that i have in my nodes so that their config files dont get messed up every time that i update my cluster.

Thank you.