1 ====== ON THE CENTRAL SYSLOG MACHINE ======
4 - Add the following lines in the appropriate places in /etc/syslog-ng/syslog-ng.conf (edit/replace the filter f_system line don't duplicate it)
6 edit /etc/syslog-ng/syslog-ng.conf destination d_external_eg_stats { # f_egstats
7 file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/eg_stats.log",
8 template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") owner(nagios) group(nagios) template-escape(no)); };
10 filter f_egstats { match("eg-stats") and not match("CRON"); };
11 filter f_system { not facility(local0, local1, local2, local3, local4, local5, local6, local7) and not filter(f_egstats); };
13 log { source(s_all); filter(f_egstats); destination(d_external_eg_stats); };
17 /etc/init.d/syslog-ng restart
22 - Add the following lines in the appropriate places in /etc/rsyslog.d/evergreen-rsyslog.conf [ wget -O evergreen-rsyslog.conf "http://git.evergreen-ils.org/?p=Evergreen.git;a=blob_plain;f=Open-ILS/examples/evergreen-rsyslog.conf" ]
24 # Log file templates -------
25 $template egstats,"/var/log/remote/evergreen/%$YEAR%/%$MONTH%/%$DAY%/eg_stats.%$HOUR%.log"
27 if $programname contains 'eg-stats' then
29 local0.info ?egstats;msgformat
35 /etc/init.d/rsyslog restart
37 ====== ON THE MACHINES RUNNING EVERGREEN ======
38 cd /usr/share/perl5 && sudo wget -O Logger.pm "http://git.evergreen-ils.org/?p=contrib/equinox.git;a=blob_plain;f=monitoring/eg-stats/Logger.pm
39 cd /usr/bin && sudo wget -O eg-stats-collector-remote-log.pl "http://git.evergreen-ils.org/?p=contrib/equinox.git;a=blob_plain;f=monitoring/eg-stats/eg-stats-collector-remote-log.pl"
40 sudo chmod +x eg-stats-collector-remote-log.pl
43 cd /usr/bin && sudo wget -O eg-stats-keepalive_syslog-ng.sh "http://git.evergreen-ils.org/?p=contrib/equinox.git;a=blob_plain;f=monitoring/eg-stats/eg-stats-keepalive_syslog-ng.sh"
44 sudo chmod +x eg-stats-keepalive*.sh
46 - Add the following lines to the bottom of /etc/syslog-ng/syslog-ng.conf:
48 source s_file_eg-statslog { file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/eg-stats.log" follow_freq(1)); };
49 log { source(s_file_eg-statslog); destination(d_ext); };
53 /etc/init.d/syslog-ng restart
55 Insert this line into root's crontab:
56 */1 * * * * /usr/bin/eg-stats-keepalive_syslog-ng.sh >/dev/null 2>&1
60 cd /usr/bin && sudo wget -O eg-stats-keepalive_rsyslog.sh "http://git.evergreen-ils.org/?p=contrib/equinox.git;a=blob_plain;f=monitoring/eg-stats/eg-stats-keepalive_rsyslog.sh"
61 sudo chmod +x eg-stats-keepalive*.sh
63 - Add the following lines below the RULES section (replace syslog_server with your central syslog machine name or ip):
67 local0.* @syslog_server:514
68 local1.* @syslog_server:514
69 local2.* @syslog_server:514
70 local3.* @syslog_server:514
71 local6.* @syslog_server:514
72 local7.* @syslog_server:514
82 /etc/init.d/rsyslog restart
84 Insert this line into root's crontab:
86 */1 * * * * /usr/bin/eg-stats-keepalive_rsyslog.sh >/dev/null 2>&1