logglyproxy
Un serveur proxy syslog qui transfère les messages vers Loggly via HTTPS
Il s'agit d'un serveur proxy syslog. Les messages qu'il reçoit sont transmis à Loggly via HTTPS.
Le serveur utilise gevent et des sessions HTTPS Keep-Alive pour optimiser les performances.
Téléchargement et installation
Le paquet est disponible dans le répertoire de paquets Python et s'installe de manière traditionnelle:easy_install logglyproxy
ou
pip install logglyproxy
Le code est accessible également sur bitbucket.
Usage
Le serveur se lance ainsi:
logglyproxy -c config_file
Exemple de fichier de configuration
[logglyproxy] bind_address = 127.0.0.1 port = 5140 apikey = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Exemple de fichier init LSB
#! /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
Licence
logglyproxy est proposé sous licence MIT:
Copyright (c) 2011 Evax S.A.R.L. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
