In metricbeat I am trying to use env variable to seperate out log file
this is how I understood from few post here that I read.
created /etc/metricbeat/env file and added
then edited /lib/systemd/system/metricbeat.service file and added
run systemctl daemon-reload
restarted metricbeat and I have logfile metricbeat_myelkhost1
problem here is that everytime when I update metricbeat I will have to change /lib/systemd/system/metricbeat.service file in order to make this work.
is there any other option?
second problem is that in env file it works only if I hard code name.
I can't use any
hostname -s or any linux command.
how do I manage this with 100s of system?