Grepping unneded lines from file
grep -Ev '^[ ]*($|#)' /etc/filebeat/filebeat.yml