logging - Postgresql log to distant logstash server -
i'm setting logs's collector. have application send log using syslogappender (log4j) distant log server. can save applications logs , postgresql database logs, using curl command-line. logs server elk server (all in same cluster).
but want send postgresql logs automatically, appender , application logs. possible postgresql.conf file? or have use logstash forwarder? (if possible avoid use of forwarder)
you can either log postgres file , have loggstash-forwarder send central log server. secure requires use of ssl cert.
you can output postgress syslog , have rsyslog send logs log server.
postgres -> syslog (postgresql.conf)
log_destination = 'syslog' syslog_facility = 'local0' syslog_ident = 'postgres'
rsyslog -> logstash (/etc/rsyslog.conf)
format facility.loglevel @@server address:port (@ udp, @@ tcp)
local0.* @@db-private:5544
logstash input
input{ syslog{ type => syslog port => 5544 } }
Comments
Post a Comment