syslog代理服务器通过https将消息转发到loggly
logglyprox的Python项目详细描述
这是syslog服务器代理。 它接收到的消息通过https转发到Loggly。 服务器使用gevent和keep-alive http会话来提高性能。
用法:
logglyproxy -c config_file
下面是一个配置文件示例:
[logglyproxy] bind_address = 127.0.0.1 port = 5140 apikey = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
以及lsb init脚本:
#! /bin/sh ### BEGIN INIT INFO # Provides: logglyproxy # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: false # Short-Description: Start/stop logglyproxy DAEMON="logglyproxy" DAEMON_USR=logglyproxy DAEMON_GRP=logglyproxy INSTALLPATH=/path/to/logglyproxy/virtualenv PIDFILE=/var/run/logglyproxy.pid . /lib/lsb/init-functions case "$1" in start) log_begin_msg "Starting logglyproxy server..." # Activate the virtual environment . $INSTALLPATH/bin/activate start-stop-daemon --background --make-pidfile \ --start --pidfile $PIDFILE \ --user $DAEMON_USR --group $DAEMIN_GRP \ --chuid $DAEMON_USR \ --exec "$INSTALLPATH/bin/$DAEMON" -- -c /etc/logglyproxy.cfg log_end_msg $? ;; stop) log_begin_msg "Stopping logglyproxy server..." start-stop-daemon --stop --pidfile $PIDFILE --verbose log_end_msg $? ;; *) log_success_msg "Usage: /etc/init.d/logglyproxy {start|stop}" exit 1 ;; esac exit 0
1.0(2011年2月1日)
- 初次发布。