Generating filebeat custom fields
问题 I have an elasticsearch cluster (ELK) and some nodes sending logs to the logstash using filebeat. All the servers in my environment are CentOS 6.5. The filebeat.yml file in each server is enforced by a Puppet module (both my production and test servers got the same configuration). I want to have a field in each document which tells if it came from a production/test server. I wanted to generate a dynamic custom field in every document which indicates the environment (production/test) using