csback_syslog-ng.conf 2.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
# This is <csback_syslog-ng.conf>
# =============================================================================
# csback syslog-ng V3.0 snippet by Daniel Armbruster
#
# Copy the content of this file to /etc/syslog-ng/syslog-ng.conf or simply add
#
# include "path/to/this/file";
#
# -----------------------------------------------------------------------------
# $Id$
11 12 13 14 15
# -----------------------------------------------------------------------------
#
# REVISION:
#                V1.0   Daniel Armbruster
#   2012/08/09   V1.1   BFO2LSDF filter added 
16
#   2013/23/01   V1.2   csback status file logging
17 18 19
#   2016/07/15   V1.3   csback uses strange source definitions
#                       a recent version of syslog-ng complains
#                       the changes make csback messages be properly logged
20
#
21
# =============================================================================
22 23

# general
24
options {
25 26 27
  chain_hostnames(no);
  use_dns(persist_only);
  dns_cache_hosts(/etc/hosts);
28
};
29 30

# csback related
31 32 33 34
source csback { 
 tcp(ip(127.0.0.1) port(3333)); 
 udp(ip(127.0.0.1) port(3333)); 
};
35 36 37
filter fil_csback { match('^csback' value(MSG)); };
destination csbacklog {
  file("/var/log/csback.log"
38
    perm(0644) fsync(yes)
39 40 41
    template("$DATE $HOST $MSG\n")
    template-escape(no));
};
42
log { source(src); source(csback); filter(fil_csback); destination(csbacklog); };
43

44 45 46
# log CRITICAL messages to additional status file (for csbackntfy)
destination csbackStatus {
  file("/var/log/csback.status"
47
    perm(0666) fsync(yes)
48 49 50 51
    template("$DATE $HOST $MSG\n")
    template-escape(no));
};
filter fil_csbackCritical { message('.*csback.*CRITICAL.*'); };
52
log { source(src); source(csback); filter(fil_csbackCritical); destination(csbackStatus); };
53

54
# BFO2LSDF related
55
#source BFOLSDFsrc { unix-stream("/dev/log"); internal(); };
56
filter fil_BFO2LSDF { message('.*BFO2LSDF.*'); };
57
log { source(src); filter(fil_BFO2LSDF); destination(csbacklog); };
58 59 60

# csclean related
filter fil_csclean { message('.*csclean.*'); };
61
log { source(src); filter(fil_csclean); destination(csbacklog); };