Skip to content

Instantly share code, notes, and snippets.

@naokij
naokij / graylog2-server
Created February 17, 2012 08:56
/etc/logrotate.d/graylog2-server
/var/log/graylog2.log {
daily
rotate 90
copytruncate
delaycompress
compress
notifempty
missingok
}
@naokij
naokij / graylog2-server
Created February 17, 2012 08:53
/etc/init.d/graylog2-server
#!/bin/sh
#
# graylog2-server: graylog2 message collector
#
# chkconfig: - 98 02
# description: This daemon listens for syslog and GELF messages and stores them in mongodb
#
CMD=$1
NOHUP=`which nohup`
@naokij
naokij / rsyslogforwarder.conf
Created February 16, 2012 17:05
rsyslog config to forward log from remote server to another server
#rsyslog v3 config file
# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance
#### MODULES ####
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514
@naokij
naokij / rsyslogforwarder
Created February 16, 2012 17:03
init script for rsyslog to forward remote syslog to another server
#!/bin/bash
#
# rsyslogforwarder Starts rsyslogd/rklogd forwarder.
#
#
# chkconfig: 2345 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files. It is a good idea to always \
# run rsyslog.
### BEGIN INIT INFO