1

I'm having some trouble forwarding postgres logs to logstash. Normally it's pretty easy to do, but the problem with postgres is that the current logfile has the current date in the filename, so the name changes every day, making it very difficult to put the filename into logstash's config. Is there anything I can do about this? Maybe there's some trick to logstash that I can use to resolve this?

Whitewind617
  • 131
  • 4
  • You'll have to provide more details about your configuration, in particular log-related entries of your postgresql.conf and possibly syslog.conf. The OS and how you installed Postgresql may also be relevant. – jcaron Feb 04 '16 at 23:11
  • 1
    The name of the logfile postgres uses, can be configured in postgresql.conf: http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-FILENAME –  Feb 04 '16 at 23:20

1 Answers1

2

I figured it out, you can just use wildcards in the logstash-forwarder config. :p So far that seems to be working, but I'll keep an eye on it to make sure it rotates properly.

Whitewind617
  • 131
  • 4