I have some random files that I would like to collect and forward to my logging server. These are applications that don't really support GELF, so I am trying to forward these files with rsyslog:
# Apache access log
input(type="imfile" File="/var/log/misc/blah.log"
Tag="Apache Access Log"
StateFile="statefile1")
*.* @@log.ospreyreach.com:12514
Some issues/questions:
- This forwards all the syslog files. How can I specify only certain specific files to get forwarded?
- This does not seem to collect any data from the file I defined. I see regular syslog messages popping up in my graylog server, but not that file.
Try this LEGACY rsyslog formatted version:
You can do similar entries for your other log files.
After that, create some extractors on your graylog2 server for the 12514/TCP input. This will give you some fine grain options for graphs etc.