I want to include AWS Instance's tag information in each Filebeat document. I can think of two ways to do this -
- Modify the log output and include the info in there. This will require tweaking all the services whose log files are being tracked.
- Run a script at launch that
- modifies the
filebeat.ymlfile - pulls AWS metadata for that instance
- and adds the tag info to
ymlfile
It sounds like method 2 is the right approach.
Is there a better way to do this? Does Filebeat provide a way to dynamically set prospector attributes?