Change defaut facility fron nginx logs

(Boris) #1


I’m using graylog 2.4.6, and configured nginx servers to send logs to it.

log_format  graylog2_format  '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" <msec=$msec|connection=$connection|connection_requests=$connection_requests|millis=$request_time>';

access_log syslog:server=graylog-lb:12301 graylog2_format;

The logs are received, and everything is working just great,
Is it possible to change the facility of the nginx logs?
Currently it’s registered under facility local7.

(Ben van Staveren) #2

Yes, I think so, but you’ll have to configure that in nginx :slight_smile:

(Boris) #3

what exactly should be changed in nginx?

(Tess) #4


^F “facility”

(Boris) #5

Thanks, not sure how I missed it in the docs :confused:

(Tess) #6

No worries Boris, I hope you got things to work.