Al Bailey 481f78f5bf Remove unused openstack references from patch-restart and syslog
Most of the openstack processes are containerized so there is no
need for them to be included in the patch restart scripts, or
the syslog configuration and log rotation files.

Story: 2004764
Task: 30668
Change-Id: Ib342fa7b594cdafa5d7c7575044ea28783daf9d0
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-05-08 08:01:59 -05:00

450 lines
20 KiB
Plaintext

@version: 3.4
#@include "remotelogging.conf"
#
# Syslog-ng configuration file, compatible with default Debian syslogd
# installation. Originally written by anonymous (I can't find his name)
# Revised, and rewrited by me (SZALAY Attila <sasa@debian.org>)
# Common log format with fractional seconds, hostname, and priority
template t_log {
template("${YEAR}-${MONTH}-${DAY}T${HOUR}:${MIN}:${SEC}.${MSEC} ${HOST} ${MSGHDR}${PRIORITY} ${MSG}\n");
template-escape(no);
};
template t_ocf_log {
template("${R_YEAR}-${R_MONTH}-${R_DAY}T${R_HOUR}:${R_MIN}:${R_SEC}.${R_MSEC} ${HOST} ${MSGHDR}${PRIORITY} ${MSG}\n");
template-escape(no);
};
# Format for openstack logs that provide their own timestamp, priority, etc...
template t_openstack {
template("${MSG}\n");
template-escape(no);
};
template t_libvirtd {
template("${YEAR}-${MONTH}-${DAY}T${HOUR}:${MIN}:${SEC}.${MSEC} ${MSG}\n");
template-escape(no);
};
template t_nfv {
template("${YEAR}-${MONTH}-${DAY}T${HOUR}:${MIN}:${SEC}.${MSEC} ${HOST} ${MSG}\n");
template-escape(no);
};
template t_mtc {
template("${R_YEAR}-${R_MONTH}-${R_DAY}T${R_HOUR}:${R_MIN}:${R_SEC}.${R_MSEC} ${MSG}\n");
template-escape(no);
};
template t_fm {
template("${R_YEAR}-${R_MONTH}-${R_DAY}T${R_HOUR}:${R_MIN}:${R_SEC}.${R_MSEC} ${MSG}\n");
template-escape(no);
};
template t_ima_appraise {
template ("${HOST} ${MSGONLY}\n");
template-escape(no);
};
# First, set some global options.
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
owner("root"); group("root"); perm(0644); stats_freq(0);
bad_hostname("^gconfd$");
frac_digits(3);
log_msg_size(65535);
file-template(t_log);
};
########################
# Sources
########################
# This is the default behavior of sysklogd package
# Logs may come from unix stream, but not from another machine.
#
source s_src { unix-dgram("/dev/log" ); internal();
file("/proc/kmsg" program_override("kernel") );
};
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
#
#source s_net { tcp(ip(127.0.0.1) port(1000) authentication(required) encrypt(allow)); };
# UDP source for HAProxy
source s_udp { udp(ip(127.0.0.1) port(514)); };
########################
# Destinations
########################
#
# remote_log_server destination is added when remotelogging is enabled.
# The /etc/syslog-ng/remotelogging.conf file has the log statement to
# send messages to the remote log server.
#
# Note: remotelogging.conf must be updated when adding a logfile.
#
#destination remote_log_server {udp("10.1.2.3" port(514));};
#
# First some standard logfile
#
destination d_auth { file("/var/log/auth.log"); };
destination d_cron { file("/var/log/cron.log"); };
destination d_daemon { file("/var/log/daemon.log"); };
destination d_daemon_ocf { file("/var/log/daemon-ocf.log" template(t_ocf_log) ); };
destination d_kern { file("/var/log/kern.log"); };
destination d_lpr { file("/var/log/lpr.log"); };
destination d_mail { file("/var/log/mail.log"); };
destination d_syslog { file("/var/log/syslog"); };
destination d_user { file("/var/log/user.log"); };
destination d_uucp { file("/var/log/uucp.log"); };
destination d_postgres { file("/var/log/postgres.log"); };
destination d_platform { file("/var/log/platform.log"); };
destination d_openstack { file("/var/log/openstack.log" template(t_openstack)); };
destination d_sm { file("/var/log/sm.log"); };
# Maintenance Log destinations
destination d_pmon { file("/var/log/pmond.log" template(t_mtc)); };
destination d_lmon { file("/var/log/lmond.log" template(t_mtc)); };
destination d_hostwd { file("/var/log/hostwd.log" template(t_mtc)); };
destination d_fsmon { file("/var/log/fsmond.log" template(t_mtc)); };
destination d_hwmon { file("/var/log/hwmond.log" template(t_mtc)); };
destination d_mtclogd { file("/var/log/mtclogd.log" template(t_mtc)); };
destination d_mtcalarmd { file("/var/log/mtcalarmd.log" template(t_mtc)); };
destination d_mtcclient { file("/var/log/mtcClient.log" template(t_mtc)); };
destination d_mtcagent { file("/var/log/mtcAgent.log" template(t_mtc)); };
destination d_hbsclient { file("/var/log/hbsClient.log" template(t_mtc)); };
destination d_hbsagent { file("/var/log/hbsAgent.log" template(t_mtc)); };
destination d_guestagent { file("/var/log/guestAgent.log" template(t_mtc)); };
destination d_guestserver { file("/var/log/guestServer.log" template(t_mtc)); };
destination d_mtcagentalarm { file("/var/log/mtcAgent_alarm.log" template(t_mtc)); };
destination d_mtcagentapi { file("/var/log/mtcAgent_api.log" template(t_mtc)); };
destination d_mtcagentevent { file("/var/log/mtcAgent_event.log" template(t_mtc)); };
# HAProxy Log destination
destination d_haproxy { file("/var/log/haproxy.log"); };
# Fault Management Log destination
destination d_fm_event { file("/var/log/fm-event.log"); };
destination d_fm_manager { file("/var/log/fm-manager.log" template(t_fm)); };
# IMA Log destination
destination d_ima { file("/var/log/ima.log"); };
# The destination for IMA Appraisals are FM Events
destination d_ima_appraise {
program(
"/usr/sbin/fm_event_syslogger"
template(t_ima_appraise)
log-fifo-size(2Mb)
);
};
# Sysinv Log destination
destination d_sysinv { file("/var/log/sysinv.log" template(t_openstack)); };
destination d_sysinvapi { file("/var/log/sysinv-api.log" template(t_openstack)); };
# Distributed Cloud Log destination
destination d_dcmanager { file("/var/log/dcmanager/dcmanager.log" template(t_openstack)); };
destination d_dcorch { file("/var/log/dcorch/dcorch.log" template(t_openstack)); };
destination d_dcdbsync { file("/var/log/dcdbsync/dcdbsync.log" template(t_openstack)); };
# Openstack Log destinations
destination d_horizon { file("/var/log/horizon.log" template(t_openstack)); };
destination d_libvirtd { file("/var/log/libvirt/libvirtd.log" template(t_libvirtd)); };
destination d_keystoneall { file("/var/log/keystone/keystone-all.log" template(t_openstack)); };
destination d_keystoneapi { file("/var/log/keystone/keystone-api.log" template(t_openstack)); };
destination d_barbicanapi { file("/var/log/barbican/barbican-api.log" template(t_openstack)); };
destination d_barbicandbsync { file("/var/log/barbican/barbican-dbsync.log" template(t_openstack)); };
destination d_barbicankeystonelistener { file("/var/log/barbican/barbican-keystone-listener.log" template(t_openstack)); };
destination d_barbicanworker { file("/var/log/barbican/barbican-worker.log" template(t_openstack)); };
destination d_barbicancleaner { file("/var/log/barbican/barbican-cleaner.log" template(t_openstack)); };
# NFV-VIM Log destinations
destination d_vim { file("/var/log/nfv-vim.log" template(t_nfv)); };
destination d_vim_api { file("/var/log/nfv-vim-api.log" template(t_nfv)); };
destination d_vim_webserver { file("/var/log/nfv-vim-webserver.log" template(t_nfv)); };
# Local Log destinations
destination d_local4 { file("/var/log/local4.log"); };
destination d_local5 { file("/var/log/local5.log"); };
destination d_local6 { file("/var/log/local6.log"); };
destination d_local7 { file("/var/log/local7.log"); };
# This files are the log come from the mail subsystem.
#
destination d_mailinfo { file("/var/log/mail/mail.info"); };
destination d_mailwarn { file("/var/log/mail/mail.warn"); };
destination d_mailerr { file("/var/log/mail/mail.err"); };
# Logging for INN news system
#
destination d_newscrit { file("/var/log/news/news.crit"); };
destination d_newserr { file("/var/log/news/news.err"); };
destination d_newsnotice { file("/var/log/news/news.notice"); };
# Some `catch-all' logfiles.
#
destination d_debug { file("/var/log/debug"); };
destination d_error { file("/var/log/error"); };
destination d_messages { file("/var/log/messages"); };
# The root's console.
#
destination d_console { usertty("root"); };
# Virtual console.
#
destination d_console_all { file("/dev/tty10"); };
# The named pipe /dev/xconsole is for the nsole' utility. To use it,
# you must invoke nsole' with the -file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
destination d_xconsole { pipe("/dev/xconsole"); };
# Send the messages to an other host
#
#destination d_net { tcp("127.0.0.1" port(1000) authentication(on) encrypt(on) log_fifo_size(1000)); };
# Debian only
destination d_ppp { file("/var/log/ppp.log"); };
# Bash history.
destination d_bash { file("/var/log/bash.log" owner("root") group("root") perm(0600)); };
# SNMP Audit Trail
destination d_snmpat { file("/var/log/snmp-api.log"); };
########################
# Filters
########################
# Here's come the filter options. With this rules, we can set which
# message go where.
filter f_dbg { level(debug); };
filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_err { level(err); };
filter f_crit { level(crit .. emerg); };
filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
filter f_error { level(err .. emerg) ; };
filter f_messages { level(info,notice,warn) and
not facility(auth,authpriv,cron,daemon,mail,news); };
filter f_auth { facility(auth, authpriv) and not program("audispd"); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon) and not program("^(OCF_).") and not match("snmp-auditor" value("MESSAGE")); };
filter f_daemon_ocf { facility(daemon) and program("^(OCF_)."); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_local { facility(local0, local1, local3, local4, local5,
local6, local7); };
filter f_mail { facility(mail); };
#filter f_news { facility(news); };
filter f_newscrit { facility(news) and filter(f_crit); };
filter f_newserr { facility(news) and filter(f_err); };
filter f_newsnotice { facility(news) and filter(f_notice); };
#filter f_syslog3 { not facility(auth, authpriv, mail) and not filter(f_debug); };
filter f_syslog { facility(syslog); };
filter f_user { facility(user) and not filter(f_vim) and not filter(f_vim_api)
and not filter(f_vim_webserver) and not match("fmClientCli");
and not program("^(-)?(ba)?(su|sh)$"); };
filter f_uucp { facility(uucp); };
#filter f_cnews { level(notice, err, crit) and facility(news); };
filter f_cother { level(debug, info, notice, warn) or facility(daemon, mail); };
filter f_ppp { facility(local2); };
filter f_console { level(warn .. emerg); };
# Local Log Filters
filter f_local0 { facility(local0); };
filter f_local1 { facility(local1)
and not program(fmManager); };
filter f_local2 { facility(local2)
and not program(barbican-api)
and not program(barbican-dbsync)
and not program(barbican-keystone-listener)
and not program(barbican-worker)
and not program(barbican-cleaner)
and not filter(f_keystoneall)
and not filter(f_keystoneapi) };
filter f_local3 { facility(local3); };
filter f_local4 { facility(local4); };
filter f_local5 { facility(local5); };
filter f_local6 { facility(local6); };
filter f_local7 { facility(local7); };
# Maintenance Log Filters
filter f_pmon { facility(local5) and program(pmond); };
filter f_lmon { facility(local5) and program(lmond); };
filter f_hostw { facility(local5) and program(hostwd); };
filter f_fsmon { facility(local5) and program(fsmond); };
filter f_hwmon { facility(local5) and program(hwmond); };
filter f_mtclogd { facility(local5) and program(mtclogd); };
filter f_mtcalarmd { facility(local5) and program(mtcalarmd); };
filter f_mtcclient { facility(local5) and program(mtcClient); };
filter f_mtcagent { facility(local5) and program(mtcAgent); };
filter f_hbsclient { facility(local5) and program(hbsClient); };
filter f_hbsagent { facility(local5) and program(hbsAgent); };
filter f_guestagent { facility(local5) and program(guestAgent); };
filter f_guestserver { facility(local5) and program(guestServer); };
filter f_mtcagentalarm { facility(local5) and program(/var/log/mtcAgent_alarm.log); };
filter f_mtcagentapi { facility(local5) and program(/var/log/mtcAgent_api.log); };
filter f_mtcagentevent { facility(local5) and program(/var/log/mtcAgent_event.log); };
# Fault Management Filter
filter f_fm_event { facility(local5) and program(fmManager); };
filter f_fm_manager { facility(local1) and program(fmManager); };
# IMA Filters
filter f_ima { facility(auth) and program(audispd) and match("type=INTEGRITY_") ; };
filter f_ima_appraise { filter(f_ima) and match("appraise_data") ; };
# Sysinv Log Filter
filter f_sysinv { facility(local6) and program(sysinv) and not match("sysinv.api.hooks.auditor"); };
filter f_sysinvapi { facility(local6) and program(sysinv) and match("sysinv.api.hooks.auditor"); };
# Distributed Cloud Log Filters
filter f_dcmanagermanager { facility(local2) and program(dcmanager-manager); };
filter f_dcmanagerapi { facility(local2) and program(dcmanager-api); };
filter f_dcorchengine { facility(local2) and program(dcorch-engine); };
filter f_dcorchsnmp { facility(local2) and program(dcorch-snmp); };
filter f_dcorchapiproxy { facility(local2) and program(dcorch-api-proxy); };
filter f_dcdbsyncapi { facility(local2) and program(dcdbsync-api); };
# Openstack Log Filters
filter f_horizon { facility(local7) };
filter f_libvirtd { program(libvirtd) };
filter f_keystoneall { facility(local2) and message("keystone.*") and not match("keystone.common.wsgi"); };
filter f_keystoneapi { facility(local2) and match("keystone.common.wsgi"); };
filter f_barbicanapi { facility(local2) and program(barbican-api); };
filter f_barbicandbsync { facility(local2) and program(barbican-dbsync); };
filter f_barbicankeystonelistener { facility(local2) and program(barbican-keystone-listener); };
filter f_barbicanworker { facility(local2) and program(barbican-worker); };
filter f_barbicancleaner { facility(local2) and program(barbican-cleaner); };
# NFV-VIM Log Filters
filter f_vim { facility(user) and program(VIM_); };
filter f_vim_api { facility(user) and program(VIM-API_); };
filter f_vim_webserver { facility(user) and program(VIM-WEB_); };
# bash Log Filter
filter f_bash { facility(user) and program("^(-)?(ba)?(su|sh)$"); };
# SNMP Audit Trail
filter f_snmpat { facility(daemon) and program(snmpd) and match("snmp-auditor" value("MESSAGE")); };
########################
# Log paths
########################
log { source(s_src); filter(f_auth); destination(d_auth); };
log { source(s_src); filter(f_cron); destination(d_cron); };
log { source(s_src); filter(f_daemon); destination(d_daemon); };
log { source(s_src); filter(f_daemon_ocf); destination(d_daemon_ocf); };
log { source(s_src); filter(f_kern); destination(d_kern); };
log { source(s_src); filter(f_lpr); destination(d_lpr); };
#log { source(s_src); filter(f_syslog3); destination(d_syslog); };
log { source(s_src); filter(f_syslog); destination(d_syslog); };
log { source(s_src); filter(f_user); destination(d_user); };
log { source(s_src); filter(f_uucp); destination(d_uucp); };
log { source(s_src); filter(f_local0); destination(d_postgres); };
log { source(s_src); filter(f_local1); destination(d_platform); };
log { source(s_src); filter(f_local2); destination(d_openstack); };
log { source(s_src); filter(f_local3); destination(d_sm); };
# Maintenance Log Paths
log { source(s_src); filter(f_pmon); destination(d_pmon); };
log { source(s_src); filter(f_lmon); destination(d_lmon); };
log { source(s_src); filter(f_hostw); destination(d_hostwd); };
log { source(s_src); filter(f_fsmon); destination(d_fsmon); };
log { source(s_src); filter(f_hwmon); destination(d_hwmon); };
log { source(s_src); filter(f_mtclogd); destination(d_mtclogd); };
log { source(s_src); filter(f_mtcalarmd); destination(d_mtcalarmd); };
log { source(s_src); filter(f_mtcclient); destination(d_mtcclient); };
log { source(s_src); filter(f_mtcagent); destination(d_mtcagent); };
log { source(s_src); filter(f_hbsclient); destination(d_hbsclient); };
log { source(s_src); filter(f_hbsagent); destination(d_hbsagent); };
log { source(s_src); filter(f_guestagent); destination(d_guestagent); };
log { source(s_src); filter(f_guestserver); destination(d_guestserver); };
log { source(s_src); filter(f_mtcagentalarm); destination(d_mtcagentalarm); };
log { source(s_src); filter(f_mtcagentapi); destination(d_mtcagentapi); };
log { source(s_src); filter(f_mtcagentevent); destination(d_mtcagentevent); };
# HAProxy Log Path
log { source(s_udp); filter(f_local1); destination(d_haproxy); };
# Fault Management Log Path
log { source(s_src); filter(f_fm_event); destination(d_fm_event); };
log { source(s_src); filter(f_fm_manager); destination(d_fm_manager); };
# IMA Log Path
log { source(s_src); filter(f_ima); destination(d_ima); };
# we need to pass along IMA Appraisal failures to FM in order to
# generate FM EVENT logs
log { source(s_src); filter(f_ima_appraise); destination(d_ima_appraise); };
# Sysinv Log Path
log {source(s_src); filter(f_sysinv); destination(d_sysinv); };
log {source(s_src); filter(f_sysinvapi); destination(d_sysinvapi); };
# Distributed Cloud Log Path
log {source(s_src); filter(f_dcmanagermanager); destination(d_dcmanager); };
log {source(s_src); filter(f_dcmanagerapi); destination(d_dcmanager); };
log {source(s_src); filter(f_dcorchengine); destination(d_dcorch); };
log {source(s_src); filter(f_dcorchsnmp); destination(d_dcorch); };
log {source(s_src); filter(f_dcorchapiproxy); destination(d_dcorch); };
log {source(s_src); filter(f_dcdbsyncapi); destination(d_dcdbsync); };
# Openstack Log Paths
log { source(s_src); filter(f_horizon); destination(d_horizon); };
log { source(s_src); filter(f_libvirtd); destination(d_libvirtd); };
log { source(s_src); filter(f_keystoneall); destination(d_keystoneall); };
log { source(s_src); filter(f_keystoneapi); destination(d_keystoneapi); };
log { source(s_src); filter(f_barbicanapi); destination(d_barbicanapi); };
log { source(s_src); filter(f_barbicandbsync); destination(d_barbicandbsync); };
log { source(s_src); filter(f_barbicankeystonelistener); destination(d_barbicankeystonelistener); };
log { source(s_src); filter(f_barbicanworker); destination(d_barbicanworker); };
log { source(s_src); filter(f_barbicancleaner); destination(d_barbicancleaner); };
# NFV-VIM Log Paths
log {source(s_src); filter(f_vim); destination(d_vim); };
log {source(s_src); filter(f_vim_api); destination(d_vim_api); };
log {source(s_src); filter(f_vim_webserver); destination(d_vim_webserver); };
# Local Log Paths
log { source(s_src); filter(f_local4); destination(d_local4); };
log { source(s_src); filter(f_mail); destination(d_mail); };
#log { source(s_src); filter(f_mail); filter(f_info); destination(d_mailinfo); };
#log { source(s_src); filter(f_mail); filter(f_warn); destination(d_mailwarn); };
#log { source(s_src); filter(f_mail); filter(f_err); destination(d_mailerr); };
log { source(s_src); filter(f_newscrit); destination(d_newscrit); };
log { source(s_src); filter(f_newserr); destination(d_newserr); };
log { source(s_src); filter(f_newsnotice); destination(d_newsnotice); };
#log { source(s_src); filter(f_cnews); destination(d_console_all); };
#log { source(s_src); filter(f_cother); destination(d_console_all); };
#log { source(s_src); filter(f_ppp); destination(d_ppp); };
log { source(s_src); filter(f_console); destination(d_console_all);
destination(d_xconsole); };
log { source(s_src); filter(f_crit); destination(d_console); };
# All messages send to a remote site
#
#log { source(s_src); destination(d_net); };
# Bash log Path
log { source(s_src); filter(f_bash); destination(d_bash); };
# SNMP Audit Trail
log { source(s_src); filter(f_snmpat); destination(d_snmpat); };