Nginx udplog module (v 1.0.0)

rus eng

This module implements logging via BSD Syslog Protocol for nginx web server (RFC 3164).

Description

The module sends access log messages via BSD Syslog Protocol to specified host at port 514 using User Datagram Protocol (UDP) as transport.

Configuration directives


syntax: access_udplog <hostname | IP address | off> [ <log format> ]
default: N/A
severity: optional
context: main, server, location, if, limit_access

Enables logging via BSD Syslog Protocol. Applies only to access log messages. The first argument specifies the name of the host where the messages will be sent to. The second argument specifies the name of format of log messages, defined by the directive log_format. If the argument is omitted, "combined" will be used.

The facility of log messages is Local7 (23), severity is Info (6) and they currently could not be changed.

Multiple occurances of this directive instruct nginx to send every log message to multiple hosts.


Example configuration

server {

    [...]

    access_udplog 192.168.2.4;

    location /test {
        access_udplog off;

        [...]
    }
}
		

Example output

$ tail -f /var/log/messages
Jan  5 20:12:06 iva syslogd 1.5.0#5ubuntu3: restart (remote reception).
Jan  5 20:19:56 iva.local iva 127.0.0.1 - - [05/Jan/2010:20:19:56 +0100] "GET /a HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"
Jan  5 20:27:20 iva.local iva 127.0.0.1 - - [05/Jan/2010:20:27:20 +0100] "GET / HTTP/1.1" 200 151 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"
Jan  5 20:28:05 iva.local iva 127.0.0.1 - - [05/Jan/2010:20:28:05 +0100] "GET /upload.html HTTP/1.1" 200 501 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"
		

Download

Latest version 1.0.0:
FileMD5SHA1
nginx_udplog_module-1.0.0.tar.gzdc211933806fd325fa0a204df3369ba8485962bcc425fc3eb7e40dec2181f3cd6eaeb52e
nginx_udplog_module-1.0.0.zipfe0e58f196815964313b1e9a86807cd217717eb760f6aee4a26698806e2aa937586fc2bc
or go to
download area

Browse repository

http://github.com/vkholodkov/nginx-udplog-module/tree/master

How to use

Download sources from one of the links above. Unpack the archive:

tar xvzf nginx_udplog_module-1.0.0.tar.gz

Configure nginx with additional module:

cd <path to nginx sources>
./configure --add-module=<path to udplog module sources>
make
make install

Nginx

nginx -- is a web-server, developed by Igor Sysoev.

Licence

The above-described module is an addition to nginx web-server, nevertheless they are independent products. The licence of above-described module is BSD You should have received a copy of license along with the source code. By using the materials from this site you automatically agree to the terms and conditions of this license. If you don't agree to the terms and conditions of this license, you must immediately remove from your computer all materials downloaded from this site.

Contact author

Valery Kholodkov valery+nginx@grid.net.ru
Please use address extension while composing an Email to me.


Copyright (C) 2009 Valery Kholodkov
Module copyright notices see in module sources.